forked from WebAssembly/spec
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge with upstream/wasm-3.0+exn
#32
Merged
Merged
Conversation
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
DefaultValue will return undefined for externref as before, but for other nullable reference types will return null. For non-nullable reference types, operations like grow and set should error if the value to set is missing. Also adds WPT tests for the error cases. This requires some updates to wasm-module-builder.js as well. Fixes issue WebAssembly#501
Instead of allowing ToWebAssemblyValue to throw a TypeError, explicitly catch any exceptions and throw a WebAssembly.LinkError.
Instead of allowing ToWebAssemblyValue to throw a TypeError, explicitly catch any exceptions and throw a WebAssembly.LinkError.
Co-authored-by: Andreas Rossberg <[email protected]>
[js-api][test] Refine DefaultValue for new reference types
[js-api] Throw consistent exns in "read the imports"
Test that validation allows `call_indirect` to have a type immediate that is a supertype of or unrelated to the table element type and that the runtime behavior is correct in these cases.
The first operand for `ref.cast` should be a reference type. However, the code example in `MVP.md` seems to have a heaptype which is invalid. (Assuming the `$C` is defined as follows based on the context) ``` (module (type $A (sub (struct))) (type $B (sub $A (struct (field i32)))) (type $C (sub $B (struct (field i32 i32)))) (func $castBtoC (param $x (ref $B)) (result (ref $C)) (ref.cast $C (local.get $x)) ) ) ``` ``` $ wasm -d test.wat test.wat:6.15-6.17: syntax error: unexpected token ``` (Where `wasm` is a reference interpreter built from WebAssembly/gc@0ba84fb)
Fix an example code for ref.cast in MVP.md
[test] Test `call_indirect` subtyping more thoroughly
It produces a non-null `(ref i31)` not an `i31ref` aka `(ref null i31)`.
Fix typing of `ref.i31` in the appendix
I noticed that Wasmtime was passing the spec tests despite having bits that were known to be unimplemented. This should help the tests exercise those corners of the spec. Notably: * Setting `i31ref` globals. * Initializing tables and globals with `(ref.i31 (global.get $g))`. * Table operations on `i31ref` tables. * Accessing `anyref` globals and tables that are actually `i31ref`s. This is interesting to exercise outside of general subtyping because we have different paths in our inline GC barriers for `anyref`s that are actually `i31ref`s.
Add additional `i31ref` spec tests
The prose incorrectly used "larger than or equal to" when it should have used just "larger than." The formalism was already correct. Fixes WebAssembly#536.
…py-bounds [Spec] Fix bounds check prose for array.fill and array.copy
Fix wrong type expansion
Co-authored-by: Manos Koukoutos <[email protected]>
More fixes and tests around element segments
Copy-paste bug. Don't repeatedly assert the first element's value, but each element in the table.
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.
This patch merges in the latest changes from WebAssembly/spec branch
wasm-3.0+exn
.