| ... | ... | @@ -43,7 +43,8 @@ pub const Type = struct { |
| 43 | 43 | Id.BoundFn => @fieldParentPtr(BoundFn, "base", base).destroy(comp), |
| 44 | 44 | Id.ArgTuple => @fieldParentPtr(ArgTuple, "base", base).destroy(comp), |
| 45 | 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 | 48 | Id.Vector => @fieldParentPtr(Vector, "base", base).destroy(comp), |
| 48 | 49 | } |
| 49 | 50 | } |
| ... | ... | @@ -77,7 +78,8 @@ pub const Type = struct { |
| 77 | 78 | Id.BoundFn => return @fieldParentPtr(BoundFn, "base", base).getLlvmType(allocator, llvm_context), |
| 78 | 79 | Id.ArgTuple => unreachable, |
| 79 | 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 | 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 | 106 | Id.ErrorSet, |
| 105 | 107 | Id.Enum, |
| 106 | 108 | Id.Fn, |
| 107 | | Id.Promise, |
| 109 | Id.Frame, |
| 110 | Id.AnyFrame, |
| 108 | 111 | Id.Vector, |
| 109 | 112 | => return false, |
| 110 | 113 | |
| ... | ... | @@ -137,7 +140,8 @@ pub const Type = struct { |
| 137 | 140 | Id.Int, |
| 138 | 141 | Id.Float, |
| 139 | 142 | Id.Fn, |
| 140 | | Id.Promise, |
| 143 | Id.Frame, |
| 144 | Id.AnyFrame, |
| 141 | 145 | Id.Vector, |
| 142 | 146 | => return true, |
| 143 | 147 | |
| ... | ... | @@ -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 | 1067 | base: Type, |
| 1064 | 1068 | |
| 1065 | | pub fn destroy(self: *Promise, comp: *Compilation) void { |
| 1069 | pub fn destroy(self: *Frame, comp: *Compilation) void { |
| 1066 | 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 | 1086 | @panic("TODO"); |
| 1071 | 1087 | } |
| 1072 | 1088 | }; |