MCPcopy Create free account
hub / github.com/explodingcamera/tinywasm / convert_heaptype

Function convert_heaptype

crates/parser/src/conversion.rs:273–283  ·  view source on GitHub ↗
(heap: wasmparser::HeapType)

Source from the content-addressed store, hash-verified

271}
272
273pub(crate) fn convert_heaptype(heap: wasmparser::HeapType) -> Result<WasmType> {
274 match heap {
275 wasmparser::HeapType::Abstract { shared: false, ty: wasmparser::AbstractHeapType::Func } => {
276 Ok(WasmType::RefFunc)
277 }
278 wasmparser::HeapType::Abstract { shared: false, ty: wasmparser::AbstractHeapType::Extern } => {
279 Ok(WasmType::RefExtern)
280 }
281 _ => Err(crate::ParseError::UnsupportedOperator(format!("Unsupported heap type: {heap:?}"))),
282 }
283}

Callers 2

visit_ref_nullMethod · 0.85
process_const_operatorsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected