| ... | @@ -43,7 +43,8 @@ pub const Type = struct { | ... | @@ -43,7 +43,8 @@ pub const Type = struct { |
| 43 | Id.BoundFn => @fieldParentPtr(BoundFn, "base", base).destroy(comp), | 43 | Id.BoundFn => @fieldParentPtr(BoundFn, "base", base).destroy(comp), |
| 44 | Id.ArgTuple => @fieldParentPtr(ArgTuple, "base", base).destroy(comp), | 44 | Id.ArgTuple => @fieldParentPtr(ArgTuple, "base", base).destroy(comp), |
| 45 | Id.Opaque => @fieldParentPtr(Opaque, "base", base).destroy(comp), | 45 | Id.Opaque => @fieldParentPtr(Opaque, "base", base).destroy(comp), |
| 46 | Id.Promise => @fieldParentPtr(Promise, "base", base).destroy(comp), | 46 | Id.Frame => @fieldParentPtr(Frame, "base", base).destroy(comp), |
| | 47 | Id.AnyFrame => @fieldParentPtr(AnyFrame, "base", base).destroy(comp), |
| 47 | Id.Vector => @fieldParentPtr(Vector, "base", base).destroy(comp), | 48 | Id.Vector => @fieldParentPtr(Vector, "base", base).destroy(comp), |
| 48 | } | 49 | } |
| 49 | } | 50 | } |
| ... | @@ -77,7 +78,8 @@ pub const Type = struct { | ... | @@ -77,7 +78,8 @@ pub const Type = struct { |
| 77 | Id.BoundFn => return @fieldParentPtr(BoundFn, "base", base).getLlvmType(allocator, llvm_context), | 78 | Id.BoundFn => return @fieldParentPtr(BoundFn, "base", base).getLlvmType(allocator, llvm_context), |
| 78 | Id.ArgTuple => unreachable, | 79 | Id.ArgTuple => unreachable, |
| 79 | Id.Opaque => return @fieldParentPtr(Opaque, "base", base).getLlvmType(allocator, llvm_context), | 80 | Id.Opaque => return @fieldParentPtr(Opaque, "base", base).getLlvmType(allocator, llvm_context), |
| 80 | Id.Promise => return @fieldParentPtr(Promise, "base", base).getLlvmType(allocator, llvm_context), | 81 | Id.Frame => return @fieldParentPtr(Frame, "base", base).getLlvmType(allocator, llvm_context), |
| | 82 | Id.AnyFrame => return @fieldParentPtr(AnyFrame, "base", base).getLlvmType(allocator, llvm_context), |
| 81 | Id.Vector => return @fieldParentPtr(Vector, "base", base).getLlvmType(allocator, llvm_context), | 83 | Id.Vector => return @fieldParentPtr(Vector, "base", base).getLlvmType(allocator, llvm_context), |
| 82 | } | 84 | } |
| 83 | } | 85 | } |
| ... | @@ -104,7 +106,8 @@ pub const Type = struct { | ... | @@ -104,7 +106,8 @@ pub const Type = struct { |
| 104 | Id.ErrorSet, | 106 | Id.ErrorSet, |
| 105 | Id.Enum, | 107 | Id.Enum, |
| 106 | Id.Fn, | 108 | Id.Fn, |
| 107 | Id.Promise, | 109 | Id.Frame, |
| | 110 | Id.AnyFrame, |
| 108 | Id.Vector, | 111 | Id.Vector, |
| 109 | => return false, | 112 | => return false, |
| 110 | | 113 | |
| ... | @@ -137,7 +140,8 @@ pub const Type = struct { | ... | @@ -137,7 +140,8 @@ pub const Type = struct { |
| 137 | Id.Int, | 140 | Id.Int, |
| 138 | Id.Float, | 141 | Id.Float, |
| 139 | Id.Fn, | 142 | Id.Fn, |
| 140 | Id.Promise, | 143 | Id.Frame, |
| | 144 | Id.AnyFrame, |
| 141 | Id.Vector, | 145 | Id.Vector, |
| 142 | => return true, | 146 | => return true, |
| 143 | | 147 | |
| ... | @@ -1059,14 +1063,26 @@ pub const Type = struct { | ... | @@ -1059,14 +1063,26 @@ pub const Type = struct { |
| 1059 | } | 1063 | } |
| 1060 | }; | 1064 | }; |
| 1061 | | 1065 | |
| 1062 | pub const Promise = struct { | 1066 | pub const Frame = struct { |
| 1063 | base: Type, | 1067 | base: Type, |
| 1064 | | 1068 | |
| 1065 | pub fn destroy(self: *Promise, comp: *Compilation) void { | 1069 | pub fn destroy(self: *Frame, comp: *Compilation) void { |
| 1066 | comp.gpa().destroy(self); | 1070 | comp.gpa().destroy(self); |
| 1067 | } | 1071 | } |
| 1068 | | 1072 | |
| 1069 | pub fn getLlvmType(self: *Promise, allocator: *Allocator, llvm_context: *llvm.Context) *llvm.Type { | 1073 | pub fn getLlvmType(self: *Frame, allocator: *Allocator, llvm_context: *llvm.Context) *llvm.Type { |
| | 1074 | @panic("TODO"); |
| | 1075 | } |
| | 1076 | }; |
| | 1077 | |
| | 1078 | pub const AnyFrame = struct { |
| | 1079 | base: Type, |
| | 1080 | |
| | 1081 | pub fn destroy(self: *AnyFrame, comp: *Compilation) void { |
| | 1082 | comp.gpa().destroy(self); |
| | 1083 | } |
| | 1084 | |
| | 1085 | pub fn getLlvmType(self: *AnyFrame, allocator: *Allocator, llvm_context: *llvm.Context) *llvm.Type { |
| 1070 | @panic("TODO"); | 1086 | @panic("TODO"); |
| 1071 | } | 1087 | } |
| 1072 | }; | 1088 | }; |