diff options
| author | David Rubin <daviru007@icloud.com> | 2024-08-11 03:14:12 -0700 |
|---|---|---|
| committer | David Rubin <daviru007@icloud.com> | 2024-08-25 15:16:42 -0700 |
| commit | b4bb64ce78bf2dee9437f366a362ef4d8c77b204 (patch) | |
| tree | 218658e59522e59a432b6e9adea9f1993c0fb51d /src/mutable_value.zig | |
| parent | 849c31a6cc3d1e554f97c2ccf7aaa886070cfadd (diff) | |
| download | zig-b4bb64ce78bf2dee9437f366a362ef4d8c77b204.tar.gz zig-b4bb64ce78bf2dee9437f366a362ef4d8c77b204.zip | |
sema: rework type resolution to use Zcu when possible
Diffstat (limited to 'src/mutable_value.zig')
| -rw-r--r-- | src/mutable_value.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mutable_value.zig b/src/mutable_value.zig index 63f198dfa7..5fe43105f4 100644 --- a/src/mutable_value.zig +++ b/src/mutable_value.zig @@ -369,7 +369,7 @@ pub const MutableValue = union(enum) { .bytes => |b| { assert(is_trivial_int); assert(field_val.typeOf(zcu).toIntern() == .u8_type); - b.data[field_idx] = @intCast(Value.fromInterned(field_val.interned).toUnsignedInt(pt)); + b.data[field_idx] = @intCast(Value.fromInterned(field_val.interned).toUnsignedInt(zcu)); }, .repeated => |r| { if (field_val.eqlTrivial(r.child.*)) return; @@ -382,9 +382,9 @@ pub const MutableValue = union(enum) { { // We can use the `bytes` representation. const bytes = try arena.alloc(u8, @intCast(len_inc_sent)); - const repeated_byte = Value.fromInterned(r.child.interned).toUnsignedInt(pt); + const repeated_byte = Value.fromInterned(r.child.interned).toUnsignedInt(zcu); @memset(bytes, @intCast(repeated_byte)); - bytes[field_idx] = @intCast(Value.fromInterned(field_val.interned).toUnsignedInt(pt)); + bytes[field_idx] = @intCast(Value.fromInterned(field_val.interned).toUnsignedInt(zcu)); mv.* = .{ .bytes = .{ .ty = r.ty, .data = bytes, @@ -431,7 +431,7 @@ pub const MutableValue = union(enum) { } else { const bytes = try arena.alloc(u8, a.elems.len); for (a.elems, bytes) |elem_val, *b| { - b.* = @intCast(Value.fromInterned(elem_val.interned).toUnsignedInt(pt)); + b.* = @intCast(Value.fromInterned(elem_val.interned).toUnsignedInt(zcu)); } mv.* = .{ .bytes = .{ .ty = a.ty, |
