Conversation
…truction renaming (#964)
Caches the generated Wasm buffer instead of re-generating it for each test. Refs WebAssembly/spec#972
mininum -> minimum
This speeds up the WasmModuleBuilder enormously. It follows this V8-side CL: https://crrev.com/c/1508352 It also adopts a few other minor changes to the wasm-module-builder.js file from the v8 side.
Updating the wasm-module-builder.js broke the jsapi tests. I was under the impression that travis would run them, but it seems like this is not the case. Rolling the updated version to v8 failed then: https://crrev.com/c/1516684 This fixes two things: 1) {toBuffer} returns a Uint8Array as before, not an ArrayBuffer, 2) {addExplicitSection} expects a byte sequence, hence pass the truncated buffer instead of the {Binary} object.
The store variable was not defined before it was used, and the result was not saved.
Fixes #986.
I missed this in #988.
The full error message generated by the interpreter is "unreachable executed", but all of the other tests check for just "unreachable".
…p strings. (#1076) One test in elem.wast expects the trap message "uninitialized element 7", which requires wasm runtimes to be able to print the element index. This is obviously nice for humans, but can be inconvenient to implement in wasm implementations which use signals to implement traps, as it requires special code to preserve the element index. Other tests eg. in imports.wast don't include the number in the expected message. It seems better to allow implementations to decide for themselves whether to print the index number, rather than having it be an outright requirement of the spec test.
convert_wast_to_js uses multiprocessing to parallelize compilation of wast test cases. When an error happens, the logging code expects the result to be a process exit code and a CompletedProcess instance. This isn't possible, so this commit updates the result to be a CompletedProcess and modifies the code to manually check the exit code.
I will be taking over Dan's duties as editor.
Similar to #1076, don't include index numbers in expected error messages from validation. This allows implementations to avoid creating dynamically formatted strings for validation error messages. Admittedly this isn't a huge burden, but it does seem like something that shouldn't be required to pass the spec test.
* Test that INT_MIN/0 gets a divide-by-zero trap. * Test Unicode characters that differ with NFC, NFD, NFKC, and NFKD. There are three characters whose normalization forms under NFC, NFD, NFKC, and NFKD are all different. Test them. * Add a testcase for unreachable in an if-then with no else.
according to https://webassembly.github.io/spec/core/exec/instructions.html#exec-return the `Return` instruction pops the top of the stack, until the next frame. The equivalent in the reference interpreter should be to set the value stack to `[]`. This is what is happening for `Break` as well. So for consistency, also do it here. This has no visible effect: If the first instruction is `Returning`, the stack is ignored.
The URL points to latest spec draft so it should be just ECMAScript and not ES2018. This also make it consistent with [WebAssembly JS API Normative Reference](https://www.w3.org/TR/2019/PR-wasm-js-api-1-20191001/#normative)
Member
Author
|
There were only a few merge conflicts:
|
Member
Author
|
Whoops, accidentally pushed this as a squash commit w/ GH UI. I've force-pushed a merge commit instead. |
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.
Fixes #146.