mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-15 09:51:21 +00:00
Improve stack trace collection and rendering.
This commit is contained in:
@ -162,6 +162,7 @@ impl Machine {
|
||||
} else {
|
||||
self.state.stack_values.push(*mv);
|
||||
}
|
||||
self.state.wasm_stack.push(WasmAbstractValue::Runtime);
|
||||
ret.push(loc);
|
||||
}
|
||||
|
||||
@ -210,6 +211,7 @@ impl Machine {
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
self.state.wasm_stack.pop().unwrap();
|
||||
}
|
||||
|
||||
if delta_stack_offset != 0 {
|
||||
@ -236,6 +238,7 @@ impl Machine {
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
// Wasm state popping is deferred to `release_locations_only_osr_state`.
|
||||
}
|
||||
}
|
||||
|
||||
@ -262,6 +265,7 @@ impl Machine {
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
// Wasm state popping is deferred to `release_locations_only_osr_state`.
|
||||
}
|
||||
|
||||
if delta_stack_offset != 0 {
|
||||
@ -273,6 +277,15 @@ impl Machine {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn release_locations_only_osr_state(
|
||||
&mut self,
|
||||
n: usize,
|
||||
) {
|
||||
for _ in 0..n {
|
||||
self.state.wasm_stack.pop().unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
pub fn release_locations_keep_state<E: Emitter>(&self, assembler: &mut E, locs: &[Location]) {
|
||||
let mut delta_stack_offset: usize = 0;
|
||||
let mut stack_offset = self.stack_offset.0;
|
||||
|
Reference in New Issue
Block a user