summaryrefslogtreecommitdiff
path: root/crates/tinywasm/src/interpreter/stack/call_stack.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/tinywasm/src/interpreter/stack/call_stack.rs')
-rw-r--r--crates/tinywasm/src/interpreter/stack/call_stack.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/crates/tinywasm/src/interpreter/stack/call_stack.rs b/crates/tinywasm/src/interpreter/stack/call_stack.rs
index 133f910..4f3ace1 100644
--- a/crates/tinywasm/src/interpreter/stack/call_stack.rs
+++ b/crates/tinywasm/src/interpreter/stack/call_stack.rs
@@ -3,7 +3,7 @@ use crate::{Result, Trap, unlikely};
use alloc::vec::Vec;
use tinywasm_types::{FuncAddr, ModuleInstanceAddr, ValueCountsSmall};
-#[derive(Debug)]
+#[cfg_attr(feature = "debug", derive(Debug))]
pub(crate) struct CallStack {
stack: Vec<CallFrame>,
}
@@ -32,7 +32,8 @@ impl CallStack {
}
}
-#[derive(Debug, Clone, Copy, Default)]
+#[derive(Clone, Copy, Default)]
+#[cfg_attr(feature = "debug", derive(Debug))]
pub(crate) struct CallFrame {
pub(crate) instr_ptr: u32,
pub(crate) module_addr: ModuleInstanceAddr,
@@ -41,7 +42,8 @@ pub(crate) struct CallFrame {
pub(crate) stack_offset: ValueCountsSmall,
}
-#[derive(Debug, Clone, Copy, Default)]
+#[derive(Clone, Copy, Default)]
+#[cfg_attr(feature = "debug", derive(Debug))]
pub(crate) struct StackBase {
pub(crate) s32: u32,
pub(crate) s64: u32,