MCPcopy Index your code
hub / github.com/explodingcamera/tinywasm / exec_return

Method exec_return

crates/tinywasm/src/interpreter/executor.rs:1080–1096  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

1078 }
1079
1080 fn exec_return(&mut self) -> bool {
1081 self.store.value_stack.truncate_keep_counts(self.cf.locals_base, self.func.results);
1082 let Some(caller) = self.store.call_stack.pop_frame(self.call_stack_base) else {
1083 return true;
1084 };
1085 if caller.func_addr == self.cf.func_addr {
1086 self.cf = caller;
1087 return false;
1088 }
1089 let wasm_func = self.store.state.get_wasm_func(caller.func_addr);
1090 self.func = wasm_func.func.clone();
1091 if wasm_func.owner != self.module.idx() {
1092 self.module = self.store.get_module_instance_internal(wasm_func.owner);
1093 }
1094 self.cf = caller;
1095 false
1096 }
1097
1098 #[inline(always)]
1099 fn finish_return(&mut self) -> bool {

Callers 1

execMethod · 0.80

Calls 5

truncate_keep_countsMethod · 0.80
pop_frameMethod · 0.80
get_wasm_funcMethod · 0.80
idxMethod · 0.80

Tested by

no test coverage detected