mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
Wasm: Remove old debug code that's never used. We have the HTML debugger now.
This commit is contained in:
parent
8d5a1cb661
commit
8c4fd93b07
2 changed files with 0 additions and 33 deletions
|
@ -53,8 +53,6 @@ pub struct WasmBackend<'a> {
|
|||
/// how many blocks deep are we (used for jumps)
|
||||
block_depth: u32,
|
||||
joinpoint_label_map: MutMap<JoinPointId, (u32, Vec<'a, StoredValue>)>,
|
||||
|
||||
debug_current_proc_index: usize,
|
||||
}
|
||||
|
||||
impl<'a> WasmBackend<'a> {
|
||||
|
@ -98,8 +96,6 @@ impl<'a> WasmBackend<'a> {
|
|||
joinpoint_label_map: MutMap::default(),
|
||||
code_builder: CodeBuilder::new(env.arena),
|
||||
storage: Storage::new(env.arena),
|
||||
|
||||
debug_current_proc_index: 0,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -178,8 +174,6 @@ impl<'a> WasmBackend<'a> {
|
|||
println!("\ngenerating procedure {:?}\n", proc.name);
|
||||
}
|
||||
|
||||
self.debug_current_proc_index += 1;
|
||||
|
||||
self.start_proc(proc);
|
||||
|
||||
self.build_stmt(&proc.body);
|
||||
|
@ -1486,18 +1480,4 @@ impl<'a> WasmBackend<'a> {
|
|||
self.code_builder
|
||||
.call(fn_index, linker_symbol_index, num_wasm_args, has_return_val);
|
||||
}
|
||||
|
||||
/// Debug utility
|
||||
///
|
||||
/// if self._debug_current_proc_is("#UserApp_foo_1") {
|
||||
/// self.code_builder._debug_assert_i32(0x1234);
|
||||
/// }
|
||||
fn _debug_current_proc_is(&self, linker_name: &'static str) -> bool {
|
||||
let (_, linker_sym_index) = self.proc_symbols[self.debug_current_proc_index];
|
||||
let sym_info = &self.module.linking.symbol_table[linker_sym_index as usize];
|
||||
match sym_info {
|
||||
SymInfo::Function(WasmObjectSymbol::Defined { name, .. }) => name == linker_name,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue