Conversation
sbc100
approved these changes
Apr 7, 2020
| (unreachable) | ||
| ) | ||
| ) | ||
|
|
| (export "__data_end" (global $global$1)) | ||
| (global $global$0 (mut i32) (i32.const 66208)) | ||
| (global $global$1 i32 (i32.const 658)) | ||
| (func $foo (param i64) (result i64) |
Member
There was a problem hiding this comment.
I was expecting to see imports and exports of i64 functions here... is putting it the table enough to test the legalization?
Member
Author
There was a problem hiding this comment.
Yes, the legalization path would create a legalized dynCall with i32 pairs etc.
kripken
added a commit
to emscripten-core/emscripten
that referenced
this pull request
Apr 10, 2020
This adds a flag WASM_BIGINT which enables this feature, with which we let the JS VM use a JS BigInt for a wasm i64. In that case we don't need to legalize i64s into pairs of i32s. This is fairly straightforward, but we do need to modify the JS code of each library method that receives or returns an i64. Tests verify that we can send and receive i64s from wasm to JS, and also that a dynCall works. This depends on WebAssembly/binaryen#2726 for that.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If wasm-emscripten-finalize is given the BigInt flag, then we will
be using BigInts on the JS side, and need no legalization at all
since i64s will just be BigInts.