diff --git a/Cargo.lock b/Cargo.lock index 05e1a6e..05ae0f4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -210,7 +210,7 @@ checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" [[package]] name = "wasmer-interface-types-fl" -version = "0.18.3" +version = "0.19.0" dependencies = [ "fluence-it-types", "it-to-bytes", diff --git a/wasmer-it/Cargo.toml b/wasmer-it/Cargo.toml index 89b6f4e..4e0d8bb 100644 --- a/wasmer-it/Cargo.toml +++ b/wasmer-it/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-interface-types-fl" -version = "0.18.3" +version = "0.19.0" description = "WebAssembly Interface Types library for Wasmer" license = "MIT" authors = ["The Wasmer Engineering Team "] diff --git a/wasmer-it/src/interpreter/instructions/arrays.rs b/wasmer-it/src/interpreter/instructions/arrays.rs index 32482e0..fb7e307 100644 --- a/wasmer-it/src/interpreter/instructions/arrays.rs +++ b/wasmer-it/src/interpreter/instructions/arrays.rs @@ -1,4 +1,3 @@ -use super::deallocate; use super::read_from_instance_mem; use super::write_to_instance_mem; @@ -181,8 +180,6 @@ where } }; - deallocate(instance, instruction, offset as _, size as _)?; - Ok(result_array) } diff --git a/wasmer-it/src/interpreter/instructions/mod.rs b/wasmer-it/src/interpreter/instructions/mod.rs index aaf5d46..d4b2744 100644 --- a/wasmer-it/src/interpreter/instructions/mod.rs +++ b/wasmer-it/src/interpreter/instructions/mod.rs @@ -32,7 +32,6 @@ use serde::Serialize; use std::convert::TryFrom; pub(self) const ALLOCATE_FUNC_INDEX: u32 = 0; -pub(self) const DEALLOCATE_FUNC_INDEX: u32 = 1; /// Represents all the possible WIT instructions. #[derive(PartialEq, Eq, Debug, Clone, Hash, Serialize, Deserialize)] diff --git a/wasmer-it/src/interpreter/instructions/records.rs b/wasmer-it/src/interpreter/instructions/records.rs index f5635e2..abd1c95 100644 --- a/wasmer-it/src/interpreter/instructions/records.rs +++ b/wasmer-it/src/interpreter/instructions/records.rs @@ -12,18 +12,6 @@ use crate::{ }; use std::convert::TryInto; -/* - -struct Record1 { -field1: String, -field2: i32, -} - -// export -fn foo(t: Record1) { - -// import - */ /* /// Build an `IValue::Record` based on values on the stack. @@ -249,8 +237,6 @@ where field_id += 1; } - super::deallocate(instance, instruction, offset as _, size as _)?; - Ok(IValue::Record( NEVec::new(values.into_iter().collect()) .expect("Record must have at least one field, zero given"), diff --git a/wasmer-it/src/interpreter/instructions/utils.rs b/wasmer-it/src/interpreter/instructions/utils.rs index 0e7fd18..507ebf7 100644 --- a/wasmer-it/src/interpreter/instructions/utils.rs +++ b/wasmer-it/src/interpreter/instructions/utils.rs @@ -1,5 +1,4 @@ use crate::interpreter::instructions::ALLOCATE_FUNC_INDEX; -use crate::interpreter::instructions::DEALLOCATE_FUNC_INDEX; use crate::interpreter::wasm; use crate::interpreter::wasm::structures::{FunctionIndex, TypedIndex}; @@ -130,29 +129,6 @@ where to_native::(&values[0], instruction).map(|v| v as usize) } -pub(super) fn deallocate<'instance, Instance, Export, LocalImport, Memory, MemoryView>( - instance: &'instance Instance, - instruction: Instruction, - mem_ptr: i32, - size: i32, -) -> Result<(), InstructionError> -where - Export: wasm::structures::Export + 'instance, - LocalImport: wasm::structures::LocalImport + 'instance, - Memory: wasm::structures::Memory + 'instance, - MemoryView: wasm::structures::MemoryView, - Instance: wasm::structures::Instance, -{ - let _ = call_core( - instance, - DEALLOCATE_FUNC_INDEX, - instruction, - vec![IValue::I32(mem_ptr), IValue::I32(size)], - )?; - - Ok(()) -} - fn call_core<'instance, Instance, Export, LocalImport, Memory, MemoryView>( instance: &'instance Instance, function_index: u32,