mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
wasm_interp: end all function blocks on RETURN op
This commit is contained in:
parent
ad2973cd8d
commit
513a346fe1
1 changed files with 2 additions and 0 deletions
|
@ -276,6 +276,8 @@ impl<'a, I: ImportDispatcher> Instance<'a, I> {
|
|||
}
|
||||
|
||||
fn do_return(&mut self) -> Action {
|
||||
self.block_loop_addrs
|
||||
.truncate(self.outermost_block as usize);
|
||||
if let Some((return_addr, block_depth)) = self.call_stack.pop_frame() {
|
||||
if self.call_stack.is_empty() {
|
||||
// We just popped the stack frame for the entry function. Terminate the program.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue