Skip to content

Commit 8ebe1e0

Browse files
committed
Grammatical corrections for compound modifiers
1 parent 3f916f5 commit 8ebe1e0

40 files changed

+93
-93
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ And the module structure to support such applications looks like this:
276276

277277
* [SE-0430][]:
278278

279-
Region Based Isolation is now extended to enable the application of an
279+
Region-Based Isolation is now extended to enable the application of an
280280
explicit `sending` annotation to function parameters and results. A function
281281
parameter or result that is annotated with `sending` is required to be
282282
disconnected at the function boundary and thus possesses the capability of
@@ -314,7 +314,7 @@ And the module structure to support such applications looks like this:
314314

315315
func useValue() {
316316
let x = NonSendableType()
317-
let a = await MyActor(x) // Error without Region Based Isolation!
317+
let a = await MyActor(x) // Error without Region-Based Isolation!
318318
}
319319
```
320320

docs/SIL.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ autorelease in the callee.
699699
- A generic type that conforms to Actor or AnyActor.
700700

701701
and must be the actor instance that a function is isolated to. Importantly
702-
this means that global actor isolated nominal types are never
702+
this means that global-actor-isolated nominal types are never
703703
``@sil_isolated``. Only one parameter can ever be marked as ``@sil_isolated``
704704
since a function cannot be isolated to multiple actors at the same time.
705705

include/swift/AST/DiagnosticsSIL.def

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -935,10 +935,10 @@ NOTE(sil_referencebinding_inout_binding_here, none,
935935
())
936936

937937
//===----------------------------------------------------------------------===//
938-
// MARK: Region Based Isolation Diagnostics
938+
// MARK: Region-Based Isolation Diagnostics
939939
//===----------------------------------------------------------------------===//
940940

941-
// READ THIS: Please when adding diagnostics for region based isolation, keep
941+
// READ THIS: Please when adding diagnostics for region-based isolation, keep
942942
// them ordered in sections depending on which emitter uses it. It makes it
943943
// easier for people unfamiliar with the code to quickly see which diagnostics
944944
// are used by which of the SendNonSendable emitters use.
@@ -947,7 +947,7 @@ NOTE(sil_referencebinding_inout_binding_here, none,
947947
// Misc
948948

949949
ERROR(regionbasedisolation_unknown_pattern, none,
950-
"pattern that the region based isolation checker does not understand how to check. Please file a bug",
950+
"pattern that the region-based isolation checker does not understand how to check. Please file a bug",
951951
())
952952
NOTE(regionbasedisolation_maybe_race, none,
953953
"access can happen concurrently", ())
@@ -1059,13 +1059,13 @@ NOTE(regionbasedisolation_typed_transferneversendable_via_arg_callee, none,
10591059
// Error that is only used when the send non sendable emitter cannot discover any
10601060
// information to give a better diagnostic.
10611061
ERROR(regionbasedisolation_task_or_actor_isolated_transferred, none,
1062-
"task or actor isolated value cannot be sent", ())
1062+
"task or actor-isolated value cannot be sent", ())
10631063

10641064
//===
10651065
// InOut Sending Emitter
10661066

10671067
NOTE(regionbasedisolation_inout_sending_must_be_reinitialized, none,
1068-
"'inout sending' parameter must be reinitialized before function exit with a non-actor isolated value",
1068+
"'inout sending' parameter must be reinitialized before function exit with a non-actor-isolated value",
10691069
())
10701070
ERROR(regionbasedisolation_inout_sending_cannot_be_actor_isolated, none,
10711071
"'inout sending' parameter %0 cannot be %1at end of function",

include/swift/AST/DiagnosticsSema.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5609,7 +5609,7 @@ ERROR(actor_isolated_witness,none,
56095609
"requirement",
56105610
(bool, ActorIsolation, const ValueDecl *, ActorIsolation))
56115611
ERROR(actor_cannot_conform_to_global_actor_protocol,none,
5612-
"actor %0 cannot conform to global actor isolated protocol %1",
5612+
"actor %0 cannot conform to global-actor-isolated protocol %1",
56135613
(Type, Type))
56145614
NOTE(protocol_isolated_to_global_actor_here,none,
56155615
"%0 is isolated to global actor %1 here", (Type, Type))

include/swift/Option/FrontendOptions.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1395,7 +1395,7 @@ def disable_experimental_parser_round_trip : Flag<["-"],
13951395

13961396
def disable_sending_args_and_results_with_region_isolation : Flag<["-"],
13971397
"disable-sending-args-and-results-with-region-based-isolation">,
1398-
HelpText<"Disable sending args and results when region based isolation is enabled. Only enabled with asserts">,
1398+
HelpText<"Disable sending args and results when region-based isolation is enabled. Only enabled with asserts">,
13991399
Flags<[HelpHidden]>;
14001400

14011401
def scanner_module_validation: Flag<["-"], "scanner-module-validation">,

include/swift/SILOptimizer/Analysis/RegionAnalysis.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,15 +303,15 @@ class RegionAnalysisValueMap {
303303
RegionAnalysisValueMap(SILFunction *fn) : fn(fn) { }
304304

305305
/// Returns the value for this instruction if it isn't a fake "represenative
306-
/// value" to inject actor isolatedness. Asserts in such a case.
306+
/// value" to inject actor isolation. Asserts in such a case.
307307
SILValue getRepresentative(Element trackableValueID) const;
308308

309309
/// Returns the value for this instruction. If it is a fake "representative
310310
/// value" returns an empty SILValue.
311311
SILValue maybeGetRepresentative(Element trackableValueID) const;
312312

313313
/// Returns the value for this instruction if it isn't a fake "represenative
314-
/// value" to inject actor isolatedness. Asserts in such a case.
314+
/// value" to inject actor isolation. Asserts in such a case.
315315
RepresentativeValue getRepresentativeValue(Element trackableValueID) const;
316316

317317
/// Returns the fake "representative value" for this element if it

include/swift/SILOptimizer/PassManager/Passes.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ PASS(IVInfoPrinter, "iv-info-printer",
278278
PASS(LowerHopToActor, "lower-hop-to-actor",
279279
"Lower hop_to_executor instructions with actor operands")
280280
PASS(OptimizeHopToExecutor, "optimize-hop-to-executor",
281-
"Optimize hop_to_executor instructions for actor isolated code")
281+
"Optimize hop_to_executor instructions for actor-isolated code")
282282
PASS(InstCount, "inst-count",
283283
"Record SIL Instruction, Block, and Function Counts as LLVM Statistics")
284284
PASS(JumpThreadSimplifyCFG, "jumpthread-simplify-cfg",

include/swift/SILOptimizer/Utils/PartitionUtils.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class TransferringOperandToStateMap;
9292
/// The representative value of the equivalence class that makes up a tracked
9393
/// value.
9494
///
95-
/// We use a wrapper struct here so that we can inject "fake" actor isolated
95+
/// We use a wrapper struct here so that we can inject "fake" actor-isolated
9696
/// values into the regions of values that become merged into an actor by
9797
/// calling a function without a non-sendable result.
9898
class RepresentativeValue {
@@ -102,8 +102,8 @@ class RepresentativeValue {
102102

103103
/// If this is set to a SILValue then it is the actual represented value. If
104104
/// it is set to a SILInstruction, then this is a "fake" representative value
105-
/// used to inject actor isolatedness. The instruction stored is the
106-
/// instruction that introduced the actor isolated-ness.
105+
/// used to inject actor isolation. The instruction stored is the
106+
/// instruction that introduced the actor isolation.
107107
InnerType value;
108108

109109
public:

include/swift/SILOptimizer/Utils/SILIsolationInfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ class SILIsolationInfo {
445445
/// for the isolated values if any to not match.
446446
///
447447
/// This is useful if one has two non-Sendable values projected from the same
448-
/// actor or global actor isolated value. E.x.: two different ref_element_addr
448+
/// actor or global-actor-isolated value. E.x.: two different ref_element_addr
449449
/// from the same actor.
450450
bool hasSameIsolation(const SILIsolationInfo &other) const;
451451

lib/AST/Decl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11373,7 +11373,7 @@ ActorIsolation::forActorInstanceParameter(Expr *actor,
1137311373
return ActorIsolation::forNonisolated(/*unsafe*/false);
1137411374

1137511375
// An isolated value of `<global actor type>.shared` is statically
11376-
// global actor isolated.
11376+
// global-actor-isolated.
1137711377
if (auto *memberRef = dyn_cast<MemberRefExpr>(actor)) {
1137811378
// Check that the member declaration witnesses the `shared`
1137911379
// requirement of the `GlobalActor` protocol.

lib/DriverTool/sil_opt_main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ int sil_opt_main(ArrayRef<const char *> argv, void *MainAddr) {
788788
}
789789

790790
// If we have strict concurrency set as a feature and were told to turn off
791-
// region based isolation... do so now.
791+
// region-based isolation... do so now.
792792
if (Invocation.getLangOptions().hasFeature(Feature::StrictConcurrency)) {
793793
Invocation.getLangOptions().enableFeature(Feature::RegionBasedIsolation);
794794
}

lib/SILGen/SILGenApply.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ FunctionTypeInfo SILGenFunction::getClosureTypeInfo(AbstractClosureExpr *expr) {
6262
auto fnType = cast<AnyFunctionType>(expr->getType()->getCanonicalType());
6363

6464
// If we have a closure expr that has inherits actor context, work around AST
65-
// issues that causes us to be able to get non-Sendable actor isolated
65+
// issues that causes us to be able to get non-Sendable actor-isolated
6666
// closures.
6767
if (auto *ce = dyn_cast<ClosureExpr>(expr)) {
6868
if (ce->inheritsActorContext() && fnType->isAsync() &&

lib/SILGen/SILGenConcurrency.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void SILGenFunction::emitExpectedExecutor() {
8585
!F.isDefer();
8686

8787
// FIXME: Avoid loading and checking the expected executor if concurrency is
88-
// unavailable. This is specifically relevant for MainActor isolated contexts,
88+
// unavailable. This is specifically relevant for MainActor-isolated contexts,
8989
// which are allowed to be available on OSes where concurrency is not
9090
// available. rdar://106827064
9191

lib/SILGen/SILGenConstructor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ static void emitImplicitValueConstructor(SILGenFunction &SGF,
581581
// FIXME: the callers of ctorHopsInjectedByDefiniteInit is not correct (rdar://87485045)
582582
// we must still set the SGF.ExpectedExecutor field to say that we must
583583
// hop to the executor after every apply in the constructor. This seems to
584-
// happen for the main actor isolated async inits, but not for the plain ones,
584+
// happen for the MainActor-isolated async inits, but not for the plain ones,
585585
// where 'self' is not going to directly be the instance. We have to extend the
586586
// ExecutorBreadcrumb class to detect whether it needs to do a load or not
587587
// in it's emit method.

lib/SILGen/SILGenFunction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ class LLVM_LIBRARY_VISIBILITY SILGenFunction
730730
FunctionTypeInfo getFunctionTypeInfo(CanAnyFunctionType fnType);
731731

732732
/// A helper method that calls getFunctionTypeInfo that also marks global
733-
/// actor isolated async closures that are not sendable as sendable.
733+
/// actor-isolated async closures that are not sendable as sendable.
734734
FunctionTypeInfo getClosureTypeInfo(AbstractClosureExpr *expr);
735735

736736
bool isEmittingTopLevelCode() { return IsEmittingTopLevelCode; }

lib/SILOptimizer/Analysis/RegionAnalysis.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,7 @@ struct PartitionOpBuilder {
12191219
lookupValueID(srcOperand->get()), srcOperand));
12201220
}
12211221

1222-
/// Mark \p value artifically as being part of an actor isolated region by
1222+
/// Mark \p value artifically as being part of an actor-isolated region by
12231223
/// introducing a new fake actor introducing representative and merging them.
12241224
void addActorIntroducingInst(SILValue sourceValue, Operand *sourceOperand,
12251225
SILIsolationInfo actorIsolation) {
@@ -1271,7 +1271,7 @@ struct PartitionOpBuilder {
12711271
namespace {
12721272

12731273
enum class TranslationSemantics {
1274-
/// An instruction that does not affect region based state or if it does we
1274+
/// An instruction that does not affect region-based state or if it does we
12751275
/// would like to error on some other use. An example would be something
12761276
/// like end_borrow, inject_enum_addr, or alloc_global. We do not produce
12771277
/// any partition op.
@@ -1908,7 +1908,7 @@ class PartitionOpTranslator {
19081908
void translateSILPartialApply(PartialApplyInst *pai) {
19091909
// First check if our partial apply is Sendable and not global actor
19101910
// isolated. In such a case, we will have emitted an earlier warning in Sema
1911-
// and can return early. If we have a global actor isolated partial_apply,
1911+
// and can return early. If we have a global-actor-isolated partial_apply,
19121912
// we can be looser and can use region isolation since we know that the
19131913
// Sendable closure will be executed serially due to the closure having to
19141914
// run on the global actor queue meaning that we do not have to worry about

lib/SILOptimizer/Mandatory/TransferNonSendable.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ struct InOutSendingNotDisconnectedInfo {
502502
/// The 'inout sending' param that we are emitting an error for.
503503
SILValue inoutSendingParam;
504504

505-
/// The dynamic actor isolated region info of our 'inout sending' value's
505+
/// The dynamic actor-isolated region info of our 'inout sending' value's
506506
/// region at the terminator inst.
507507
SILDynamicMergedIsolationInfo actorIsolatedRegionInfo;
508508

@@ -1099,7 +1099,7 @@ struct UseAfterTransferDiagnosticInferrer::AutoClosureWalker : ASTWalker {
10991099
continue;
11001100
}
11011101

1102-
// Otherwise, we are calling an actor isolated function in the async
1102+
// Otherwise, we are calling an actor-isolated function in the async
11031103
// let. Emit a better error.
11041104

11051105
// See if we can find a valueDecl/name for our callee so we can
@@ -2523,7 +2523,7 @@ struct DiagnosticEvaluator final
25232523
// Otherwise, just use the actual value.
25242524
//
25252525
// TODO: We are eventually going to want to be able to say that it is b/c
2526-
// of the actor isolated parameter. Maybe we should put in the actual
2526+
// of the actor-isolated parameter. Maybe we should put in the actual
25272527
// region isolation info here.
25282528
self->transferredNonTransferrable.emplace_back(
25292529
partitionOp.getSourceOp(),

lib/SILOptimizer/Utils/RegionIsolation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ LoggingFlag swift::regionisolation::ENABLE_LOGGING;
2626
static llvm::cl::opt<LoggingFlag, true> // The parser
2727
RegionBasedIsolationLog(
2828
"sil-regionbasedisolation-log",
29-
llvm::cl::desc("Enable logging for SIL region based isolation "
29+
llvm::cl::desc("Enable logging for SIL region-based isolation "
3030
"diagnostics"),
3131
llvm::cl::Hidden,
3232
llvm::cl::values(

lib/SILOptimizer/Utils/SILIsolationInfo.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,8 @@ SILIsolationInfo SILIsolationInfo::get(SILInstruction *inst) {
535535

536536
// Then check if we have something that is nonisolated unsafe.
537537
if (isolation.isNonisolatedUnsafe()) {
538-
// First check if our function_ref is a method of a global actor isolated
539-
// type. In such a case, we create a global actor isolated
538+
// First check if our function_ref is a method of a global-actor-isolated
539+
// type. In such a case, we create a global-actor-isolated
540540
// nonisolated(unsafe) so that if we assign the value to another variable,
541541
// the variable still says that it is the appropriate global actor
542542
// isolated thing.
@@ -667,7 +667,7 @@ SILIsolationInfo SILIsolationInfo::get(SILInstruction *inst) {
667667
}
668668
}
669669

670-
// See if we have a struct_extract from a global actor isolated type.
670+
// See if we have a struct_extract from a global-actor-isolated type.
671671
if (auto *sei = dyn_cast<StructExtractInst>(inst)) {
672672
auto varIsolation = swift::getActorIsolation(sei->getField());
673673
if (auto isolation =
@@ -688,12 +688,12 @@ SILIsolationInfo SILIsolationInfo::get(SILInstruction *inst) {
688688
varIsolation.isNonisolatedUnsafe());
689689
}
690690

691-
// See if we have an unchecked_enum_data from a global actor isolated type.
691+
// See if we have an unchecked_enum_data from a global-actor-isolated type.
692692
if (auto *uedi = dyn_cast<UncheckedEnumDataInst>(inst)) {
693693
return SILIsolationInfo::getGlobalActorIsolated(uedi, uedi->getEnumDecl());
694694
}
695695

696-
// See if we have an unchecked_enum_data from a global actor isolated type.
696+
// See if we have an unchecked_enum_data from a global-actor-isolated type.
697697
if (auto *utedi = dyn_cast<UncheckedTakeEnumDataAddrInst>(inst)) {
698698
return SILIsolationInfo::getGlobalActorIsolated(utedi,
699699
utedi->getEnumDecl());
@@ -713,7 +713,7 @@ SILIsolationInfo SILIsolationInfo::get(SILInstruction *inst) {
713713
}
714714
}
715715

716-
// See if we have a convert function from a Sendable actor isolated function,
716+
// See if we have a convert function from a Sendable actor-isolated function,
717717
// we want to treat the result of the convert function as being actor isolated
718718
// so that we cannot escape the value.
719719
//
@@ -818,7 +818,7 @@ SILIsolationInfo SILIsolationInfo::get(SILArgument *arg) {
818818
if (!SILIsolationInfo::isNonSendableType(arg->getType(), arg->getFunction()))
819819
return {};
820820

821-
// Handle a switch_enum from a global actor isolated type.
821+
// Handle a switch_enum from a global-actor-isolated type.
822822
if (auto *phiArg = dyn_cast<SILPhiArgument>(arg)) {
823823
if (auto *singleTerm = phiArg->getSingleTerminator()) {
824824
if (auto *swi = dyn_cast<SwitchEnumInst>(singleTerm)) {
@@ -866,7 +866,7 @@ SILIsolationInfo SILIsolationInfo::get(SILArgument *arg) {
866866
// disconnected so we can construct the actor value. Users cannot write
867867
// allocator functions so we just need to worry about compiler generated
868868
// code. In the case of a non-actor, we can only have an allocator that is
869-
// global actor isolated, so we will never hit this code path.
869+
// global-actor-isolated, so we will never hit this code path.
870870
if (declRef.kind == SILDeclRef::Kind::Allocator) {
871871
if (fArg->getFunction()->getActorIsolation().isActorInstanceIsolated()) {
872872
return SILIsolationInfo::getDisconnected(false /*nonisolated(unsafe)*/);
@@ -1018,7 +1018,7 @@ bool SILIsolationInfo::hasSameIsolation(const SILIsolationInfo &other) const {
10181018
// If either have an actor instance, and the actor instance doesn't match,
10191019
// return false.
10201020
//
1021-
// This ensures that cases like comparing two global actor isolated things
1021+
// This ensures that cases like comparing two global-actor-isolated things
10221022
// do not hit this path.
10231023
//
10241024
// It also catches cases where we have a missing actor instance.

lib/Sema/ConstraintSystem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7572,7 +7572,7 @@ ConstraintSystem::inferKeyPathLiteralCapability(KeyPathExpr *keyPath) {
75727572
case ActorIsolation::Erased:
75737573
llvm_unreachable("storage cannot have opaque isolation");
75747574

7575-
// A reference to an actor isolated state make key path non-Sendable.
7575+
// A reference to an actor-isolated state make key path non-Sendable.
75767576
case ActorIsolation::ActorInstance:
75777577
case ActorIsolation::GlobalActor:
75787578
isSendable = false;

0 commit comments

Comments
 (0)