From 7d2a0a7528e35fbea35f4f6f7efe0602620a165a Mon Sep 17 00:00:00 2001 From: Henry Gressmann Date: Tue, 5 Dec 2023 17:02:10 +0100 Subject: [PATCH] chore: remove some wasm2 types for now Signed-off-by: Henry Gressmann --- crates/parser/src/conversion.rs | 10 +++++++++- crates/types/src/instructions.rs | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/crates/parser/src/conversion.rs b/crates/parser/src/conversion.rs index 86810a1..7121922 100644 --- a/crates/parser/src/conversion.rs +++ b/crates/parser/src/conversion.rs @@ -71,8 +71,16 @@ pub(crate) fn convert_blocktype(blocktype: &wasmparser::BlockType) -> BlockArgs use wasmparser::BlockType::*; match blocktype { Empty => BlockArgs::Empty, + + // We should maybe have all this in a single variant for our custom bytecode + + // TODO: maybe solve this differently so we can support 128-bit values + // without having to increase the size of the WasmValue enum Type(ty) => BlockArgs::Type(convert_valtype(ty)), - FuncType(ty) => BlockArgs::FuncType(*ty), + + // Wasm 2.0 + FuncType(_ty) => unimplemented!(), + // FuncType(ty) => BlockArgs::FuncType(*ty), } } diff --git a/crates/types/src/instructions.rs b/crates/types/src/instructions.rs index 2be0ce7..13f8ce0 100644 --- a/crates/types/src/instructions.rs +++ b/crates/types/src/instructions.rs @@ -4,7 +4,8 @@ use super::{FuncAddr, GlobalAddr, LabelAddr, LocalAddr, TableAddr, TypeAddr, Val pub enum BlockArgs { Empty, Type(ValType), - FuncType(u32), + // TODO: wasm 2.0 + // FuncType(u32), } /// Represents a memory immediate in a WebAssembly memory instruction.