wasm-bindgen/tests
Alex Crichton 68537b9649 Add an optimization to directly wire up imported functions
This commit adds an optimization to `wasm-bindgen` to directly import
and invoke other modules' functions from the wasm module, rather than
going through a shim in the imported bindings. This will be an important
optimization in the future for the host bindings proposal, but for now
it's largely just a proof-of-concept to show that we can do it and is
unlikely to bring about many performance benefits.

The implementation in this commit is largely refactoring to reorganize a
bit how functions are imported, but the implementation happens in
`generate_import_function`.

With this commit, 71/287 imports in the `tests/wasm/main.rs` suite get
hooked up directly to the ES modules, no shims needed!
2018-11-13 13:16:38 -08:00
..
crates cargo +nightly fmt --all 2018-09-26 08:26:00 -07:00
no-std cargo +nightly fmt --all 2018-09-26 08:26:00 -07:00
wasm Add an optimization to directly wire up imported functions 2018-11-13 13:16:38 -08:00
headless.rs cargo +nightly fmt --all 2018-09-26 08:26:00 -07:00
non_wasm.rs cargo +nightly fmt --all 2018-09-26 08:26:00 -07:00
std-crate-no-std-dep.rs cargo +nightly fmt --all 2018-09-26 08:26:00 -07:00