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

Method parse

cranelift/assembler-x64/meta/src/dsl/encoding.rs:519–525  ·  view source on GitHub ↗

Parse a slice of `bytes` into a set of prefixes, returning both the configured [`Prefixes`] as well as any remaining bytes.

(mut bytes: &[u8])

Source from the content-addressed store, hash-verified

517 /// Parse a slice of `bytes` into a set of prefixes, returning both the
518 /// configured [`Prefixes`] as well as any remaining bytes.
519 fn parse(mut bytes: &[u8]) -> (Self, &[u8]) {
520 let mut prefixes = Self::default();
521 while !bytes.is_empty() && prefixes.try_assign(bytes[0]).is_ok() {
522 bytes = &bytes[1..];
523 }
524 (prefixes, bytes)
525 }
526
527 /// Attempt to parse a `byte` as a prefix and, if successful, assigns it to
528 /// the correct prefix group.

Callers 15

dump_eh_frameFunction · 0.45
match_imm64Method · 0.45
match_uimm64Method · 0.45
match_uimm32Method · 0.45
match_uimm8Method · 0.45
optional_offset32Method · 0.45
optional_offset_imm64Method · 0.45
match_ieee16Method · 0.45
match_ieee32Method · 0.45
match_ieee64Method · 0.45
match_ieee128Method · 0.45

Calls 3

is_okMethod · 0.80
try_assignMethod · 0.80
is_emptyMethod · 0.45

Tested by 1

dump_eh_frameFunction · 0.36