Commit Graph

2749 Commits

Author SHA1 Message Date
0c681ee2ba Fix offset to arg comparison 2019-05-10 15:31:59 +01:00
7418cec613 Reduce reallocation sizes 2019-05-10 14:44:49 +01:00
57b1a57c5e Speed up passing ASCII-only strings to WASM
Some speed up numbers from my string-heavy WASM benchmarks:
 - Firefox + encodeInto: +45%
 - Chrome + encodeInto: +80%
 - Firefox + encode: +29%
 - Chrome + encode: +62%

Note that this helps specifically with case of lots of small ASCII strings, in case of large strings there is no measurable difference in either direction.
2019-05-10 14:40:59 +01:00
befefe0da6 Merge pull request #1521 from fitzgen/anyref-heap-live-count
Utility for counting the number of live JsValues in the wasm-bindgen heap
2019-05-09 16:22:06 -07:00
3348ecebdf rustfmt src/anyref.rs 2019-05-09 15:57:21 -07:00
450c9234ad Add the anyref_heap_live_count function
This is useful for debugging and writing tests that assert various operations do
not leak `JsValue`s.
2019-05-09 15:57:21 -07:00
8ef820a54e Merge pull request #1520 from darthtrevino/bugfix/1517_typings
Update init() typings
2019-05-09 12:05:25 -07:00
9b5de9f88d update init test 2019-05-09 11:12:45 -07:00
2850cfc78e update init function export 2019-05-09 11:01:45 -07:00
608a819c0b fixup! Fix optional arguments in TypeScript
Update tests
2019-05-09 18:36:47 +02:00
d9c559f2ca fixup! Fix optional arguments in TypeScript
Apply feedback about omittable and non-omittable arguments. Thanks
@rhysd!
2019-05-09 18:22:47 +02:00
f4c5532982 Reorder and organize instrinsic extern declarations 2019-05-09 09:17:13 -07:00
2384af21c1 Fix optional arguments in TypeScript 2019-05-09 18:09:29 +02:00
d139228a34 Merge pull request #1508 from RSSchermer/master
Add `bufferSubData` and `clearBuffer[fiuv]` to immutable slice whitelist
2019-05-08 07:14:27 -07:00
61e2a1271e Merge pull request #1518 from Delet0r/patch-1
corretected unit of UTF-16 from byte to bit
2019-05-08 07:02:15 -07:00
cb691100f1 corretected unit of UTF-16 from byte to bit 2019-05-08 15:03:34 +02:00
19c3036f7e Update benchmarks source code link 2019-05-06 11:57:38 -07:00
952d9e06f3 Attempt to really fix benchmarks deploy 2019-05-06 11:13:35 -07:00
a85335dee9 Merge pull request #1507 from Pauan/futures-0.3
Adding in Futures 0.3 support to wasm-bindgen-futures
2019-05-06 10:23:30 -05:00
c00262f210 Fixing some nits 2019-05-04 09:28:54 +02:00
6c58afda01 Addressing feedback 2019-05-04 09:17:29 +02:00
d382ad72a3 Try to debug missing files... 2019-05-03 15:11:50 -07:00
9d33dd8717 Remove unused statements in web-sys build script 2019-05-03 14:59:35 -07:00
d6a6fdfcc7 Don't assert rustfmt succeeds
Not all environments have it so only run it and hope it succeeds.
2019-05-03 14:59:01 -07:00
7ef1e35a85 Try to fix publication of benchmarks 2019-05-03 14:29:10 -07:00
ec17ffe6ab Merge pull request #1512 from alexcrichton/benchmarks
Add a page of microbenchmarks for wasm-bindgen
2019-05-03 15:59:31 -05:00
e4fd0fccb5 Add a page of microbenchmarks for wasm-bindgen
This commit starts to add a page of microbenchmarks for wasm-bindgen
which we can hopefully track and compare over time. Right now it's
primarily focused on data collection, making it easy to collect data
across a number of benchmarks for comparison. It doesn't currently do
much in the way of actually comparing the results for you (aka drawing
pretty graphs), so let's left for a future step.

