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

Method add_alias_region

cranelift/reader/src/parser.rs:334–346  ·  view source on GitHub ↗

Allocate an alias region.

(
        &mut self,
        ar: ir::AliasRegion,
        data: ir::AliasRegionData,
        loc: Location,
    )

Source from the content-addressed store, hash-verified

332
333 // Allocate an alias region.
334 fn add_alias_region(
335 &mut self,
336 ar: ir::AliasRegion,
337 data: ir::AliasRegionData,
338 loc: Location,
339 ) -> ParseResult<()> {
340 // Ensure regions are defined in order (region0, region1, ...).
341 if self.function.dfg.alias_regions.len() != ar.index() {
342 return err!(loc, "duplicate alias region {}", ar);
343 }
344 self.function.dfg.alias_regions.push(data);
345 Ok(())
346 }
347
348 // Allocate a new signature.
349 fn add_sig(

Callers 1

parse_preambleMethod · 0.80

Calls 4

OkFunction · 0.85
lenMethod · 0.45
indexMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected