From f1f4d8c89371a12824c1a0c2d02985bfa18751bc Mon Sep 17 00:00:00 2001 From: nerodesu017 Date: Tue, 17 Dec 2024 14:53:55 +0200 Subject: [PATCH] fix: debug assertions on import (moved to using full name on function call) Signed-off-by: nerodesu017 --- src/execution/interpreter_loop.rs | 1 - src/validation/code.rs | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/execution/interpreter_loop.rs b/src/execution/interpreter_loop.rs index 3232566c7..2f3b721bb 100644 --- a/src/execution/interpreter_loop.rs +++ b/src/execution/interpreter_loop.rs @@ -45,7 +45,6 @@ pub(super) fn run( .get(stack.current_stackframe().func_idx) .unwrap_validated(); - #[cfg(debug_assertions)] // Start reading the function's instructions let mut wasm = WasmReader::new(wasm_bytecode); diff --git a/src/validation/code.rs b/src/validation/code.rs index d1ef2c770..311216086 100644 --- a/src/validation/code.rs +++ b/src/validation/code.rs @@ -13,7 +13,6 @@ use crate::core::reader::types::global::Global; use crate::core::reader::types::memarg::MemArg; use crate::core::reader::types::{FuncType, MemType, NumType, TableType, ValType}; use crate::core::reader::{WasmReadable, WasmReader}; -use crate::core::utils::print_beautiful_instruction_name_1_byte; use crate::validation_stack::ValidationStack; use crate::{Error, RefType, Result}; @@ -121,7 +120,7 @@ fn read_instructions( }; #[cfg(debug_assertions)] - print_beautiful_instruction_name_1_byte(first_instr_byte, wasm.pc); + crate::core::utils::print_beautiful_instruction_name_1_byte(first_instr_byte, wasm.pc); #[cfg(not(debug_assertions))] trace!("Read instruction byte {first_instr_byte:#04X?} ({first_instr_byte}) at wasm_binary[{}]", wasm.pc);