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

Method check_constant

cranelift/reader/src/parser.rs:419–425  ·  view source on GitHub ↗

Resolve a reference to a constant.

(&self, c: Constant, loc: Location)

Source from the content-addressed store, hash-verified

417
418 // Resolve a reference to a constant.
419 fn check_constant(&self, c: Constant, loc: Location) -> ParseResult<()> {
420 if !self.map.contains_constant(c) {
421 err!(loc, "undefined constant {}", c)
422 } else {
423 Ok(())
424 }
425 }
426
427 // Allocate a new block.
428 fn add_block(&mut self, block: Block, loc: Location) -> ParseResult<Block> {

Callers 1

parse_inst_operandsMethod · 0.80

Calls 2

OkFunction · 0.85
contains_constantMethod · 0.80

Tested by

no test coverage detected