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

Method visit_ref_null

winch/codegen/src/visitor.rs:2122–2135  ·  view source on GitHub ↗
(&mut self, hty: HeapType)

Source from the content-addressed store, hash-verified

2120 }
2121
2122 fn visit_ref_null(&mut self, hty: HeapType) -> Self::Output {
2123 match hty {
2124 HeapType::FUNC => {
2125 let ptr_type = self.env.ptr_type();
2126 match ptr_type {
2127 WasmValType::I64 => self.context.stack.push(Val::i64(0)),
2128 WasmValType::I32 => self.context.stack.push(Val::i32(0)),
2129 _ => bail!(CodeGenError::unsupported_wasm_type()),
2130 }
2131 Ok(())
2132 }
2133 _ => Err(format_err!(CodeGenError::unsupported_wasm_type())),
2134 }
2135 }
2136
2137 fn visit_ref_is_null(&mut self) -> Self::Output {
2138 let (zero, size) = match self.env.ptr_type() {

Callers

nothing calls this directly

Calls 4

i64Function · 0.85
OkFunction · 0.85
ptr_typeMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected