diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2023-05-19 21:35:55 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-06-10 20:47:53 -0700 |
| commit | d28fc5bacb2b27ba3f2a5ed17475b9b790be3ed5 (patch) | |
| tree | 84560d77289cec63fa1711414ce53d575069a85e /src/Sema.zig | |
| parent | 9ff514b6a35b7201f45f8bff31c61b4f8cfa7a7a (diff) | |
| download | zig-d28fc5bacb2b27ba3f2a5ed17475b9b790be3ed5.tar.gz zig-d28fc5bacb2b27ba3f2a5ed17475b9b790be3ed5.zip | |
InternPool: add repeated aggregate storage
Diffstat (limited to 'src/Sema.zig')
| -rw-r--r-- | src/Sema.zig | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Sema.zig b/src/Sema.zig index be505d74a3..bf4d13824a 100644 --- a/src/Sema.zig +++ b/src/Sema.zig @@ -12671,7 +12671,7 @@ fn analyzeTupleCat( const runtime_src = opt_runtime_src orelse { const tuple_val = try mod.intern(.{ .aggregate = .{ .ty = tuple_ty, - .fields = values, + .storage = .{ .elems = values }, } }); return sema.addConstant(tuple_ty.toType(), tuple_val.toValue()); }; @@ -12989,7 +12989,7 @@ fn analyzeTupleMul( const runtime_src = opt_runtime_src orelse { const tuple_val = try mod.intern(.{ .aggregate = .{ .ty = tuple_ty, - .fields = values, + .storage = .{ .elems = values }, } }); return sema.addConstant(tuple_ty.toType(), tuple_val.toValue()); }; @@ -18227,7 +18227,7 @@ fn zirStructInitAnon( const runtime_index = opt_runtime_index orelse { const tuple_val = try mod.intern(.{ .aggregate = .{ .ty = tuple_ty, - .fields = values, + .storage = .{ .elems = values }, } }); return sema.addConstantMaybeRef(block, tuple_ty.toType(), tuple_val.toValue(), is_ref); }; @@ -18442,7 +18442,7 @@ fn zirArrayInitAnon( const runtime_src = opt_runtime_src orelse { const tuple_val = try mod.intern(.{ .aggregate = .{ .ty = tuple_ty, - .fields = values, + .storage = .{ .elems = values }, } }); return sema.addConstantMaybeRef(block, tuple_ty.toType(), tuple_val.toValue(), is_ref); }; @@ -29176,7 +29176,7 @@ fn coerceTupleToTuple( tuple_ty, (try mod.intern(.{ .aggregate = .{ .ty = tuple_ty.ip_index, - .fields = field_vals, + .storage = .{ .elems = field_vals }, } })).toValue(), ); } @@ -33085,7 +33085,7 @@ pub fn typeHasOnePossibleValue(sema: *Sema, ty: Type) CompileError!?Value { // one-possible-value in type.zig. const empty = try mod.intern(.{ .aggregate = .{ .ty = ty.ip_index, - .fields = &.{}, + .storage = .{ .elems = &.{} }, } }); return empty.toValue(); }, @@ -33098,7 +33098,7 @@ pub fn typeHasOnePossibleValue(sema: *Sema, ty: Type) CompileError!?Value { // therefore has one possible value. return (try mod.intern(.{ .aggregate = .{ .ty = ty.ip_index, - .fields = tuple.values, + .storage = .{ .elems = tuple.values }, } })).toValue(); }, |
