diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-05-20 17:55:40 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-06-10 20:47:54 -0700 |
| commit | 7e19c9566860e78ad536aaa678af8c32531fade9 (patch) | |
| tree | d6e90d6c1cf0d13bee52b8107804837658486927 /src/InternPool.zig | |
| parent | 65d65f5dda144d76ea9bbd82b2b5aacb09d7ae34 (diff) | |
| download | zig-7e19c9566860e78ad536aaa678af8c32531fade9.tar.gz zig-7e19c9566860e78ad536aaa678af8c32531fade9.zip | |
Sema: move `inferred_alloc_const/mut_type` to InternPool
Now, all types are migrated to use `InternPool`. The `Type.Tag` enum is
deleted in this commit.
Diffstat (limited to 'src/InternPool.zig')
| -rw-r--r-- | src/InternPool.zig | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/InternPool.zig b/src/InternPool.zig index 130bcc1cad..b9b706e499 100644 --- a/src/InternPool.zig +++ b/src/InternPool.zig @@ -959,6 +959,8 @@ pub const Index = enum(u32) { const_slice_u8_sentinel_0_type, anyerror_void_error_union_type, generic_poison_type, + inferred_alloc_const_type, + inferred_alloc_mut_type, /// `@TypeOf(.{})` empty_struct_type, @@ -1009,10 +1011,7 @@ pub const Index = enum(u32) { pub fn toType(i: Index) @import("type.zig").Type { assert(i != .none); - return .{ - .ip_index = i, - .legacy = undefined, - }; + return .{ .ip_index = i }; } pub fn toValue(i: Index) @import("value.zig").Value { @@ -1195,6 +1194,10 @@ pub const static_keys = [_]Key{ // generic_poison_type .{ .simple_type = .generic_poison }, + // inferred_alloc_const_type + .{ .simple_type = .inferred_alloc_const }, + // inferred_alloc_mut_type + .{ .simple_type = .inferred_alloc_mut }, // empty_struct_type .{ .anon_struct_type = .{ @@ -1568,6 +1571,12 @@ pub const SimpleType = enum(u32) { type_info, generic_poison, + /// TODO: remove this from `SimpleType`; instead make it only a special `Index` tag like + /// `var_args_param_type`. + inferred_alloc_const, + /// TODO: remove this from `SimpleType`; instead make it only a special `Index` tag like + /// `var_args_param_type`. + inferred_alloc_mut, }; pub const SimpleValue = enum(u32) { |
