aboutsummaryrefslogtreecommitdiff
path: root/src/type.zig
diff options
context:
space:
mode:
authorIsaac Freund <ifreund@ifreund.xyz>2021-03-23 00:19:29 +0100
committerIsaac Freund <ifreund@ifreund.xyz>2021-03-23 00:23:41 +0100
commit9f0b9b8da1a111d16eb8d1254212ff98a8b4be08 (patch)
tree2d1b8a5c3355de2a2f116bd3d23ee69716c3c877 /src/type.zig
parent240b15381dd560cac004c5e84783fb93f03c0697 (diff)
downloadzig-9f0b9b8da1a111d16eb8d1254212ff98a8b4be08.tar.gz
zig-9f0b9b8da1a111d16eb8d1254212ff98a8b4be08.zip
stage2: remove all async related code
The current plan is to avoid using async and related features in the stage2 compiler so that we can bootstrap before implementing them. Having this untested and incomplete code in the codebase increases friction while working on stage2, in particular when preforming larger refactors such as the current zir memory layout rework. Therefore remove all async related code, leaving only error messages in astgen.
Diffstat (limited to 'src/type.zig')
-rw-r--r--src/type.zig67
1 files changed, 1 insertions, 66 deletions
diff --git a/src/type.zig b/src/type.zig
index 4cc8808559..331994fe1e 100644
--- a/src/type.zig
+++ b/src/type.zig
@@ -92,8 +92,6 @@ pub const Type = extern union {
.anyerror_void_error_union, .error_union => return .ErrorUnion,
- .anyframe_T, .@"anyframe" => return .AnyFrame,
-
.empty_struct => return .Struct,
.var_args_param => unreachable, // can be any type
@@ -397,7 +395,6 @@ pub const Type = extern union {
.const_slice_u8,
.enum_literal,
.anyerror_void_error_union,
- .@"anyframe",
.inferred_alloc_const,
.inferred_alloc_mut,
.var_args_param,
@@ -418,7 +415,6 @@ pub const Type = extern union {
.optional,
.optional_single_mut_pointer,
.optional_single_const_pointer,
- .anyframe_T,
=> return self.copyPayloadShallow(allocator, Payload.ElemType),
.int_signed,
@@ -546,7 +542,6 @@ pub const Type = extern union {
// TODO this should print the structs name
.empty_struct => return out_stream.writeAll("struct {}"),
- .@"anyframe" => return out_stream.writeAll("anyframe"),
.anyerror_void_error_union => return out_stream.writeAll("anyerror!void"),
.const_slice_u8 => return out_stream.writeAll("[]const u8"),
.fn_noreturn_no_args => return out_stream.writeAll("fn() noreturn"),
@@ -574,12 +569,6 @@ pub const Type = extern union {
continue;
},
- .anyframe_T => {
- const return_type = ty.castTag(.anyframe_T).?.data;
- try out_stream.print("anyframe->", .{});
- ty = return_type;
- continue;
- },
.array_u8 => {
const len = ty.castTag(.array_u8).?.data;
return out_stream.print("[{d}]u8", .{len});
@@ -814,8 +803,6 @@ pub const Type = extern union {
.optional,
.optional_single_mut_pointer,
.optional_single_const_pointer,
- .@"anyframe",
- .anyframe_T,
.anyerror_void_error_union,
.error_set,
.error_set_single,
@@ -898,8 +885,6 @@ pub const Type = extern union {
.mut_slice,
.optional_single_const_pointer,
.optional_single_mut_pointer,
- .@"anyframe",
- .anyframe_T,
=> return @divExact(target.cpu.arch.ptrBitWidth(), 8),
.pointer => {
@@ -1025,7 +1010,7 @@ pub const Type = extern union {
.i64, .u64 => return 8,
.u128, .i128 => return 16,
- .@"anyframe", .anyframe_T, .isize, .usize => return @divExact(target.cpu.arch.ptrBitWidth(), 8),
+ .isize, .usize => return @divExact(target.cpu.arch.ptrBitWidth(), 8),
.const_slice,
.mut_slice,
@@ -1169,8 +1154,6 @@ pub const Type = extern union {
.const_slice,
.mut_slice,
.error_union,
- .@"anyframe",
- .anyframe_T,
.anyerror_void_error_union,
.error_set,
.error_set_single,
@@ -1244,8 +1227,6 @@ pub const Type = extern union {
.optional_single_const_pointer,
.enum_literal,
.error_union,
- .@"anyframe",
- .anyframe_T,
.anyerror_void_error_union,
.error_set,
.error_set_single,
@@ -1338,8 +1319,6 @@ pub const Type = extern union {
.optional_single_const_pointer,
.enum_literal,
.error_union,
- .@"anyframe",
- .anyframe_T,
.anyerror_void_error_union,
.error_set,
.error_set_single,
@@ -1416,8 +1395,6 @@ pub const Type = extern union {
.enum_literal,
.mut_slice,
.error_union,
- .@"anyframe",
- .anyframe_T,
.anyerror_void_error_union,
.error_set,
.error_set_single,
@@ -1503,8 +1480,6 @@ pub const Type = extern union {
.optional_single_const_pointer,
.enum_literal,
.error_union,
- .@"anyframe",
- .anyframe_T,
.anyerror_void_error_union,
.error_set,
.error_set_single,
@@ -1585,8 +1560,6 @@ pub const Type = extern union {
.optional_single_const_pointer,
.enum_literal,
.error_union,
- .@"anyframe",
- .anyframe_T,
.anyerror_void_error_union,
.error_set,
.error_set_single,
@@ -1709,8 +1682,6 @@ pub const Type = extern union {
.optional_single_mut_pointer => unreachable,
.enum_literal => unreachable,
.error_union => unreachable,
- .@"anyframe" => unreachable,
- .anyframe_T => unreachable,
.anyerror_void_error_union => unreachable,
.error_set => unreachable,
.error_set_single => unreachable,
@@ -1859,8 +1830,6 @@ pub const Type = extern union {
.optional_single_const_pointer,
.enum_literal,
.error_union,
- .@"anyframe",
- .anyframe_T,
.anyerror_void_error_union,
.error_set,
.error_set_single,
@@ -1931,8 +1900,6 @@ pub const Type = extern union {
.optional_single_const_pointer,
.enum_literal,
.error_union,
- .@"anyframe",
- .anyframe_T,
.anyerror_void_error_union,
.error_set,
.error_set_single,
@@ -2018,8 +1985,6 @@ pub const Type = extern union {
.optional_single_const_pointer,
.enum_literal,
.error_union,
- .@"anyframe",
- .anyframe_T,
.anyerror_void_error_union,
.error_set,
.error_set_single,
@@ -2101,8 +2066,6 @@ pub const Type = extern union {
.optional_single_const_pointer,
.enum_literal,
.error_union,
- .@"anyframe",
- .anyframe_T,
.anyerror_void_error_union,
.error_set,
.error_set_single,
@@ -2170,8 +2133,6 @@ pub const Type = extern union {
.optional_single_const_pointer,
.enum_literal,
.error_union,
- .@"anyframe",
- .anyframe_T,
.anyerror_void_error_union,
.error_set,
.error_set_single,
@@ -2267,8 +2228,6 @@ pub const Type = extern union {
.optional_single_const_pointer,
.enum_literal,
.error_union,
- .@"anyframe",
- .anyframe_T,
.anyerror_void_error_union,
.error_set,
.error_set_single,
@@ -2385,8 +2344,6 @@ pub const Type = extern union {
.optional_single_const_pointer,
.enum_literal,
.error_union,
- .@"anyframe",
- .anyframe_T,
.anyerror_void_error_union,
.error_set,
.error_set_single,
@@ -2469,8 +2426,6 @@ pub const Type = extern union {
.optional_single_const_pointer,
.enum_literal,
.error_union,
- .@"anyframe",
- .anyframe_T,
.anyerror_void_error_union,
.error_set,
.error_set_single,
@@ -2552,8 +2507,6 @@ pub const Type = extern union {
.optional_single_const_pointer,
.enum_literal,
.error_union,
- .@"anyframe",
- .anyframe_T,
.anyerror_void_error_union,
.error_set,
.error_set_single,
@@ -2635,8 +2588,6 @@ pub const Type = extern union {
.optional_single_const_pointer,
.enum_literal,
.error_union,
- .@"anyframe",
- .anyframe_T,
.anyerror_void_error_union,
.error_set,
.error_set_single,
@@ -2715,8 +2666,6 @@ pub const Type = extern union {
.optional_single_const_pointer,
.enum_literal,
.error_union,
- .@"anyframe",
- .anyframe_T,
.anyerror_void_error_union,
.error_set,
.error_set_single,
@@ -2795,8 +2744,6 @@ pub const Type = extern union {
.optional_single_const_pointer,
.enum_literal,
.error_union,
- .@"anyframe",
- .anyframe_T,
.anyerror_void_error_union,
.error_set,
.error_set_single,
@@ -2875,8 +2822,6 @@ pub const Type = extern union {
.optional_single_const_pointer,
.enum_literal,
.error_union,
- .@"anyframe",
- .anyframe_T,
.anyerror_void_error_union,
.error_set,
.error_set_single,
@@ -2939,8 +2884,6 @@ pub const Type = extern union {
.optional_single_const_pointer,
.enum_literal,
.anyerror_void_error_union,
- .anyframe_T,
- .@"anyframe",
.error_union,
.error_set,
.error_set_single,
@@ -3047,8 +2990,6 @@ pub const Type = extern union {
.optional_single_const_pointer,
.enum_literal,
.error_union,
- .@"anyframe",
- .anyframe_T,
.anyerror_void_error_union,
.error_set,
.error_set_single,
@@ -3136,8 +3077,6 @@ pub const Type = extern union {
.optional_single_const_pointer,
.enum_literal,
.error_union,
- .@"anyframe",
- .anyframe_T,
.anyerror_void_error_union,
.error_set,
.error_set_single,
@@ -3259,7 +3198,6 @@ pub const Type = extern union {
fn_ccc_void_no_args,
single_const_pointer_to_comptime_int,
anyerror_void_error_union,
- @"anyframe",
const_slice_u8,
/// This is a special type for variadic parameters of a function call.
/// Casts to it will validate that the type can be passed to a c calling convetion function.
@@ -3292,7 +3230,6 @@ pub const Type = extern union {
optional_single_mut_pointer,
optional_single_const_pointer,
error_union,
- anyframe_T,
error_set,
error_set_single,
empty_struct,
@@ -3345,7 +3282,6 @@ pub const Type = extern union {
.fn_ccc_void_no_args,
.single_const_pointer_to_comptime_int,
.anyerror_void_error_union,
- .@"anyframe",
.const_slice_u8,
.inferred_alloc_const,
.inferred_alloc_mut,
@@ -3367,7 +3303,6 @@ pub const Type = extern union {
.optional,
.optional_single_mut_pointer,
.optional_single_const_pointer,
- .anyframe_T,
=> Payload.ElemType,
.int_signed,