File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,16 @@ AsyncContextLayout irgen::getAsyncContextLayout(
131
131
// ExecutorRef ResumeParentExecutor;
132
132
addExecutor ();
133
133
134
+ // AsyncContextFlags Flags;
135
+ {
136
+ auto ty = SILType::getPrimitiveObjectType (
137
+ BuiltinIntegerType::get (32 , IGF.IGM .IRGen .SIL .getASTContext ())
138
+ ->getCanonicalType ());
139
+ const auto &ti = IGF.IGM .getTypeInfo (ty);
140
+ valTypes.push_back (ty);
141
+ typeInfos.push_back (&ti);
142
+ }
143
+
134
144
// SwiftError *errorResult;
135
145
auto errorCanType = IGF.IGM .Context .getExceptionType ();
136
146
auto errorType = SILType::getPrimitiveObjectType (errorCanType);
Original file line number Diff line number Diff line change @@ -96,7 +96,8 @@ namespace irgen {
96
96
Parent = 0 ,
97
97
ResumeParent = 1 ,
98
98
ResumeParentExecutor = 2 ,
99
- Error = 3 ,
99
+ Flags = 3 ,
100
+ Error = 4 ,
100
101
};
101
102
enum class FixedCount : unsigned {
102
103
Parent = 1 ,
@@ -124,6 +125,7 @@ namespace irgen {
124
125
unsigned getResumeParentExecutorIndex () {
125
126
return (unsigned )FixedIndex::ResumeParentExecutor;
126
127
}
128
+ unsigned getFlagsIndex () { return (unsigned )FixedIndex::Flags; }
127
129
unsigned getErrorIndex () { return (unsigned )FixedIndex::Error; }
128
130
unsigned getFirstIndirectReturnIndex () {
129
131
return getErrorIndex () + getErrorCount ();
@@ -176,6 +178,7 @@ namespace irgen {
176
178
ElementLayout getResumeParentExecutorLayout () {
177
179
return getElement (getResumeParentExecutorIndex ());
178
180
}
181
+ ElementLayout getFlagsLayout () { return getElement (getFlagsIndex ()); }
179
182
bool canHaveError () { return canHaveValidError; }
180
183
ElementLayout getErrorLayout () { return getElement (getErrorIndex ()); }
181
184
unsigned getErrorCount () { return (unsigned )FixedCount::Error; }
You can’t perform that action at this time.
0 commit comments