MCPcopy Create free account
hub / github.com/explodingcamera/tinywasm / exec_call_self

Method exec_call_self

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

Source from the content-addressed store, hash-verified

1005 }
1006
1007 fn exec_call_self(&mut self) -> Result<(), Trap> {
1008 self.charge_call_fuel(FUEL_COST_CALL_TOTAL);
1009
1010 self.store.call_stack.push(self.cf)?;
1011 let Ok(locals_base) = self.store.value_stack.enter_locals(&self.func.params, &self.func.locals) else {
1012 cold_path();
1013 return Err(Trap::CallStackOverflow);
1014 };
1015 self.cf = CallFrame::new(self.cf.func_addr, locals_base, self.func.locals);
1016
1017 Ok(())
1018 }
1019
1020 fn exec_return_call_self(&mut self) -> Result<(), Trap> {
1021 self.charge_call_fuel(FUEL_COST_CALL_TOTAL);

Callers 1

execMethod · 0.80

Calls 3

charge_call_fuelMethod · 0.80
enter_localsMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected