-
Notifications
You must be signed in to change notification settings - Fork 452
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
Type mismatch when importing globals? #380
Comments
Well, not really an oversight, rather that it's not clear how to make it work right now. I would be inclined to make that an error in "proper Wasm". But the only way we can currently express linking is through the JS API, and that freely interconverts global imports, because it doesn't have any type information about them to begin with. Morally, the implicit conversion should be part of the JS API, not Wasm linking semantics, but either way you could not express the above test in browsers. The only solution would be to make it an error in the spec (since that doesn't consider JS) but not include a test in the suite until we have more stringent ways to express linking in browsers. That said, there is a bug in the interpreter in that it does not perform the coercion for globals that come from other modules, it only does it for host imports. If you'd add "g" to another f32 in the second module then you get a runtime error. So something has to change one way or the other. |
See #384, which tightens the check. That seems to be the right thing to do for the spec. However, for the reasons mentioned above, this can't currently be tested in the browser, so no respective test is included for the time being. |
Fixed by #384 |
These 4 instructions: - i32x4.extadd_pairwise_i16x8_s - i32x4.extadd_pairwise_i16x8_u - i16x8.extadd_pairwise_i8x16_s - i16x8.extadd_pairwise_i8x16_u were merged in WebAssembly#380. Drive-by cleanup to meta/README.md to list all generated files.
…lity-in-array-types Add a test for malformed mutability in array types
I noticed that the spec interpreter fails this test (should be a type mismatch):
Seems like an oversight?
The text was updated successfully, but these errors were encountered: