| ... | @@ -3005,7 +3005,6 @@ pub fn getErrorTableSymbol(wasm: *Wasm) !u32 { | ... | @@ -3005,7 +3005,6 @@ pub fn getErrorTableSymbol(wasm: *Wasm) !u32 { |
| 3005 | fn populateErrorNameTable(wasm: *Wasm) !void { | 3005 | fn populateErrorNameTable(wasm: *Wasm) !void { |
| 3006 | const symbol_index = wasm.error_table_symbol orelse return; | 3006 | const symbol_index = wasm.error_table_symbol orelse return; |
| 3007 | const atom_index = wasm.symbol_atom.get(.{ .file = null, .index = symbol_index }).?; | 3007 | const atom_index = wasm.symbol_atom.get(.{ .file = null, .index = symbol_index }).?; |
| 3008 | const atom = wasm.getAtomPtr(atom_index); | | |
| 3009 | | 3008 | |
| 3010 | // Rather than creating a symbol for each individual error name, | 3009 | // Rather than creating a symbol for each individual error name, |
| 3011 | // we create a symbol for the entire region of error names. We then calculate | 3010 | // we create a symbol for the entire region of error names. We then calculate |
| ... | @@ -3030,6 +3029,8 @@ fn populateErrorNameTable(wasm: *Wasm) !void { | ... | @@ -3030,6 +3029,8 @@ fn populateErrorNameTable(wasm: *Wasm) !void { |
| 3030 | var addend: u32 = 0; | 3029 | var addend: u32 = 0; |
| 3031 | const mod = wasm.base.options.module.?; | 3030 | const mod = wasm.base.options.module.?; |
| 3032 | for (mod.global_error_set.keys()) |error_name_nts| { | 3031 | for (mod.global_error_set.keys()) |error_name_nts| { |
| | 3032 | const atom = wasm.getAtomPtr(atom_index); |
| | 3033 | |
| 3033 | const error_name = mod.intern_pool.stringToSlice(error_name_nts); | 3034 | const error_name = mod.intern_pool.stringToSlice(error_name_nts); |
| 3034 | const len = @as(u32, @intCast(error_name.len + 1)); // names are 0-termianted | 3035 | const len = @as(u32, @intCast(error_name.len + 1)); // names are 0-termianted |
| 3035 | | 3036 | |