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

Method add_dt

cranelift/reader/src/parser.rs:297–307  ·  view source on GitHub ↗

Allocate a new dynamic type.

(&mut self, dt: DynamicType, data: DynamicTypeData, loc: Location)

Source from the content-addressed store, hash-verified

295
296 // Allocate a new dynamic type.
297 fn add_dt(&mut self, dt: DynamicType, data: DynamicTypeData, loc: Location) -> ParseResult<()> {
298 self.map.def_dt(dt, loc)?;
299 while self.function.dfg.dynamic_types.next_key().index() <= dt.index() {
300 self.function.dfg.make_dynamic_ty(DynamicTypeData::new(
301 data.base_vector_ty,
302 data.dynamic_scale,
303 ));
304 }
305 self.function.dfg.dynamic_types[dt] = data;
306 Ok(())
307 }
308
309 // Allocate a global value slot.
310 fn add_gv(&mut self, gv: GlobalValue, data: GlobalValueData, loc: Location) -> ParseResult<()> {

Callers 1

parse_preambleMethod · 0.80

Calls 6

OkFunction · 0.85
def_dtMethod · 0.80
make_dynamic_tyMethod · 0.80
newFunction · 0.50
indexMethod · 0.45
next_keyMethod · 0.45

Tested by

no test coverage detected