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

Method match_uimm32

cranelift/reader/src/parser.rs:757–766  ·  view source on GitHub ↗

Match and consume a Uimm32 immediate.

(&mut self, err_msg: &str)

Source from the content-addressed store, hash-verified

755
756 // Match and consume a Uimm32 immediate.
757 fn match_uimm32(&mut self, err_msg: &str) -> ParseResult<Uimm32> {
758 if let Some(Token::Integer(text)) = self.token() {
759 self.consume();
760 // Lexer just gives us raw text that looks like an integer.
761 // Parse it as an Uimm32 to check for overflow and other issues.
762 text.parse().map_err(|e| self.error(e))
763 } else {
764 err!(self.loc, err_msg)
765 }
766 }
767
768 // Match and consume a u8 immediate.
769 // This is used for lane numbers in SIMD vectors.

Callers 3

optional_debug_tagsMethod · 0.80
parse_abi_paramMethod · 0.80
parse_instructionMethod · 0.80

Calls 4

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

Tested by

no test coverage detected