First cut of making coroutine AST type

This commit is contained in:
Anton Korobeynikov
2024-08-13 22:27:02 -07:00
parent 797f500286
commit 76c9a23f27
32 changed files with 223 additions and 71 deletions

View File

@@ -58,7 +58,7 @@ const uint16_t SWIFTMODULE_VERSION_MAJOR = 0;
/// describe what change you made. The content of this comment isn't important;
/// it just ensures a conflict if two people change the module format.
/// Don't worry about adhering to the 80-column limit for this line.
const uint16_t SWIFTMODULE_VERSION_MINOR = 974; // remove 'isCallerIsolated' bit from ParamDecl
const uint16_t SWIFTMODULE_VERSION_MINOR = 975; // coro AST
/// A standard hash seed used for all string hashes in a serialized module.
///
@@ -1351,6 +1351,12 @@ namespace decls_block {
TypeIDField // type
>;
TYPE_LAYOUT(YieldResultTypeLayout,
YIELDS_TYPE,
TypeIDField, // inner type
BCFixed<1> // inout?
);
TYPE_LAYOUT(FunctionTypeLayout,
FUNCTION_TYPE,
TypeIDField, // output
@@ -1363,7 +1369,8 @@ namespace decls_block {
TypeIDField, // thrown error
DifferentiabilityKindField, // differentiability kind
FunctionTypeIsolationField, // isolation
BCFixed<1> // has sending result
BCFixed<1>, // has sending result
BCFixed<1> // coroutine?
// trailed by parameters
// Optionally lifetime dependence info
);
@@ -1465,6 +1472,7 @@ namespace decls_block {
DifferentiabilityKindField, // differentiability kind
FunctionTypeIsolationField, // isolation
BCFixed<1>, // has sending result
BCFixed<1>, // coroutine?
GenericSignatureIDField // generic signature
// trailed by parameters