summaryrefslogtreecommitdiff
path: root/crates/parser/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/parser/src')
-rw-r--r--crates/parser/src/conversion.rs7
1 files changed, 2 insertions, 5 deletions
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,