diff --git a/crates/it-lilo-utils/src/lib.rs b/crates/it-lilo-utils/src/lib.rs index 8b5934b..dd94ae1 100644 --- a/crates/it-lilo-utils/src/lib.rs +++ b/crates/it-lilo-utils/src/lib.rs @@ -44,7 +44,7 @@ pub fn record_size(record_type: &IRecordType) -> usize { .sum() } -pub fn type_code_form_itype(itype: &IType) -> u32 { +pub fn type_tag_form_itype(itype: &IType) -> u32 { const POINTER_CODE: u32 = 3; // u32 on the sdk match itype { @@ -63,7 +63,7 @@ pub fn type_code_form_itype(itype: &IType) -> u32 { } } -pub fn type_code_form_ivalue(itype: &IValue) -> u32 { +pub fn type_tag_form_ivalue(itype: &IValue) -> u32 { const POINTER_CODE: u32 = 3; // u32 on the sdk match itype { diff --git a/wasmer-it/src/interpreter/instructions/arrays/lower_array.rs b/wasmer-it/src/interpreter/instructions/arrays/lower_array.rs index 1a6d727..a27d867 100644 --- a/wasmer-it/src/interpreter/instructions/arrays/lower_array.rs +++ b/wasmer-it/src/interpreter/instructions/arrays/lower_array.rs @@ -3,7 +3,7 @@ use super::lilo::*; use crate::IValue; use it_lilo_utils::ser_value_size; -use it_lilo_utils::type_code_form_ivalue; +use it_lilo_utils::type_tag_form_ivalue; pub(crate) fn array_lower_memory_impl( lo_helper: &LoHelper, @@ -17,7 +17,7 @@ pub(crate) fn array_lower_memory_impl( let size_to_allocate = ser_value_size(&array_values[0]) * elements_count; let offset = (lo_helper.allocate)( size_to_allocate as _, - type_code_form_ivalue(&array_values[0]) as _, + type_tag_form_ivalue(&array_values[0]) as _, )?; let seq_writer = lo_helper diff --git a/wasmer-it/src/interpreter/instructions/lilo/lo_helper.rs b/wasmer-it/src/interpreter/instructions/lilo/lo_helper.rs index 2bbd62a..b2e1b5d 100644 --- a/wasmer-it/src/interpreter/instructions/lilo/lo_helper.rs +++ b/wasmer-it/src/interpreter/instructions/lilo/lo_helper.rs @@ -5,7 +5,7 @@ use crate::interpreter::wasm; use crate::IType; use it_lilo_utils::memory_writer::MemoryWriter; -use it_lilo_utils::type_code_form_itype; +use it_lilo_utils::type_tag_form_itype; use std::cell::Cell; @@ -35,8 +35,8 @@ impl<'instance> LoHelper<'instance> { } pub(crate) fn write_to_mem(&self, bytes: &[u8]) -> LiLoResult { - let alloc_type_code = type_code_form_itype(&IType::U8); - let offset = (self.allocate)(bytes.len() as _, alloc_type_code as _)?; + let alloc_type_tag = type_tag_form_itype(&IType::U8); + let offset = (self.allocate)(bytes.len() as _, alloc_type_tag as _)?; self.writer.write_bytes(offset, bytes)?;