@@ -96,7 +96,7 @@ class DeclRefExprAnalysis {
96
96
if (auto *mri = dyn_cast<MemberRefExpr>(expr)) {
97
97
if (mri->hasDecl ()) {
98
98
auto isolation = swift::getActorIsolation (mri->getDecl ().getDecl ());
99
- if (isolation.isUnsafe ())
99
+ if (isolation.isConcurrentUnsafe ())
100
100
return true ;
101
101
}
102
102
}
@@ -485,16 +485,16 @@ SILIsolationInfo SILIsolationInfo::get(SILInstruction *inst) {
485
485
if (nomDecl->isAnyActor ())
486
486
return SILIsolationInfo::getActorInstanceIsolated (rei, rei->getOperand (),
487
487
nomDecl)
488
- .withUnsafeNonIsolated (varIsolation.isUnsafe ());
488
+ .withUnsafeNonIsolated (varIsolation.isConcurrentUnsafe ());
489
489
490
490
if (auto isolation = swift::getActorIsolation (nomDecl)) {
491
491
assert (isolation.isGlobalActor ());
492
492
return SILIsolationInfo::getGlobalActorIsolated (
493
493
rei, isolation.getGlobalActor ())
494
- .withUnsafeNonIsolated (varIsolation.isUnsafe ());
494
+ .withUnsafeNonIsolated (varIsolation.isConcurrentUnsafe ());
495
495
}
496
496
497
- return SILIsolationInfo::getDisconnected (varIsolation.isUnsafe ());
497
+ return SILIsolationInfo::getDisconnected (varIsolation.isConcurrentUnsafe ());
498
498
}
499
499
500
500
// Check if we have a global_addr inst.
@@ -507,7 +507,7 @@ SILIsolationInfo SILIsolationInfo::get(SILInstruction *inst) {
507
507
ga, isolation.getGlobalActor ());
508
508
}
509
509
510
- if (isolation.isUnsafe ()) {
510
+ if (isolation.isConcurrentUnsafe ()) {
511
511
return SILIsolationInfo::getDisconnected (
512
512
true /* is nonisolated(unsafe)*/ );
513
513
}
@@ -544,7 +544,7 @@ SILIsolationInfo SILIsolationInfo::get(SILInstruction *inst) {
544
544
}
545
545
546
546
// Then check if we have something that is nonisolated unsafe.
547
- if (isolation.isUnsafe ()) {
547
+ if (isolation.isConcurrentUnsafe ()) {
548
548
// First check if our function_ref is a method of a global actor
549
549
// isolated type. In such a case, we create a global actor isolated
550
550
// nonisolated(unsafe) so that if we assign the value to another
@@ -623,7 +623,7 @@ SILIsolationInfo SILIsolationInfo::get(SILInstruction *inst) {
623
623
// Check if we have a global actor and handle it appropriately.
624
624
if (isolation.getKind () == ActorIsolation::GlobalActor) {
625
625
bool localNonIsolatedUnsafe =
626
- isNonIsolatedUnsafe | isolation.isUnsafe ();
626
+ isNonIsolatedUnsafe | isolation.isConcurrentUnsafe ();
627
627
return SILIsolationInfo::getGlobalActorIsolated (
628
628
cmi, isolation.getGlobalActor ())
629
629
.withUnsafeNonIsolated (localNonIsolatedUnsafe);
@@ -633,7 +633,7 @@ SILIsolationInfo SILIsolationInfo::get(SILInstruction *inst) {
633
633
if (isolation.getKind () != ActorIsolation::ActorInstance &&
634
634
isolation.isActorInstanceForSelfParameter ()) {
635
635
bool localNonIsolatedUnsafe =
636
- isNonIsolatedUnsafe | isolation.isUnsafe ();
636
+ isNonIsolatedUnsafe | isolation.isConcurrentUnsafe ();
637
637
return SILIsolationInfo::getActorInstanceIsolated (
638
638
cmi, cmi->getOperand (),
639
639
cmi->getOperand ()
@@ -650,7 +650,7 @@ SILIsolationInfo SILIsolationInfo::get(SILInstruction *inst) {
650
650
// Check if we have a global actor and handle it appropriately.
651
651
if (isolation.getKind () == ActorIsolation::GlobalActor) {
652
652
bool localNonIsolatedUnsafe =
653
- isNonIsolatedUnsafe | isolation.isUnsafe ();
653
+ isNonIsolatedUnsafe | isolation.isConcurrentUnsafe ();
654
654
return SILIsolationInfo::getGlobalActorIsolated (
655
655
cmi, isolation.getGlobalActor ())
656
656
.withUnsafeNonIsolated (localNonIsolatedUnsafe);
@@ -660,7 +660,7 @@ SILIsolationInfo SILIsolationInfo::get(SILInstruction *inst) {
660
660
if (isolation.getKind () != ActorIsolation::ActorInstance &&
661
661
isolation.isActorInstanceForSelfParameter ()) {
662
662
bool localNonIsolatedUnsafe =
663
- isNonIsolatedUnsafe | isolation.isUnsafe ();
663
+ isNonIsolatedUnsafe | isolation.isConcurrentUnsafe ();
664
664
return SILIsolationInfo::getActorInstanceIsolated (
665
665
cmi, cmi->getOperand (),
666
666
cmi->getOperand ()
@@ -683,16 +683,16 @@ SILIsolationInfo SILIsolationInfo::get(SILInstruction *inst) {
683
683
auto varIsolation = swift::getActorIsolation (sei->getField ());
684
684
if (auto isolation =
685
685
SILIsolationInfo::getGlobalActorIsolated (sei, sei->getStructDecl ()))
686
- return isolation.withUnsafeNonIsolated (varIsolation.isUnsafe ());
687
- return SILIsolationInfo::getDisconnected (varIsolation.isUnsafe ());
686
+ return isolation.withUnsafeNonIsolated (varIsolation.isConcurrentUnsafe ());
687
+ return SILIsolationInfo::getDisconnected (varIsolation.isConcurrentUnsafe ());
688
688
}
689
689
690
690
if (auto *seai = dyn_cast<StructElementAddrInst>(inst)) {
691
691
auto varIsolation = swift::getActorIsolation (seai->getField ());
692
692
if (auto isolation = SILIsolationInfo::getGlobalActorIsolated (
693
693
seai, seai->getStructDecl ()))
694
- return isolation.withUnsafeNonIsolated (varIsolation.isUnsafe ());
695
- return SILIsolationInfo::getDisconnected (varIsolation.isUnsafe ());
694
+ return isolation.withUnsafeNonIsolated (varIsolation.isConcurrentUnsafe ());
695
+ return SILIsolationInfo::getDisconnected (varIsolation.isConcurrentUnsafe ());
696
696
}
697
697
698
698
// See if we have an unchecked_enum_data from a global actor isolated type.
0 commit comments