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
Currently, only return instructions and implicit block/function returns are supported. Add support for branch instructions, which make use of labels.
In order to do this, the execution model probably needs to be changed to a non-recursive approach. We can keep track of instruction sequences and the current position in the sequence in a stack, and so label index n is the _n_th (zero-indexed) label on the stack.
In the WASM spec, values, frames and labels conceptually share the same stack. In our implementation, we can use separate stacks while including the position in the stack in frames and labels. This way branch and return instructions can drop the correct number of stack values. Frames also need to know their relative position between labels to discard any labels on top of them on return.
The text was updated successfully, but these errors were encountered:
Currently, only return instructions and implicit block/function returns are supported. Add support for branch instructions, which make use of labels.
In order to do this, the execution model probably needs to be changed to a non-recursive approach. We can keep track of instruction sequences and the current position in the sequence in a stack, and so label index n is the _n_th (zero-indexed) label on the stack.
In the WASM spec, values, frames and labels conceptually share the same stack. In our implementation, we can use separate stacks while including the position in the stack in frames and labels. This way branch and return instructions can drop the correct number of stack values. Frames also need to know their relative position between labels to discard any labels on top of them on return.
The text was updated successfully, but these errors were encountered: