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.
Is there a simple solution to rethrow an exception after access to the parameters of the exnref?
Currently the only solution seems to be:
save the exception in a local variable
push the exception on the stack
pushes the exception's argument values on top of the stack with br_on_exn
inspect the arguments
rethrow depending the inspection result
Sounds not very efficient. I am also not clear if a rethrow is possible after a br_on_exn.
Background: I am working on a compiler for Java (JWebAssembly). The exception there are hierarchical. That I can not use the plain exception type of this spec. I use only one event type. In the parameters of exnref there are the hierarchical exception details.
The text was updated successfully, but these errors were encountered:
rethrow is possible after br_on_exn. And I think you're right that you need to save exnref (pushed onto the stack by catch) to a local to rethrow it again. This is not a problem specific to exnref; wasm is a stack machine, and if you want to use a value on top of the stack (pushed by any instruction) twice, you need to save it to a local, for any instruction.
Also clean up some `table.copy` text.
* WIP on fixes; checkpoint to avoid working over ssh
* Address comments and other fixes
* Add missing `if n=0` case to `memory.fill` and `memory.init`
* Move `n=0` case to the top in `memory.fill`
* Use `\vconst` to ensure constants are well-formed
* Use 3 spaces instead of 4 in `memory.copy` and `table.copy` to prevent
double-spaced numeric list
* Add `_t` subscript to '`\vconst`
* Add cnt=1 case
* Make prose match formal
ioannad
pushed a commit
to ioannad/exception-handling
that referenced
this issue
Feb 23, 2021
Is there a simple solution to
rethrow
an exception after access to the parameters of theexnref
?Currently the only solution seems to be:
br_on_exn
rethrow
depending the inspection resultSounds not very efficient. I am also not clear if a
rethrow
is possible after abr_on_exn
.Background: I am working on a compiler for Java (JWebAssembly). The exception there are hierarchical. That I can not use the plain exception type of this spec. I use only one event type. In the parameters of
exnref
there are the hierarchical exception details.The text was updated successfully, but these errors were encountered: