From d2db1f7b3803c42619d91b85a66c12ace296bb21 Mon Sep 17 00:00:00 2001 From: Henry Gressmann Date: Tue, 27 Feb 2024 16:08:14 +0100 Subject: chore: overall code cleanup Signed-off-by: Henry Gressmann --- crates/types/src/instructions.rs | 2 +- crates/types/src/value.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/types/src') diff --git a/crates/types/src/instructions.rs b/crates/types/src/instructions.rs index 537b8d7..9923116 100644 --- a/crates/types/src/instructions.rs +++ b/crates/types/src/instructions.rs @@ -94,7 +94,7 @@ pub enum Instruction { // LocalGet + I32Const + I32Store => I32LocalGetConstStore + I32Const // Also common, helps us skip the stack entirely. // Has to be followed by an I32Const instruction - // I32LocalGetConstStore { local: LocalAddr, offset: i32, mem_addr: MemAddr }, // I32Store + LocalGet + I32Const + // I32StoreLocal { local: LocalAddr, offset: i32, mem_addr: MemAddr }, // I64Xor + I64Const + I64RotL // Commonly used by a few crypto libraries diff --git a/crates/types/src/value.rs b/crates/types/src/value.rs index df062ce..bcd43e5 100644 --- a/crates/types/src/value.rs +++ b/crates/types/src/value.rs @@ -142,7 +142,7 @@ impl ValType { WasmValue::default_for(*self) } - pub(crate) fn to_byte(&self) -> u8 { + pub(crate) fn to_byte(self) -> u8 { match self { ValType::I32 => 0x7F, ValType::I64 => 0x7E, -- cgit v1.3.1