aboutsummaryrefslogtreecommitdiff
path: root/src/InternPool.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2024-05-02 01:59:38 +0100
committerMatthew Lugg <mlugg@mlugg.co.uk>2024-05-04 22:03:56 +0100
commitdb890dbae72bc31e50d4ec641f2afce683df772d (patch)
treeb1b3f0b3f9f921cfd1ac365446becb235151a970 /src/InternPool.zig
parent5bbb2f966a4d29c7003767255515b7c69a2f1178 (diff)
downloadzig-db890dbae72bc31e50d4ec641f2afce683df772d.tar.gz
zig-db890dbae72bc31e50d4ec641f2afce683df772d.zip
InternPool: eliminate `var_args_param_type`
This was a "fake" type used to handle C varargs parameters, much like generic poison. In fact, it is treated identically to generic poison in all cases other than one (the final coercion of a call argument), which is trivially special-cased. Thus, it makes sense to remove this special tag and instead use `generic_poison_type` in its place. This fixes several bugs in Sema related to missing handling of this tag. Resolves: #19781
Diffstat (limited to 'src/InternPool.zig')
-rw-r--r--src/InternPool.zig4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/InternPool.zig b/src/InternPool.zig
index a63c81f2ba..b6d5e77f53 100644
--- a/src/InternPool.zig
+++ b/src/InternPool.zig
@@ -2818,7 +2818,6 @@ pub const Index = enum(u32) {
generic_poison,
/// Used by Air/Sema only.
- var_args_param_type = std.math.maxInt(u32) - 1,
none = std.math.maxInt(u32),
_,
@@ -8938,7 +8937,6 @@ pub fn typeOf(ip: *const InternPool, index: Index) Index {
.memoized_call => unreachable,
},
- .var_args_param_type => unreachable,
.none => unreachable,
};
}
@@ -9153,8 +9151,6 @@ pub fn zigTypeTagOrPoison(ip: *const InternPool, index: Index) error{GenericPois
.empty_struct => unreachable,
.generic_poison => unreachable,
- .var_args_param_type => unreachable, // special tag
-
_ => switch (ip.items.items(.tag)[@intFromEnum(index)]) {
.removed => unreachable,