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

Function value_type

crates/cranelift/src/lib.rs:135–144  ·  view source on GitHub ↗

Returns the corresponding cranelift type for the provided wasm type.

(isa: &dyn TargetIsa, ty: WasmValType)

Source from the content-addressed store, hash-verified

133
134/// Returns the corresponding cranelift type for the provided wasm type.
135fn value_type(isa: &dyn TargetIsa, ty: WasmValType) -> ir::types::Type {
136 match ty {
137 WasmValType::I32 => ir::types::I32,
138 WasmValType::I64 => ir::types::I64,
139 WasmValType::F32 => ir::types::F32,
140 WasmValType::F64 => ir::types::F64,
141 WasmValType::V128 => ir::types::I8X16,
142 WasmValType::Ref(rt) => reference_type(rt.heap_type, isa.pointer_type()),
143 }
144}
145
146/// Get the Cranelift signature for all array-call functions, that is:
147///

Callers 9

scan_wordMethod · 0.85
nextMethod · 0.85
wasm_call_signatureFunction · 0.85
make_globalMethod · 0.85
translate_resumeFunction · 0.85
translate_operatorFunction · 0.85

Calls 2

reference_typeFunction · 0.85
pointer_typeMethod · 0.45

Tested by

no test coverage detected