-
Notifications
You must be signed in to change notification settings - Fork 35
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
Could the different try
variants be combined?
#131
Comments
Thank you so much @tlively! I am in favour of your suggestion. I think it would simplify the formal writeup a lot, and, at least at first glance I can't see any complications it could create. |
I'd like to keep The other reason is that our LLVM toolchain will not use it anyway. Current our LLVM toolchain uses a variant of Windows IR that uses |
The new explainer has unified catch and catch_all, but not unwind. That seems reasonable to me. We should still simplify the currently described grammar to
and avoid making a special-case restriction for the empty case.
That is actually fine, and consistent with all other constructs in Wasm: everywhere else, lists can be empty just fine. The closest parallel probably is |
Sorry for catching up on this late. I agree that the restriction that a |
This was suggested here: WebAssembly#131 (comment) Closes WebAssembly#131.
This was suggested here: #131 (comment) Closes #131.
* [interpreter] Simplify zero-len and drop semantics * Update overview * [spec] Change drop semantics * [spec] Forgot to adjust prose for *.init ops * [test] Update generated tests for OOBs and dropping changes (WebAssembly#131)
Kudos to @ioannad for the great write up in #87!
One thing that stood out to me was the large number of
try
variants, and I wanted to ask about them in a new issue to avoid cluttering up that other thread. We currently have the following:It's clear that try-catch_br needs to be its own separate variant, but I wonder if it would be simpler to combine the other variants:
One quirk of this formulation is that it would allow for
try bt intr* end
, which is completely useless. I imagine it would just have the semantics of a normal block. The other obvious change is that this formulation would allow atry
to have both catches and an unwind. I imagine the semantics of that would be similar to the semantics of this:Specifically, if the
catch
body rethrows, theunwind
body is still run afterwards. So this would just allow for saving a level oftry
nesting.I don't feel strongly about this at all since it is just a surface syntax change, but I think it might be a nice simplification. I'm curious to hear what other people think and whether this change would complicate anything I've overlooked.
The text was updated successfully, but these errors were encountered: