From 748cf3b0f6eb4dedaf3ea2c0e5adc4603e9bf66c Mon Sep 17 00:00:00 2001 From: vms Date: Mon, 19 Apr 2021 21:21:59 +0300 Subject: [PATCH] misc updates --- crates/it-types/Cargo.toml | 2 +- wasmer-it/Cargo.toml | 4 ++-- wasmer-it/src/interpreter/instructions/arrays.rs | 1 - .../interpreter/instructions/arrays/write_arrays.rs | 1 - .../interpreter/instructions/records/lift_record.rs | 11 +++-------- 5 files changed, 6 insertions(+), 13 deletions(-) delete mode 100644 wasmer-it/src/interpreter/instructions/arrays/write_arrays.rs diff --git a/crates/it-types/Cargo.toml b/crates/it-types/Cargo.toml index 1d868d6..3e7d605 100644 --- a/crates/it-types/Cargo.toml +++ b/crates/it-types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fluence-it-types" -version = "0.1.1" +version = "0.2.0" description = "Definitions of IValue and IType" authors = ["Fluence Labs"] edition = "2018" diff --git a/wasmer-it/Cargo.toml b/wasmer-it/Cargo.toml index 9b1521b..af700e1 100644 --- a/wasmer-it/Cargo.toml +++ b/wasmer-it/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-interface-types-fl" -version = "0.19.0" +version = "0.20.0" description = "WebAssembly Interface Types library for Wasmer" license = "MIT" authors = ["The Wasmer Engineering Team "] @@ -8,7 +8,7 @@ repository = "https://github.com/wasmerio/wasmer" edition = "2018" [dependencies] -fluence-it-types = { path = "../crates/it-types", version = "0.1.0", features = ["impls"] } +fluence-it-types = { path = "../crates/it-types", version = "0.2.0", features = ["impls"] } it-to-bytes = { path = "../crates/to-bytes", version = "0.1.0" } nom = "5.1" diff --git a/wasmer-it/src/interpreter/instructions/arrays.rs b/wasmer-it/src/interpreter/instructions/arrays.rs index 911d6f5..bc82de9 100644 --- a/wasmer-it/src/interpreter/instructions/arrays.rs +++ b/wasmer-it/src/interpreter/instructions/arrays.rs @@ -2,7 +2,6 @@ mod lift_array; mod lower_array; mod memory_writer; mod read_arrays; -mod write_arrays; pub(crate) use lift_array::array_lift_memory_impl; pub(crate) use lower_array::array_lower_memory_impl; diff --git a/wasmer-it/src/interpreter/instructions/arrays/write_arrays.rs b/wasmer-it/src/interpreter/instructions/arrays/write_arrays.rs deleted file mode 100644 index 8b13789..0000000 --- a/wasmer-it/src/interpreter/instructions/arrays/write_arrays.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/wasmer-it/src/interpreter/instructions/records/lift_record.rs b/wasmer-it/src/interpreter/instructions/records/lift_record.rs index 0837c98..448acbd 100644 --- a/wasmer-it/src/interpreter/instructions/records/lift_record.rs +++ b/wasmer-it/src/interpreter/instructions/records/lift_record.rs @@ -66,14 +66,9 @@ fn record_size(record_type: &IRecordType) -> usize { record_size += match field_type.ty { IType::Boolean | IType::S8 | IType::U8 => 1, IType::S16 | IType::U16 => 2, - IType::S32 - | IType::U32 - | IType::I32 - | IType::F32 - | IType::String - | IType::ByteArray - | IType::Array(_) - | IType::Record(_) => 32, + IType::S32 | IType::U32 | IType::I32 | IType::F32 => 4, + IType::Record(_) => 4, + IType::String | IType::ByteArray | IType::Array(_) => 2 * 4, IType::S64 | IType::U64 | IType::I64 | IType::F64 => 64, }; }