mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 23:31:12 +00:00
wasm: improve debug logging
This commit is contained in:
parent
6de8892e88
commit
5cce24bc8f
3 changed files with 16 additions and 7 deletions
|
@ -62,7 +62,7 @@ struct VmBlock<'a> {
|
|||
|
||||
impl std::fmt::Debug for VmBlock<'_> {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
f.write_fmt(format_args!("{:?}", self.opcode))
|
||||
f.write_fmt(format_args!("{:?} {:?}", self.opcode, self.value_stack))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -608,7 +608,7 @@ impl<'a> CodeBuilder<'a> {
|
|||
log_instruction!(
|
||||
"{:10}\t\t{:?}",
|
||||
format!("{:?}", opcode),
|
||||
self.current_stack()
|
||||
self.vm_block_stack
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -635,7 +635,7 @@ impl<'a> CodeBuilder<'a> {
|
|||
"{:10}\t{}\t{:?}",
|
||||
format!("{:?}", opcode),
|
||||
immediate,
|
||||
self.current_stack()
|
||||
self.vm_block_stack
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -648,7 +648,7 @@ impl<'a> CodeBuilder<'a> {
|
|||
format!("{:?}", opcode),
|
||||
align,
|
||||
offset,
|
||||
self.current_stack()
|
||||
self.vm_block_stack
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -752,7 +752,7 @@ impl<'a> CodeBuilder<'a> {
|
|||
"{:10}\t{}\t{:?}",
|
||||
format!("{:?}", CALL),
|
||||
function_index,
|
||||
self.current_stack()
|
||||
self.vm_block_stack
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -823,7 +823,7 @@ impl<'a> CodeBuilder<'a> {
|
|||
"{:10}\t{}\t{:?}",
|
||||
format!("{:?}", opcode),
|
||||
x,
|
||||
self.current_stack()
|
||||
self.vm_block_stack
|
||||
);
|
||||
}
|
||||
pub fn i32_const(&mut self, x: i32) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue