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

Method match_gv

cranelift/reader/src/parser.rs:611–619  ·  view source on GitHub ↗

Match and consume a global value reference.

(&mut self, err_msg: &str)

Source from the content-addressed store, hash-verified

609
610 // Match and consume a global value reference.
611 fn match_gv(&mut self, err_msg: &str) -> ParseResult<GlobalValue> {
612 if let Some(Token::GlobalValue(gv)) = self.token() {
613 self.consume();
614 if let Some(gv) = GlobalValue::with_number(gv) {
615 return Ok(gv);
616 }
617 }
618 err!(self.loc, err_msg)
619 }
620
621 // Match and consume a function reference.
622 fn match_fn(&mut self, err_msg: &str) -> ParseResult<FuncRef> {

Callers 3

parse_inst_operandsMethod · 0.80

Calls 3

OkFunction · 0.85
tokenMethod · 0.80
consumeMethod · 0.45

Tested by

no test coverage detected