-
Notifications
You must be signed in to change notification settings - Fork 36
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
Proposal to remove unwind
#153
Comments
Thanks for bringing this up. Yes, that sounds reasonable to me. Any hypothetical addition of more forms of terminating non-local control transfer (if they're even desirable) would inevitably change the contextual observations of existing code, and thus invalidate assumptions it might have. Unwind can't prevent that -- nothing generally can AFAICT. But I don't think it ever was an assumption that this ought to be possible either. Combining code from different sources/runtimes will always require extra care and possible barriers, handling which is the purpose of e.g. the IT proposal. Also, if we included a special feature along these lines, then it should at least be designed such that it can effectively express common constructs like finally clauses, with isn't the case with unwind (it would require code duplication that is exponential in the nesting depth of finally constructs). Otherwise, those constructs will likely be compiled to catch_all anyway, and any supposed forward compatibility is already moot. Finally, unwind has unusual behaviour relative to the Wasm instruction set, since it would be the only block construct where |
Oh good; I had only recently noticed |
I support it as well because of all the reasons I stated in the other discussion thread. I agree the peculiarity of |
SpiderMonkey would also be in favor of deferring |
It looks people have generally agreed on removing `unwind` in the MVP spec, as it overlaps with `catch_all` in functionality. Fixes WebAssembly#153.
It looks people have generally agreed on removing `unwind` in the MVP spec, as it overlaps with `catch_all` in functionality. Fixes WebAssembly#153.
Relevant links: WebAssembly/exception-handling#153 WebAssembly/exception-handling#156 [email protected] Bug: v8:8091 Change-Id: I0deeb9665c6648e643d0aa4f310b7676e1c2fa32 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2959624 Commit-Queue: Thibaud Michaud <[email protected]> Reviewed-by: Clemens Backes <[email protected]> Cr-Commit-Position: refs/heads/master@{#75135}
unwind
is similar tocatch_all
and in the semantics we've settled on it is also strictly less expressive thancatch_all
.unwind
can be defined in terms ofcatch_all
andrethrow
, so any program that usesunwind
could equivalently usecatch_all
andrethrow
instead.unwind
was originally meant to be a forward-compatibility feature bridging the gap between the current EH proposal and some future proposal for additional non-local control flow. My personal concern about this is that we have not discussed making an exception to WebAssembly's usual backwards compatibility guarantees forunwind
, and it is not possible to both maintain backwards compatibility and allow for a graceful transition to different (currently unspecified) semantics.Since
unwind
does not increase the expressiveness of the proposal and does not seem useful for other reasons such as forward compatibility, I propose that we simplify the proposal by removing it.Does that sound reasonable, @aheejin, @RossTate, @rossberg, and @ioannad?
The text was updated successfully, but these errors were encountered: