Introduce a createAsyncTaskInGroup SIL builtin.

Rather than using group task options constructed from the Swift parts
of the _Concurrency library and passed through `createAsyncTask`'s
options, introduce a separate builtin that always takes a group. Move
the responsibility for creating the options structure into IRGen, so
we don't need to expose the TaskGroupTaskOptionRecord type in Swift.
This commit is contained in:
Doug Gregor
2021-06-23 15:39:37 -07:00
parent 23e6f7b363
commit e7e922ea77
18 changed files with 194 additions and 85 deletions

View File

@@ -52,5 +52,6 @@ LANGUAGE_FEATURE(InheritActorContext, 0, "@_inheritActorContext attribute", true
LANGUAGE_FEATURE(ImplicitSelfCapture, 0, "@_implicitSelfCapture attribute", true)
LANGUAGE_FEATURE(BuiltinBuildExecutor, 0, "Executor-building builtins", true)
LANGUAGE_FEATURE(BuiltinBuildMainExecutor, 0, "MainActor executor building builtin", true)
LANGUAGE_FEATURE(BuiltinCreateAsyncTaskInGroup, 0, "MainActor executor building builtin", true)
#undef LANGUAGE_FEATURE