It's hoped though that we can use this to track performance improvements
as well as ensuring that they work over time!
2019-05-03 12:30:11 -07:00
a7b85362ce Merge pull request #1506 from alexcrichton/fix-same-name
Fix importing and exporting the same name
2019-05-03 11:29:44 -05:00
46f29db534 Merge pull request #1511 from alexcrichton/update-walrus
Update `walrus` dependency
2019-05-03 11:20:45 -05:00
3d43d6e5e8 Fix importing and exporting the same name
Run exports through the same identifier generation as imports to ensure
that everything gets a unique identifier and then just make sure all the
appropriate wires are hooked up when dealing with exports and imports.

Closes #1496
2019-05-03 07:15:20 -07:00
5a017c1e22 Update walrus dependency 2019-05-03 07:12:28 -07:00
15e5162275 Add bufferData and clearBuffer to immutable slice whitelist 2019-05-02 18:19:31 +02:00
69d7dc24b1 Adding in Futures 0.3 support 2019-05-02 13:48:44 +02:00
358ee18ab2 Merge pull request #1466 from fitzgen/log-stacks
Log stacks of imported JS functions that throw but aren't marked `catch`
2019-05-01 16:51:50 -05:00
a13eb10763 Merge pull request #1503 from alexcrichton/fix-web-imports
Fix direct imports in `--target web`
2019-05-01 15:56:40 -05:00
22eb34d9ab Fix direct imports in --target web
Currently the import object constructed for the `--target web` output
only ever includes the current module as an one of the modules included.
With `wasm-bindgen`'s optimization to import directly from modules,
however, it's possible to have more modules imported from in the
generated wasm file. This commit ensures that the imports are hooked up
in the `--target web` es6 emulation mode, ensuring there aren't
extraneous errors about import objects.
2019-05-01 13:53:59 -07:00
8174973c81 Merge pull request #1504 from alexcrichton/fix-drop-ref-showing-up
Fix `__wbindgen_object_drop_ref` unnecessary bindings
2019-05-01 15:52:50 -05:00
c96e3ce097 Fix __wbindgen_object_drop_ref unnecessary bindings
This commit fixes an issue where bindings for
`__wbindgen_object_drop_ref` are generated even if the function isn't
actually used by the final wasm file. This is currently due to the fact
that we run gc passes pretty late in wasm-bindgen and one of the
intrinsics that ended up getting gc'd referenced the
`__wbindgen_object_drop_ref` intrinsic function.

The fix here is somewhat naive by just updating the intrinsic to not
actually use `__wbindgen_object_drop_ref`. This may not be a long-term
solution but it should be good enough for now at least.
2019-05-01 12:13:12 -07:00
c127ef7691 Merge pull request #1502 from xtuc/patch-1
Update webpack.config.js
2019-05-01 10:46:05 -05:00
98de4d7098 Update webpack.config.js 2019-05-01 17:43:50 +02:00
187a289ec8 Merge pull request #1499 from RReverser/patch-2
Fix CHANGELOG for 0.2.43
2019-05-01 08:15:29 -05:00
c6428e2234 Fix CHANGELOG for 0.2.43
"Bindings for some variadic functions ..." line referenced irrelevant PRs.

Moved them to correct places and updated the line with relevant PR link instead.
2019-05-01 01:19:05 +01:00
578d59ebc0 Merge pull request #1440 from c410-f3r/getters
Getters/Setters for fields
2019-04-30 12:07:34 -05:00
3031c15bf6 Rewrite docs for getters/setters 2019-04-30 10:06:38 -07:00
c70ed36be4 Add some tests which do computation in getters/setters 2019-04-30 10:02:11 -07:00
470eea9fb0 Getters/Setters for fields 2019-04-30 10:26:03 -03:00
402e72ed39 Merge pull request #1495 from alexcrichton/bump
Bump to 0.2.43
0.2.43
2019-04-29 11:21:21 -05:00
f2429be07f Bump to 0.2.43 2019-04-29 08:28:41 -07:00
77d2c2856e Don't rustfmt web-sys bindings
File is then too large to upload to GitHub!

Closes #1482
2019-04-29 08:20:01 -07:00
103da22692 Merge pull request #1494 from limira/patch-1
update 'host bindings' -> 'web idl bindings'
2019-04-29 09:27:30 -05:00