forked from rustwasm/wasm-bindgen
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When returning a ptr/length for allocations and such wasm-bindgen's generated JS would previously return an array with two elements. It turns out this doesn't optimize well in all engines! (See rustwasm#1031). It looks like we can optimize the array destructuring a bit more, but this is all generated code which doesn't need to be too readable so we can also remove the temporary allocation entirely and just pass the second element of this array through a global instead of the return value. Closes rustwasm#1031
- Loading branch information
1 parent
8520a54
commit c915870
Showing
3 changed files
with
22 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters