Commit Graph

1329 Commits

Author SHA1 Message Date
Alex Crichton
82467f9793 Use dyn with all trait objects
Fixes new warnings showing up on nightly nowadays.
2019-06-03 08:28:55 -07:00
Alex Crichton
f3adee7056 Squash warnings about unused variables
Make sure when compiling for non-wasm targets we don't issue tons of
warnings about unused variables which can't be squashed.
2019-06-03 08:25:07 -07:00
Alex Crichton
ad68436cc9 Looks like webassembly-js-api package no longer needed!
Closes #1565
2019-05-30 07:40:26 -07:00
Gus Caplan
2cc40a27d2
Run fmt and clippy 2019-05-28 09:52:44 -05:00
Alex Crichton
dfcaabc738
Merge pull request #1557 from devsnek/new-weakref
Rewrite weakrefs to use current proposal
2019-05-28 09:12:47 -05:00
Alex Crichton
2a665a92fd Fix compile errors on nightly 2019-05-28 07:05:52 -07:00
Alex Crichton
39b5f1845d Fix a warning 2019-05-28 07:03:42 -07:00
Gus Caplan
66ade77720
Rewrite weakrefs to use current proposal 2019-05-26 09:30:33 -05:00
Alex Crichton
9b04fe9e45
Merge pull request #1545 from infinity0/master
Work around rust-lang/rust#58516
2019-05-21 08:58:59 -05:00
Ximin Luo
81fb2d97d3 Work around rust-lang/rust#58516 2019-05-20 20:18:24 -07:00
Alex Crichton
bc5f73e3d2
Merge pull request #1550 from alexcrichton/more-better-errors
Improve diagnostics with missing trait implementations
2019-05-20 13:04:46 -05:00
Alex Crichton
2cbb8b8a69 Improve diagnostics with missing trait implementations
Rejigger a few spans, work around an odd rustc issue, and hopefully
produce higher quality error messages!

Closes #1528
2019-05-20 10:49:36 -07:00
Alex Crichton
a02d210d5c Catch more errors on non-wasm32 platforms
This commit tweaks the codegen for imported functions and such (anything
that relies on some imported intrinsic or function filled in by the CLI)
to share as much code as possible on non-wasm32 platforms. This should
help us catch more errors before compiling to wasm and also just make it
easier to write UI tests!

For example a UI test previously couldn't be written for #1528 but now
it can be, and one is include (although the error message is quite bad).
2019-05-20 10:16:25 -07:00
Alex Crichton
137bbdf2e3 Bump to 0.2.45 2019-05-20 09:44:03 -07:00
ibaryshnikov
805738608d expose forget to wasm 2019-05-19 14:42:53 +03:00
Nick Fitzgerald
0cbdea5fa9
Merge pull request #1542 from fitzgen/update-walrus
Update dependencies and use new walrus custom sections APIs
2019-05-17 15:21:35 -07:00
Nick Fitzgerald
d422436487 Update dependencies and use new walrus custom sections APIs 2019-05-17 14:58:50 -07:00
Ingvar Stepanyan
cce12bfe16 Remove unsafe from #[wasm_bindgen_test] output
This is not necessary because references are FFI-safe and compatible with corresponding pointers, so we can just use them directly as an input.

Fixes #1540.
2019-05-17 15:52:26 +01:00
dakom
ae2aba094c whitelist uniforms with Int32List 2019-05-17 09:59:28 +03:00
lqd
ca0008174a Update weedle to version 0.9 2019-05-16 18:52:25 +02:00
Alex Crichton
773c6ff430 Bump to 0.2.44 2019-05-16 07:47:23 -07:00
Alex Crichton
5d97b358a2
Merge pull request #1534 from alexcrichton/trybuild
Migrate to `trybuild` from `compiletest`
2019-05-15 16:57:57 -05:00
Alex Crichton
4cc730fc41 Migrate to trybuild from compiletest
This migrates our UI tests to the recently published `trybuild` crate
which should hopefully be a bit more robust than `compiletest` over
time!
2019-05-15 14:47:22 -07:00
Huston Bokinsky
e728a7ee9e Enable text area selectionStart and selectionEnd calls. 2019-05-14 14:58:06 -07:00
Alex Crichton
827810fa1b
Merge pull request #1483 from dbrgn/typescript-optional-args
Fix optional arguments in TypeScript
2019-05-14 12:39:35 -05:00
Ingvar Stepanyan
716ed0d891 Hotfix for double encodeInto call
This was a regression introduced in the last commit of https://github.com/rustwasm/wasm-bindgen/pull/1470, which might make Unicode strings 2x slower to pass.
2019-05-14 14:14:34 +01:00
Alex Crichton
15defcfd3a Add a debug assert and more tests 2019-05-13 08:12:32 -07:00
Ingvar Stepanyan
0c681ee2ba Fix offset to arg comparison 2019-05-10 15:31:59 +01:00
Ingvar Stepanyan
7418cec613 Reduce reallocation sizes 2019-05-10 14:44:49 +01:00
Ingvar Stepanyan
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
Nick Fitzgerald
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
Nick Fitzgerald
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
Chris Trevino
9b5de9f88d update init test 2019-05-09 11:12:45 -07:00
Chris Trevino
2850cfc78e update init function export 2019-05-09 11:01:45 -07:00
Danilo Bargen
608a819c0b fixup! Fix optional arguments in TypeScript
Update tests
2019-05-09 18:36:47 +02:00
Danilo Bargen
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
Danilo Bargen
2384af21c1 Fix optional arguments in TypeScript 2019-05-09 18:09:29 +02:00
Alex Crichton
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
Alex Crichton
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
Pauan
c00262f210 Fixing some nits 2019-05-04 09:28:54 +02:00
Pauan
6c58afda01 Addressing feedback 2019-05-04 09:17:29 +02:00
Alex Crichton
9d33dd8717 Remove unused statements in web-sys build script 2019-05-03 14:59:35 -07:00
Alex Crichton
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
Alex Crichton
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
Alex Crichton
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
Alex Crichton
5a017c1e22 Update walrus dependency 2019-05-03 07:12:28 -07:00
RSSchermer
15e5162275 Add bufferData and clearBuffer to immutable slice whitelist 2019-05-02 18:19:31 +02:00
Pauan
69d7dc24b1 Adding in Futures 0.3 support 2019-05-02 13:48:44 +02:00
Alex Crichton
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
Alex Crichton
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