MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / push_frame

Method push_frame

cranelift/interpreter/src/interpreter.rs:253–263  ·  view source on GitHub ↗
(&mut self, function: &'a Function)

Source from the content-addressed store, hash-verified

251 }
252
253 fn push_frame(&mut self, function: &'a Function) {
254 if let Some(frame) = self.frame_stack.iter().last() {
255 self.frame_offset += frame.function().fixed_stack_size() as usize;
256 }
257
258 // Grow the stack by the space necessary for this frame
259 self.stack
260 .extend(iter::repeat(0).take(function.fixed_stack_size() as usize));
261
262 self.frame_stack.push(Frame::new(function));
263 }
264 fn pop_frame(&mut self) {
265 if let Some(frame) = self.frame_stack.pop() {
266 // Shorten the stack after exiting the frame

Callers 1

callMethod · 0.45

Calls 9

fixed_stack_sizeMethod · 0.80
repeatFunction · 0.50
newFunction · 0.50
lastMethod · 0.45
iterMethod · 0.45
functionMethod · 0.45
extendMethod · 0.45
takeMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected