diff --git a/compiler/gen_wasm/src/backend.rs b/compiler/gen_wasm/src/backend.rs index 91a0c148f2..ec5ac86b86 100644 --- a/compiler/gen_wasm/src/backend.rs +++ b/compiler/gen_wasm/src/backend.rs @@ -516,6 +516,11 @@ impl<'a> WasmBackend<'a> { .refcount_proc_gen .expand_refcount_stmt(ident_ids, *layout, modify, *following); + if false { + self.register_symbol_debug_names(); + println!("## rc_stmt:\n{}\n{:?}", rc_stmt.to_pretty(200), rc_stmt); + } + // If we're creating a new RC procedure, we need to store its symbol data, // so that we can correctly generate calls to it. if let Some((rc_proc_sym, rc_proc_layout)) = new_proc_info { @@ -704,7 +709,7 @@ impl<'a> WasmBackend<'a> { sym: Symbol, layout: &Layout<'a>, ) -> Result<(), String> { - let not_supported_error = || Err(format!("Literal value {:?} is not yet implemented", lit)); + let not_supported_error = || panic!("Literal value {:?} is not yet implemented", lit); match storage { StoredValue::VirtualMachineStack { value_type, .. } => { diff --git a/compiler/gen_wasm/src/lib.rs b/compiler/gen_wasm/src/lib.rs index 6dffbf87e2..2b5aba3ecd 100644 --- a/compiler/gen_wasm/src/lib.rs +++ b/compiler/gen_wasm/src/lib.rs @@ -96,6 +96,14 @@ pub fn build_module_help<'a>( RefcountProcGenerator::new(env.arena, IntWidth::I32, env.module_id), ); + if false { + println!("## procs"); + for proc in procs.iter() { + println!("{}", proc.to_pretty(200)); + println!("{:#?}", proc); + } + } + // Generate procs from user code for proc in procs.iter() { backend.build_proc(proc)?; @@ -107,6 +115,7 @@ pub fn build_module_help<'a>( backend.register_symbol_debug_names(); if false { + println!("## refcount_procs"); for proc in refcount_procs.iter() { println!("{}", proc.to_pretty(200)); println!("{:#?}", proc);