You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 25, 2025. It is now read-only.
We have an old issue #11 for this, but it is 4 years old so I think it is worth opening a new one.
Recently Google's J2CL team is using wasm and they asked for finally to be added in the spec, citing the complexity of code duplicating transformation in case there are many branches/returns from the try part and also code size increase, which I think is a valid concern. Without finally, in case we have four ways of exiting a try block, such as 1. normal fallthrough 2. exception 3. return 4. branch, we might end up duplicating the same code four times.
finally support was discussed briefly years ago in #11, but people thought it could be transformed into try-catch with code duplication so it was not strictly necessary, but I'd like to ask you on your opinions now again.
@jakobkummerow suggested implementing it in the engine may not be trivial either, but it can be still worth having it in the spec because of the code size.