aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/AstGen.zig4
-rw-r--r--src/Autodoc.zig1
-rw-r--r--src/Sema.zig14
-rw-r--r--src/arch/aarch64/CodeGen.zig1
-rw-r--r--src/arch/aarch64/abi.zig1
-rw-r--r--src/arch/arm/CodeGen.zig1
-rw-r--r--src/arch/arm/abi.zig1
-rw-r--r--src/arch/riscv64/abi.zig1
-rw-r--r--src/arch/wasm/CodeGen.zig1
-rw-r--r--src/arch/wasm/abi.zig1
-rw-r--r--src/arch/x86_64/CodeGen.zig1
-rw-r--r--src/arch/x86_64/abi.zig1
-rw-r--r--src/codegen/c.zig4
-rw-r--r--src/codegen/llvm.zig6
-rw-r--r--src/codegen/spirv.zig2
-rw-r--r--src/type.zig2
-rw-r--r--src/value.zig2
17 files changed, 4 insertions, 40 deletions
diff --git a/src/AstGen.zig b/src/AstGen.zig
index c9f44a6216..021990883a 100644
--- a/src/AstGen.zig
+++ b/src/AstGen.zig
@@ -9098,6 +9098,8 @@ fn nodeMayNeedMemoryLocation(tree: *const Ast, start_node: Ast.Node.Index, have_
.always => return true,
.forward1 => node = node_datas[node].rhs,
}
+ // Missing builtin arg is not a parsing error, expect an error later.
+ if (node == 0) return false;
},
.builtin_call, .builtin_call_comma => {
@@ -9112,6 +9114,8 @@ fn nodeMayNeedMemoryLocation(tree: *const Ast, start_node: Ast.Node.Index, have_
.always => return true,
.forward1 => node = params[1],
}
+ // Missing builtin arg is not a parsing error, expect an error later.
+ if (node == 0) return false;
},
}
}
diff --git a/src/Autodoc.zig b/src/Autodoc.zig
index 10fc336a41..55ff048482 100644
--- a/src/Autodoc.zig
+++ b/src/Autodoc.zig
@@ -607,7 +607,6 @@ const DocData = struct {
is_test: bool = false,
is_extern: bool = false,
},
- BoundFn: struct { name: []const u8 },
Opaque: struct {
name: []const u8,
src: usize, // index into astNodes
diff --git a/src/Sema.zig b/src/Sema.zig
index c38ef626e6..7109a3c385 100644
--- a/src/Sema.zig
+++ b/src/Sema.zig
@@ -9275,7 +9275,6 @@ fn zirBitcast(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Air
dest_ty.fmt(sema.mod), container,
});
},
- .BoundFn => @panic("TODO remove this type from the language and compiler"),
.Array,
.Bool,
@@ -9339,7 +9338,6 @@ fn zirBitcast(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Air
operand_ty.fmt(sema.mod), container,
});
},
- .BoundFn => @panic("TODO remove this type from the language and compiler"),
.Array,
.Bool,
@@ -9777,7 +9775,6 @@ fn zirSwitchCond(
.Undefined,
.Null,
.Optional,
- .BoundFn,
.Opaque,
.Vector,
.Frame,
@@ -10361,7 +10358,6 @@ fn zirSwitchBlock(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError
.Undefined,
.Null,
.Optional,
- .BoundFn,
.Opaque,
.Vector,
.Frame,
@@ -14833,7 +14829,6 @@ fn zirSizeOf(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Air.
.NoReturn,
.Undefined,
.Null,
- .BoundFn,
.Opaque,
=> return sema.fail(block, operand_src, "no size available for type '{}'", .{ty.fmt(sema.mod)}),
@@ -14877,7 +14872,6 @@ fn zirBitSizeOf(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!A
.NoReturn,
.Undefined,
.Null,
- .BoundFn,
.Opaque,
=> return sema.fail(block, operand_src, "no size available for type '{}'", .{operand_ty.fmt(sema.mod)}),
@@ -15908,7 +15902,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
}),
);
},
- .BoundFn => @panic("TODO remove this type from the language and compiler"),
.Frame => return sema.failWithUseOfAsync(block, src),
.AnyFrame => return sema.failWithUseOfAsync(block, src),
}
@@ -18609,7 +18602,6 @@ fn zirReify(sema: *Sema, block: *Block, extended: Zir.Inst.Extended.InstData, in
const ty = try Type.Tag.function.create(sema.arena, fn_info);
return sema.addType(ty);
},
- .BoundFn => @panic("TODO delete BoundFn from the language"),
.Frame => return sema.failWithUseOfAsync(block, src),
}
}
@@ -21790,7 +21782,6 @@ fn validateRunTimeType(
.Enum => return !(try sema.typeRequiresComptime(ty)),
- .BoundFn,
.ComptimeFloat,
.ComptimeInt,
.EnumLiteral,
@@ -21876,7 +21867,6 @@ fn explainWhyTypeIsComptimeInner(
try mod.errNoteNonLazy(src_loc, msg, "types are not available at runtime", .{});
},
- .BoundFn,
.ComptimeFloat,
.ComptimeInt,
.EnumLiteral,
@@ -21986,7 +21976,6 @@ fn validateExternType(
.Null,
.ErrorUnion,
.ErrorSet,
- .BoundFn,
.Frame,
=> return false,
.Void => return position == .union_field or position == .ret_ty,
@@ -22058,7 +22047,6 @@ fn explainWhyTypeIsNotExtern(
.Null,
.ErrorUnion,
.ErrorSet,
- .BoundFn,
.Frame,
=> return,
@@ -22116,7 +22104,6 @@ fn validatePackedType(ty: Type) bool {
.Null,
.ErrorUnion,
.ErrorSet,
- .BoundFn,
.Frame,
.NoReturn,
.Opaque,
@@ -22158,7 +22145,6 @@ fn explainWhyTypeIsNotPacked(
.EnumLiteral,
.Undefined,
.Null,
- .BoundFn,
.Frame,
.NoReturn,
.Opaque,
diff --git a/src/arch/aarch64/CodeGen.zig b/src/arch/aarch64/CodeGen.zig
index 4d541c4da7..2edc6cb7f9 100644
--- a/src/arch/aarch64/CodeGen.zig
+++ b/src/arch/aarch64/CodeGen.zig
@@ -6200,7 +6200,6 @@ fn genTypedValue(self: *Self, arg_tv: TypedValue) InnerError!MCValue {
.NoReturn => unreachable,
.Undefined => unreachable,
.Null => unreachable,
- .BoundFn => unreachable,
.Opaque => unreachable,
else => {},
diff --git a/src/arch/aarch64/abi.zig b/src/arch/aarch64/abi.zig
index e83cc0444a..9b5cacc98e 100644
--- a/src/arch/aarch64/abi.zig
+++ b/src/arch/aarch64/abi.zig
@@ -64,7 +64,6 @@ pub fn classifyType(ty: Type, target: std.Target) Class {
.ComptimeInt,
.Undefined,
.Null,
- .BoundFn,
.Fn,
.Opaque,
.EnumLiteral,
diff --git a/src/arch/arm/CodeGen.zig b/src/arch/arm/CodeGen.zig
index 257255e00c..6125ef1914 100644
--- a/src/arch/arm/CodeGen.zig
+++ b/src/arch/arm/CodeGen.zig
@@ -6156,7 +6156,6 @@ fn genTypedValue(self: *Self, arg_tv: TypedValue) InnerError!MCValue {
.NoReturn => unreachable,
.Undefined => unreachable,
.Null => unreachable,
- .BoundFn => unreachable,
.Opaque => unreachable,
else => {},
diff --git a/src/arch/arm/abi.zig b/src/arch/arm/abi.zig
index 13424fd9fa..8b9ec45e24 100644
--- a/src/arch/arm/abi.zig
+++ b/src/arch/arm/abi.zig
@@ -105,7 +105,6 @@ pub fn classifyType(ty: Type, target: std.Target, ctx: Context) Class {
.ComptimeInt,
.Undefined,
.Null,
- .BoundFn,
.Fn,
.Opaque,
.EnumLiteral,
diff --git a/src/arch/riscv64/abi.zig b/src/arch/riscv64/abi.zig
index 8a560f4596..26286a1e22 100644
--- a/src/arch/riscv64/abi.zig
+++ b/src/arch/riscv64/abi.zig
@@ -63,7 +63,6 @@ pub fn classifyType(ty: Type, target: std.Target) Class {
.ComptimeInt,
.Undefined,
.Null,
- .BoundFn,
.Fn,
.Opaque,
.EnumLiteral,
diff --git a/src/arch/wasm/CodeGen.zig b/src/arch/wasm/CodeGen.zig
index d4e3559006..faed432a38 100644
--- a/src/arch/wasm/CodeGen.zig
+++ b/src/arch/wasm/CodeGen.zig
@@ -1599,7 +1599,6 @@ fn isByRef(ty: Type, target: std.Target) bool {
.EnumLiteral,
.Undefined,
.Null,
- .BoundFn,
.Opaque,
=> unreachable,
diff --git a/src/arch/wasm/abi.zig b/src/arch/wasm/abi.zig
index de3cf64ea3..4692f65dd1 100644
--- a/src/arch/wasm/abi.zig
+++ b/src/arch/wasm/abi.zig
@@ -80,7 +80,6 @@ pub fn classifyType(ty: Type, target: Target) [2]Class {
.ComptimeInt,
.Undefined,
.Null,
- .BoundFn,
.Fn,
.Opaque,
.EnumLiteral,
diff --git a/src/arch/x86_64/CodeGen.zig b/src/arch/x86_64/CodeGen.zig
index baafdc9d1f..cd36642b03 100644
--- a/src/arch/x86_64/CodeGen.zig
+++ b/src/arch/x86_64/CodeGen.zig
@@ -6942,7 +6942,6 @@ fn genTypedValue(self: *Self, arg_tv: TypedValue) InnerError!MCValue {
.NoReturn => unreachable,
.Undefined => unreachable,
.Null => unreachable,
- .BoundFn => unreachable,
.Opaque => unreachable,
else => {},
diff --git a/src/arch/x86_64/abi.zig b/src/arch/x86_64/abi.zig
index aa53da8169..393d4db3d5 100644
--- a/src/arch/x86_64/abi.zig
+++ b/src/arch/x86_64/abi.zig
@@ -52,7 +52,6 @@ pub fn classifyWindows(ty: Type, target: Target) Class {
.ComptimeInt,
.Undefined,
.Null,
- .BoundFn,
.Fn,
.Opaque,
.EnumLiteral,
diff --git a/src/codegen/c.zig b/src/codegen/c.zig
index 1fd9539730..364d8f586d 100644
--- a/src/codegen/c.zig
+++ b/src/codegen/c.zig
@@ -866,7 +866,6 @@ pub const DeclGen = struct {
.NoReturn,
.Undefined,
.Null,
- .BoundFn,
.Opaque,
=> unreachable,
@@ -1320,7 +1319,6 @@ pub const DeclGen = struct {
.NoReturn => unreachable,
.Undefined => unreachable,
.Null => unreachable,
- .BoundFn => unreachable,
.Opaque => unreachable,
.Frame,
@@ -2050,8 +2048,6 @@ pub const DeclGen = struct {
.ComptimeInt,
.Type,
=> unreachable, // must be const or comptime
-
- .BoundFn => unreachable, // this type will be deleted from the language
}
}
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig
index 4115a4870e..7d70a51666 100644
--- a/src/codegen/llvm.zig
+++ b/src/codegen/llvm.zig
@@ -2341,8 +2341,6 @@ pub const Object = struct {
.Null => unreachable,
.EnumLiteral => unreachable,
- .BoundFn => @panic("TODO remove BoundFn from the language"),
-
.Frame => @panic("TODO implement lowerDebugType for Frame types"),
.AnyFrame => @panic("TODO implement lowerDebugType for AnyFrame types"),
}
@@ -3095,8 +3093,6 @@ pub const DeclGen = struct {
.Null => unreachable,
.EnumLiteral => unreachable,
- .BoundFn => @panic("TODO remove BoundFn from the language"),
-
.Frame => @panic("TODO implement llvmType for Frame types"),
.AnyFrame => @panic("TODO implement llvmType for AnyFrame types"),
}
@@ -3896,7 +3892,6 @@ pub const DeclGen = struct {
.NoReturn => unreachable,
.Undefined => unreachable,
.Null => unreachable,
- .BoundFn => unreachable,
.Opaque => unreachable,
.Frame,
@@ -10792,7 +10787,6 @@ fn isByRef(ty: Type) bool {
.EnumLiteral,
.Undefined,
.Null,
- .BoundFn,
.Opaque,
=> unreachable,
diff --git a/src/codegen/spirv.zig b/src/codegen/spirv.zig
index bd0c8bc53c..4db3b34b1e 100644
--- a/src/codegen/spirv.zig
+++ b/src/codegen/spirv.zig
@@ -538,8 +538,6 @@ pub const DeclGen = struct {
.Type,
=> unreachable, // Must be comptime.
- .BoundFn => unreachable, // this type will be deleted from the language.
-
else => |tag| return self.todo("Implement zig type '{}'", .{tag}),
};
}
diff --git a/src/type.zig b/src/type.zig
index 1aefa8f7a1..e64f310d79 100644
--- a/src/type.zig
+++ b/src/type.zig
@@ -185,7 +185,6 @@ pub const Type = extern union {
.Void,
.ErrorSet,
.Fn,
- .BoundFn,
.Opaque,
.AnyFrame,
.Enum,
@@ -4074,7 +4073,6 @@ pub const Type = extern union {
=> return true,
.Opaque => return is_extern,
- .BoundFn,
.ComptimeFloat,
.ComptimeInt,
.EnumLiteral,
diff --git a/src/value.zig b/src/value.zig
index d3035946f9..dc0b150abc 100644
--- a/src/value.zig
+++ b/src/value.zig
@@ -2419,7 +2419,6 @@ pub const Value = extern union {
if (val.tag() == .runtime_value) return;
switch (zig_ty_tag) {
- .BoundFn => unreachable, // TODO remove this from the language
.Opaque => unreachable, // Cannot hash opaque types
.Void,
@@ -2566,7 +2565,6 @@ pub const Value = extern union {
if (val.tag() == .runtime_value) return;
switch (ty.zigTypeTag()) {
- .BoundFn => unreachable, // TODO remove this from the language
.Opaque => unreachable, // Cannot hash opaque types
.Void,
.NoReturn,