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

Method add_ss

cranelift/reader/src/parser.rs:246–257  ·  view source on GitHub ↗

Allocate a new stack slot.

(&mut self, ss: StackSlot, data: StackSlotData, loc: Location)

Source from the content-addressed store, hash-verified

244
245 // Allocate a new stack slot.
246 fn add_ss(&mut self, ss: StackSlot, data: StackSlotData, loc: Location) -> ParseResult<()> {
247 self.map.def_ss(ss, loc)?;
248 while self.function.sized_stack_slots.next_key().index() <= ss.index() {
249 self.function.create_sized_stack_slot(StackSlotData::new(
250 StackSlotKind::ExplicitSlot,
251 0,
252 0,
253 ));
254 }
255 self.function.sized_stack_slots[ss] = data;
256 Ok(())
257 }
258
259 // Resolve a reference to a stack slot.
260 fn check_ss(&self, ss: StackSlot, loc: Location) -> ParseResult<()> {

Callers 1

parse_preambleMethod · 0.80

Calls 6

OkFunction · 0.85
def_ssMethod · 0.80
newFunction · 0.50
indexMethod · 0.45
next_keyMethod · 0.45

Tested by

no test coverage detected