From 7b9b3ec681e68280399d9c67e01433c2d3acb6c2 Mon Sep 17 00:00:00 2001 From: Henry Gressmann Date: Mon, 24 Aug 2026 15:47:05 +0200 Subject: feat: add host typed reference / gc APIs (#54) - add Store-aware handles for references, GC objects, and exceptions - simplify host value conversion, rooting, and exception propagation - update examples, tests, and documentation - Remove deprecated APIs Signed-off-by: Henry --- crates/parser/src/conversion.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'crates/parser/src/conversion.rs') diff --git a/crates/parser/src/conversion.rs b/crates/parser/src/conversion.rs index 8f39398..6857a19 100644 --- a/crates/parser/src/conversion.rs +++ b/crates/parser/src/conversion.rs @@ -342,12 +342,9 @@ pub(crate) fn process_const_operators( } let instr = match op { - wasmparser::Operator::RefNull { hty } => { - convert_heap_type(hty, false)?; - ConstInstruction::Ref(RefValue::Null) - } + wasmparser::Operator::RefNull { hty } => ConstInstruction::RefNull(convert_heap_type(hty, true)?), wasmparser::Operator::RefFunc { function_index } => { - ConstInstruction::Ref(RefValue::Func(FuncRef::new(function_index))) + ConstInstruction::RefFunc(ModuleFuncIdx::new(function_index)) } wasmparser::Operator::RefI31 => ConstInstruction::RefI31, wasmparser::Operator::AnyConvertExtern => ConstInstruction::AnyConvertExtern, -- cgit v1.3.1