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

Method add_dss

cranelift/reader/src/parser.rs:269–285  ·  view source on GitHub ↗

Allocate a new stack slot.

(
        &mut self,
        ss: DynamicStackSlot,
        data: DynamicStackSlotData,
        loc: Location,
    )

Source from the content-addressed store, hash-verified

267
268 // Allocate a new stack slot.
269 fn add_dss(
270 &mut self,
271 ss: DynamicStackSlot,
272 data: DynamicStackSlotData,
273 loc: Location,
274 ) -> ParseResult<()> {
275 self.map.def_dss(ss, loc)?;
276 while self.function.dynamic_stack_slots.next_key().index() <= ss.index() {
277 self.function
278 .create_dynamic_stack_slot(DynamicStackSlotData::new(
279 StackSlotKind::ExplicitDynamicSlot,
280 data.dyn_ty,
281 ));
282 }
283 self.function.dynamic_stack_slots[ss] = data;
284 Ok(())
285 }
286
287 // Resolve a reference to a dynamic stack slot.
288 fn check_dss(&self, dss: DynamicStackSlot, loc: Location) -> ParseResult<()> {

Callers 1

parse_preambleMethod · 0.80

Calls 6

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

Tested by

no test coverage detected