-
Notifications
You must be signed in to change notification settings - Fork 472
handling dead code #90
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
Comments
Do sexpr-wasm-prototype or v8-native-prototype have the stmt=expr unification? I thought they didn't, which is why that line would be an error. However, even without stmt=expr, you run into the same question, just at statement level ( |
I guess dead code in general is probably not worth preventing, but the particular case using the value of a return still seems strange to me. For example, this fails with a type mismatch error:
clearly the type of a return statement is assumed to be the type of its child expression, but that doesn't really make any sense to me. |
No, the type of a return statement is polymorphic, i.e., whatever the
As an expression, a return must be allowed to have any type. This is I'm not sure what the issue is here. There are a million ways to write |
On Wed, Sep 30, 2015 at 2:07 PM, rossberg-chromium <[email protected]
So the expression `if(c) (break[M] ) (break[N] )" typechecks in
|
Yes. |
OK, makes sense. |
This was accidentally omitted.
Issue in Shuffle s/result[i] = b[s[i] - S.lanes]/result[i] = b[s[i] - S.lanes Issue in Bit Shifts s/def S.shl(a, x):/def S.shl(a, y):
* [spec] Normative: Store is per agent cluster With the WebAssembly threads proposal, a single Memory can be shared between multiple agents within an agent cluster. This patch associates a WebAssembly store with an agent cluster, rather than an agent, and updates the WebAssembly JS API to define the store for an agent as the store for its surrounding agent cluster. * [spec] Normative: Define serialization for SAB Memory The semantics here are - forStorage serialization is disallowed - Transfers are only permitted within an agent cluster - Transfer of Memory backed by SharedArrayBuffers makes the buffer available in the source and the destination, with no resulting detached buffer. - Transfer of Memory backed by ArrayBuffers is disallowed. This specification attempts to be well-integrated with HTML by defining n terms of the serialization behavior of Memory as a platform object, and using the sub-serialization of the underlying SharedArrayBuffer to check for transferring within an agent cluster, and not to IndexedDB. Based on the earlier PR at WebAssembly/design#1074
Following the discussions in WebAssembly#90, it seems desirable and less error-prone to make `rethrow` and `br_on_exn` trap in case the value on top of the stack is of `nullref` type. Closes WebAssembly#90.
In WebAssembly#90 it was decided to move the event section between memory section and global section. This change is reflected in the next paragraph, but not in the introduction.
Separate subsumption from instr sequencing; principal typing
Merge with WebAssembly/spec branch `wasm-3.0`
* Rename "index type" to "address type" across the spec * Update "index type" to "address type" in the spec interpreter * Update section underlines It is very important that you have precisely the correct number of dots. It would be too much work for the computer otherwise. * Rename "address type" to "addr type" in the spec interpreter * Revert one stray interpreter update
@AndrewScheidecker and I were chatting yesterday about the expression value of the return statement, specifically should something like this be allowed:
This looks like an error to me, and sexpr-wasm-prototype and v8-native-prototype treat is an error. But it is currently allowed in ml-proto. @sunfishcode also suggested that it might be useful to allow dead code for non-optimizing wasm.
Thoughts?
The text was updated successfully, but these errors were encountered: