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

Function ty_bits

cranelift/codegen/src/machinst/helpers.rs:7–9  ·  view source on GitHub ↗

Returns the size (in bits) of a given type.

(ty: Type)

Source from the content-addressed store, hash-verified

5
6/// Returns the size (in bits) of a given type.
7pub fn ty_bits(ty: Type) -> usize {
8 ty.bits() as usize
9}
10
11/// Align a size up to a power-of-two alignment.
12pub(crate) fn align_to<N>(x: N, alignment: N) -> N

Callers 15

gen_copy_arg_to_regsMethod · 0.85
gen_call_argsMethod · 0.85
gen_call_retsMethod · 0.85
compute_arg_locsMethod · 0.85
put_input_in_regsFunction · 0.85
is_mergeable_loadFunction · 0.85
compute_arg_locsMethod · 0.85
get_as_extended_valueFunction · 0.85
gen_loadMethod · 0.85
gen_storeMethod · 0.85
from_tyMethod · 0.85

Calls 1

bitsMethod · 0.45

Tested by

no test coverage detected