Skip to content

Commit 947e883

Browse files
committed
use get_stack_depth()
1 parent 965d53b commit 947e883

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

third_party/move/move-vm/runtime/src/debug/interpreter.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ use std::{cmp::min, fmt::Write, sync::Arc};
1717

1818
pub(crate) trait InterpreterDebugInterface {
1919
fn get_stack_frames(&self, count: usize) -> ExecutionState;
20-
#[allow(unused)]
2120
fn get_stack_depth(&self) -> usize;
2221
fn debug_print_stack_trace(
2322
&self,

third_party/move/move-vm/runtime/src/interpreter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1685,7 +1685,7 @@ where
16851685
internal_state.push_str(
16861686
format!(
16871687
"*frame #{}: {} [pc = {}]:\n",
1688-
self.call_stack.0.len(),
1688+
self.get_stack_depth(),
16891689
current_frame.function.name_as_pretty_string(),
16901690
current_frame.pc,
16911691
)
@@ -1957,7 +1957,7 @@ impl Frame {
19571957
};
19581958
if is_tracing_for!(TraceCategory::VMError) {
19591959
let mut str = String::new();
1960-
let abort_idx = interpreter.call_stack.0.len();
1960+
let abort_idx = interpreter.get_stack_depth();
19611961
if let Err(print_err) = interpreter
19621962
.debug_print_stack_trace(&mut str, interpreter.loader.runtime_environment())
19631963
{

0 commit comments

Comments
 (0)