Converts a wasmparser value type to a wasmtime type
(&self, ty: wasmparser::ValType)
| 2565 | |
| 2566 | /// Converts a wasmparser value type to a wasmtime type |
| 2567 | fn convert_valtype(&self, ty: wasmparser::ValType) -> WasmResult<WasmValType> { |
| 2568 | Ok(match ty { |
| 2569 | wasmparser::ValType::I32 => WasmValType::I32, |
| 2570 | wasmparser::ValType::I64 => WasmValType::I64, |
| 2571 | wasmparser::ValType::F32 => WasmValType::F32, |
| 2572 | wasmparser::ValType::F64 => WasmValType::F64, |
| 2573 | wasmparser::ValType::V128 => WasmValType::V128, |
| 2574 | wasmparser::ValType::Ref(t) => WasmValType::Ref(self.convert_ref_type(t)?), |
| 2575 | }) |
| 2576 | } |
| 2577 | |
| 2578 | /// Converts a wasmparser reference type to a wasmtime type |
| 2579 | fn convert_ref_type(&self, ty: wasmparser::RefType) -> WasmResult<WasmRefType> { |
no test coverage detected