diff --git a/crates/compiler/gen_wasm/src/backend.rs b/crates/compiler/gen_wasm/src/backend.rs index 0cd32013f5..aa116fb6a4 100644 --- a/crates/compiler/gen_wasm/src/backend.rs +++ b/crates/compiler/gen_wasm/src/backend.rs @@ -253,8 +253,6 @@ impl<'a> WasmBackend<'a> { .to_symbol_string(symbol, self.interns); let name = String::from_str_in(&name, self.env.arena).into_bump_str(); - // dbg!(name); - self.proc_lookup.push(ProcLookupData { name: symbol, layout, @@ -1595,8 +1593,7 @@ impl<'a> WasmBackend<'a> { // Store the tag ID (if any) if stores_tag_id_as_data { - let id_offset = - data_offset + union_layout.data_size_without_tag_id(TARGET_INFO).unwrap(); + let id_offset = data_offset + union_layout.tag_id_offset(TARGET_INFO).unwrap(); let id_align = union_layout.tag_id_builtin().alignment_bytes(TARGET_INFO); let id_align = Align::from(id_align); @@ -1679,7 +1676,7 @@ impl<'a> WasmBackend<'a> { }; if union_layout.stores_tag_id_as_data(TARGET_INFO) { - let id_offset = union_layout.data_size_without_tag_id(TARGET_INFO).unwrap(); + let id_offset = union_layout.tag_id_offset(TARGET_INFO).unwrap(); let id_align = union_layout.tag_id_builtin().alignment_bytes(TARGET_INFO); let id_align = Align::from(id_align);