aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2024-03-26 00:05:08 +0000
committermlugg <mlugg@mlugg.co.uk>2024-03-26 13:48:06 +0000
commit884d957b6c291961536c10401f60264da26cba30 (patch)
tree4138aabd75ae3a13bf0efbb4fe89ec1bb7fd82cb /src/codegen.zig
parent5ec6e3036b2772e6efc08726b22c560dedd556bc (diff)
downloadzig-884d957b6c291961536c10401f60264da26cba30.tar.gz
zig-884d957b6c291961536c10401f60264da26cba30.zip
compiler: eliminate legacy Value representation
Good riddance! Most of these changes are trivial. There's a fix for a minor bug this exposed in `Value.readFromPackedMemory`, but aside from that, it's all just things like changing `intern` calls to `toIntern`.
Diffstat (limited to 'src/codegen.zig')
-rw-r--r--src/codegen.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codegen.zig b/src/codegen.zig
index 5bc0d1a81f..818284a8f0 100644
--- a/src/codegen.zig
+++ b/src/codegen.zig
@@ -925,7 +925,7 @@ fn genDeclRef(
const ptr_bits = target.ptrBitWidth();
const ptr_bytes: u64 = @divExact(ptr_bits, 8);
- const decl_index = switch (zcu.intern_pool.indexToKey(try ptr_decl.internValue(zcu))) {
+ const decl_index = switch (zcu.intern_pool.indexToKey(ptr_decl.val.toIntern())) {
.func => |func| func.owner_decl,
.extern_func => |extern_func| extern_func.decl,
else => ptr_decl_index,