MCPcopy Index your code
hub / github.com/explodingcamera/tinywasm / convert_reftype

Function convert_reftype

crates/parser/src/conversion.rs:206–215  ·  view source on GitHub ↗
(reftype: wasmparser::RefType)

Source from the content-addressed store, hash-verified

204}
205
206pub(crate) fn convert_reftype(reftype: wasmparser::RefType) -> Result<WasmType> {
207 match reftype {
208 _ if reftype.is_func_ref() => Ok(WasmType::RefFunc),
209 _ if reftype.is_extern_ref() => Ok(WasmType::RefExtern),
210 _ => Err(crate::ParseError::UnsupportedOperator(format!(
211 "Unsupported reference type: {reftype:?}, {:?}",
212 reftype.heap_type()
213 ))),
214 }
215}
216
217pub(crate) fn convert_valtype(valtype: &wasmparser::ValType) -> Result<WasmType> {
218 match valtype {

Callers 4

convert_module_elementFunction · 0.85
convert_module_importFunction · 0.85
convert_module_tableFunction · 0.85
convert_valtypeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected