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

Method match_uimm64

cranelift/reader/src/parser.rs:744–754  ·  view source on GitHub ↗

Match and consume a Uimm64 immediate.

(&mut self, err_msg: &str)

Source from the content-addressed store, hash-verified

742
743 // Match and consume a Uimm64 immediate.
744 fn match_uimm64(&mut self, err_msg: &str) -> ParseResult<Uimm64> {
745 if let Some(Token::Integer(text)) = self.token() {
746 self.consume();
747 // Lexer just gives us raw text that looks like an integer.
748 // Parse it as an Uimm64 to check for overflow and other issues.
749 text.parse()
750 .map_err(|_| self.error("expected u64 decimal immediate"))
751 } else {
752 err!(self.loc, err_msg)
753 }
754 }
755
756 // Match and consume a Uimm32 immediate.
757 fn match_uimm32(&mut self, err_msg: &str) -> ParseResult<Uimm32> {

Callers 1

parse_stack_slot_declMethod · 0.80

Calls 4

tokenMethod · 0.80
consumeMethod · 0.45
parseMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected