Skip to content

Commit

Permalink
fix: debug assertions on import (moved to using full name on function…
Browse files Browse the repository at this point in the history
… call)

Signed-off-by: nerodesu017 <[email protected]>
  • Loading branch information
nerodesu017 committed Dec 17, 2024
1 parent b32f727 commit f1f4d8c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion src/execution/interpreter_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ pub(super) fn run<H: HookSet>(
.get(stack.current_stackframe().func_idx)
.unwrap_validated();

#[cfg(debug_assertions)]
// Start reading the function's instructions
let mut wasm = WasmReader::new(wasm_bytecode);

Expand Down
3 changes: 1 addition & 2 deletions src/validation/code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit f1f4d8c

Please sign in to comment.