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

Method byte_for_value

cranelift/codegen/meta/src/cdsl/settings.rs:48–59  ·  view source on GitHub ↗
(&self, v: bool)

Source from the content-addressed store, hash-verified

46 }
47
48 fn byte_for_value(&self, v: bool) -> u8 {
49 match self.specific {
50 SpecificSetting::Bool(BoolSetting { bit_offset, .. }) => {
51 if v {
52 1 << bit_offset
53 } else {
54 0
55 }
56 }
57 _ => panic!("byte_for_value shouldn't be used for non-boolean settings."),
58 }
59 }
60
61 fn byte_mask(&self) -> u8 {
62 match self.specific {

Callers 1

layoutMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected