Skip to content

Commit 8b15b05

Browse files
al45tairglessard
authored andcommitted
Revert "[Concurrency] Provide a Swift interface for custom main and global executors."
1 parent 7da2333 commit 8b15b05

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+426
-3611
lines changed

include/swift/AST/DiagnosticsSIL.def

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,14 +1133,6 @@ NOTE(rbi_add_generic_parameter_sendable_conformance,none,
11331133
"consider making generic parameter %0 conform to the 'Sendable' protocol",
11341134
(Type))
11351135

1136-
// Concurrency related diagnostics
1137-
ERROR(cannot_find_executor_factory_type, none,
1138-
"the specified executor factory '%0' could not be found", (StringRef))
1139-
ERROR(executor_factory_must_conform, none,
1140-
"the executor factory '%0' does not conform to 'ExecutorFactory'", (Type))
1141-
ERROR(executor_factory_not_supported, none,
1142-
"deployment target too low for executor factory specification", ())
1143-
11441136
//===----------------------------------------------------------------------===//
11451137
// MARK: Misc Diagnostics
11461138
//===----------------------------------------------------------------------===//

include/swift/AST/FeatureAvailability.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ FEATURE(IsolatedDeinit, (6, 1))
8080

8181
FEATURE(ValueGenericType, (6, 2))
8282
FEATURE(InitRawStructMetadata2, (6, 2))
83-
FEATURE(CustomExecutors, (6, 2))
8483

8584
FEATURE(TaskExecutor, FUTURE)
8685
FEATURE(Differentiation, FUTURE)

include/swift/AST/KnownProtocols.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ PROTOCOL(Executor)
9797
PROTOCOL(SerialExecutor)
9898
PROTOCOL(TaskExecutor)
9999
PROTOCOL(GlobalActor)
100-
PROTOCOL(ExecutorFactory)
101100

102101
PROTOCOL_(BridgedNSError)
103102
PROTOCOL_(BridgedStoredNSError)

include/swift/Basic/LangOptions.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,10 +401,6 @@ namespace swift {
401401
/// Specifies how strict concurrency checking will be.
402402
StrictConcurrency StrictConcurrencyLevel = StrictConcurrency::Minimal;
403403

404-
/// Specifies the name of the executor factory to use to create the
405-
/// default executors for Swift Concurrency.
406-
std::optional<std::string> ExecutorFactory;
407-
408404
/// Enable experimental concurrency model.
409405
bool EnableExperimentalConcurrency = false;
410406

include/swift/Option/Options.td

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -985,16 +985,6 @@ def strict_concurrency : Joined<["-"], "strict-concurrency=">,
985985
"concurrency model, or 'complete' ('Sendable' and other checking is "
986986
"enabled for all code in the module)">;
987987

988-
def executor_factory : JoinedOrSeparate<["-"], "executor-factory">,
989-
Flags<[FrontendOption]>,
990-
HelpText<"Specify the factory to use to create the default executors for "
991-
"Swift Concurrency. This must be a type conforming to the "
992-
"'ExecutorFactory' protocol.">,
993-
MetaVarName<"<factory-type>">;
994-
def executor_factory_EQ : Joined<["-"], "executor-factory=">,
995-
Flags<[FrontendOption]>,
996-
Alias<executor_factory>;
997-
998988
def enable_experimental_feature :
999989
Separate<["-"], "enable-experimental-feature">,
1000990
Flags<[FrontendOption, ModuleInterfaceOption]>,

include/swift/Runtime/Concurrency.h

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -149,29 +149,6 @@ SWIFT_EXPORT_FROM(swift_Concurrency)
149149
CoroAllocator *const _swift_coro_malloc_allocator;
150150
// }} TODO: CoroutineAccessors
151151

152-
/// Deallocate memory in a task.
153-
///
154-
/// The pointer provided must be the last pointer allocated on
155-
/// this task that has not yet been deallocated; that is, memory
156-
/// must be allocated and deallocated in a strict stack discipline.
157-
SWIFT_EXPORT_FROM(swift_Concurrency) SWIFT_CC(swift)
158-
void swift_task_dealloc(void *ptr);
159-
160-
/// Allocate memory in a job.
161-
///
162-
/// All allocations will be rounded to a multiple of MAX_ALIGNMENT;
163-
/// if the job does not support allocation, this will return NULL.
164-
SWIFT_EXPORT_FROM(swift_Concurrency) SWIFT_CC(swift)
165-
void *swift_job_allocate(Job *job, size_t size);
166-
167-
/// Deallocate memory in a job.
168-
///
169-
/// The pointer provided must be the last pointer allocated on
170-
/// this task that has not yet been deallocated; that is, memory
171-
/// must be allocated and deallocated in a strict stack discipline.
172-
SWIFT_EXPORT_FROM(swift_Concurrency) SWIFT_CC(swift)
173-
void swift_job_deallocate(Job *job, void *ptr);
174-
175152
/// Cancel a task and all of its child tasks.
176153
///
177154
/// This can be called from any thread.

lib/AST/ASTContext.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1447,7 +1447,6 @@ ProtocolDecl *ASTContext::getProtocol(KnownProtocolKind kind) const {
14471447
case KnownProtocolKind::Executor:
14481448
case KnownProtocolKind::TaskExecutor:
14491449
case KnownProtocolKind::SerialExecutor:
1450-
case KnownProtocolKind::ExecutorFactory:
14511450
M = getLoadedModule(Id_Concurrency);
14521451
break;
14531452
case KnownProtocolKind::DistributedActor:

lib/ClangImporter/SortedCFDatabase.def.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ with codecs.open(CFDatabaseFile, encoding='utf-8', errors='strict') as f:
3939
continue
4040

4141
# Otherwise, check for lines like FOO(BAR)
42-
m = re.match(r'^\w+\((\w+)\)', line)
42+
m = re.match('^\w+\((\w+)\)', line)
4343
if m:
4444
lineForName[m.group(1)] = line
4545
}%

lib/Driver/ToolChains.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -377,10 +377,6 @@ void ToolChain::addCommonFrontendArgs(const OutputInfo &OI,
377377
arguments.push_back(inputArgs.MakeArgString(globalRemapping));
378378
}
379379

380-
if (inputArgs.hasArg(options::OPT_executor_factory)) {
381-
inputArgs.AddLastArg(arguments, options::OPT_executor_factory);
382-
}
383-
384380
// Pass through the values passed to -Xfrontend.
385381
inputArgs.AddAllArgValues(arguments, options::OPT_Xfrontend);
386382

lib/Frontend/CompilerInvocation.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1364,12 +1364,6 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
13641364
Opts.enableFeature(Feature::RegionBasedIsolation);
13651365
}
13661366

1367-
// Get the executor factory name
1368-
if (const Arg *A = Args.getLastArg(OPT_executor_factory)) {
1369-
printf("Got executor-factory option\n");
1370-
Opts.ExecutorFactory = A->getValue();
1371-
}
1372-
13731367
Opts.WarnImplicitOverrides =
13741368
Args.hasArg(OPT_warn_implicit_overrides);
13751369

0 commit comments

Comments
 (0)