wasm-bindgen/crates
Alex Crichton 42053ddd4e Move closure shims into the descriptor
Currently closure shims are communicated to JS at runtime, although at
runtime the same constant value is always passed to JS! More pressing,
however, work in #1002 requires knowledge of closure descriptor indices
at `wasm-bindgen` time which is not currently known.

Since the closure descriptor shims and such are already constant values,
this commit moves the descriptor function indices into the *descriptor*
for a closure/function pointer. This way we can learn about these values
at `wasm-bindgen` time instead of only knowing them at runtime.

This should have no semantic change on users of `wasm-bindgen`, although
some closure invocations may be slightly speedier because there's less
arguments being transferred over the boundary. Overall though this will
help #1002 as the closure shims that the Rust compiler generates may not
be the exact ones we hand out to JS, but rather wrappers around them
which do `anyref` business things.
2018-11-29 12:42:44 -08:00
..
backend Move closure shims into the descriptor 2018-11-29 12:42:44 -08:00
cli Add a #[wasm_bindgen(start)] attribute 2018-11-28 22:11:15 -08:00
cli-support Move closure shims into the descriptor 2018-11-29 12:42:44 -08:00
futures Run rustfmt over everything 2018-11-27 12:07:59 -08:00
gc Run rustfmt over everything 2018-11-27 12:07:59 -08:00
js-sys Run rustfmt over everything 2018-11-27 12:07:59 -08:00
macro Add a #[wasm_bindgen(start)] attribute 2018-11-28 22:11:15 -08:00
macro-support Add a #[wasm_bindgen(start)] attribute 2018-11-28 22:11:15 -08:00
shared Add a #[wasm_bindgen(start)] attribute 2018-11-28 22:11:15 -08:00
test Bump to 0.2.28 2018-11-12 09:28:01 -08:00
test-macro Consistently use extern "C" 2018-11-27 12:27:00 -08:00
threads-xform Run rustfmt over everything 2018-11-27 12:07:59 -08:00
typescript Run rustfmt over everything 2018-11-27 12:07:59 -08:00
wasm-interpreter Move closure shims into the descriptor 2018-11-29 12:42:44 -08:00
web-sys Consistently use extern "C" 2018-11-27 12:27:00 -08:00
webidl Run rustfmt over everything 2018-11-27 12:07:59 -08:00
webidl-tests Consistently use extern "C" 2018-11-27 12:27:00 -08:00