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

Method new

cranelift/interpreter/src/frame.rs:24–31  ·  view source on GitHub ↗

Construct a new [Frame] for a function. This allocates a slot in the hash map for each SSA `Value` (renamed to `ValueRef` here) which should mean that no additional allocations are needed while interpreting the frame.

(function: &'a Function)

Source from the content-addressed store, hash-verified

22 /// Construct a new [Frame] for a function. This allocates a slot in the hash map for each SSA `Value` (renamed to
23 /// `ValueRef` here) which should mean that no additional allocations are needed while interpreting the frame.
24 pub fn new(function: &'a Function) -> Self {
25 let num_slots = function.dfg.num_values();
26 trace!("Create new frame for function: {}", function.signature);
27 Self {
28 function,
29 registers: vec![None; num_slots],
30 }
31 }
32
33 /// Retrieve the actual value associated with an SSA reference.
34 #[inline]

Callers

nothing calls this directly

Calls 1

num_valuesMethod · 0.80

Tested by

no test coverage detected