Skip to content

Commit 4cae998

Browse files
authored
Merge pull request #71333 from rjmccall/rename_sil_isolated
Rename `@isolated` in the SIL sense to `@sil_isolated`
2 parents 0735629 + dd90ae7 commit 4cae998

23 files changed

+117
-117
lines changed

include/swift/AST/TypeAttr.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ SIMPLE_SIL_TYPE_ATTR(yield_many, YieldMany)
103103
SIMPLE_SIL_TYPE_ATTR(captures_generics, CapturesGenerics)
104104
// Used at the SIL level to mark a type as moveOnly.
105105
SIMPLE_SIL_TYPE_ATTR(moveOnly, MoveOnly)
106-
SIMPLE_SIL_TYPE_ATTR(isolated, Isolated)
106+
SIMPLE_SIL_TYPE_ATTR(sil_isolated, SILIsolated)
107107

108108
// SIL metatype attributes.
109109
SIMPLE_SIL_TYPE_ATTR(thin, Thin)

lib/AST/ASTPrinter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8087,7 +8087,7 @@ void SILParameterInfo::print(ASTPrinter &Printer,
80878087

80888088
if (options.contains(SILParameterInfo::Isolated)) {
80898089
options -= SILParameterInfo::Isolated;
8090-
Printer << "@isolated ";
8090+
Printer << "@sil_isolated ";
80918091
}
80928092

80938093
// If we did not handle a case in Options, this code was not updated

lib/ASTGen/Sources/ASTGen/TypeAttrs.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,11 @@ extension ASTGenVisitor {
102102
.inGuaranteed,
103103
.inout,
104104
.inoutAliasable,
105-
.isolated,
106105
.moveOnly,
107106
.objCMetatype,
108107
.out,
109108
.owned,
109+
.silIsolated,
110110
.silUnmanaged,
111111
.silUnowned,
112112
.silWeak,

lib/Sema/TypeCheckType.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4432,7 +4432,7 @@ SILParameterInfo TypeResolver::resolveSILParameter(
44324432
parameterOptions |= SILParameterInfo::NotDifferentiable;
44334433
return true;
44344434

4435-
case TypeAttrKind::Isolated:
4435+
case TypeAttrKind::SILIsolated:
44364436
parameterOptions |= SILParameterInfo::Isolated;
44374437
return true;
44384438

test/Distributed/Runtime/distributed_actor_self_calls.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ distributed actor Philosopher {
1616
distributed func think() {
1717
}
1818

19-
// CHECK: sil hidden [ossa] @$s28distributed_actor_self_calls11PhilosopherC10stopEatingyyF : $@convention(method) (@isolated @guaranteed Philosopher) -> () {
19+
// CHECK: sil hidden [ossa] @$s28distributed_actor_self_calls11PhilosopherC10stopEatingyyF : $@convention(method) (@sil_isolated @guaranteed Philosopher) -> () {
2020
func stopEating() { // NOTE: marking this async solves the issue; we find the async context then
2121
self.think()
2222

@@ -25,7 +25,7 @@ distributed actor Philosopher {
2525
// trying to get the async context to call the async thunk would fail here.
2626
//
2727
// CHECK: // function_ref Philosopher.think()
28-
// CHECK-NEXT: [[E:%[0-9]+]] = function_ref @$s28distributed_actor_self_calls11PhilosopherC5thinkyyF : $@convention(method) (@isolated @guaranteed Philosopher) -> ()
28+
// CHECK-NEXT: [[E:%[0-9]+]] = function_ref @$s28distributed_actor_self_calls11PhilosopherC5thinkyyF : $@convention(method) (@sil_isolated @guaranteed Philosopher) -> ()
2929
}
3030
}
3131

test/Distributed/SIL/distributed_actor_default_init_sil_3.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ distributed actor MyDistActor {
2929
}
3030

3131
// CHECK-LABEL: // MyDistActor.init(system_async_fail:cond:)
32-
// CHECK: sil hidden{{.*}} @$s14default_deinit11MyDistActorC17system_async_fail4condACSg015FakeDistributedE7Systems0jE6SystemV_SbtYacfc : $@convention(method) @async (@owned FakeActorSystem, Bool, @isolated @owned MyDistActor) -> @owned Optional<MyDistActor> {
32+
// CHECK: sil hidden{{.*}} @$s14default_deinit11MyDistActorC17system_async_fail4condACSg015FakeDistributedE7Systems0jE6SystemV_SbtYacfc : $@convention(method) @async (@owned FakeActorSystem, Bool, @sil_isolated @owned MyDistActor) -> @owned Optional<MyDistActor> {
3333
// CHECK: bb0([[SYSTEM:%[0-9]+]] : $FakeActorSystem, [[COND:%[0-9]+]] : $Bool, [[SELF:%[0-9]+]] : $MyDistActor):
3434
// CHECK: cond_br {{%[0-9]+}}, [[SUCCESS_BB:bb[0-9]+]], [[FAIL_BB:bb[0-9]+]]
3535

test/Distributed/SIL/distributed_actor_default_init_sil_4.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ distributed actor MyDistActor {
3131
}
3232

3333
// CHECK-LABEL: // MyDistActor.init(system_async_fail_throws:cond:)
34-
// CHECK: sil hidden @$s14default_deinit11MyDistActorC24system_async_fail_throws4condACSg015FakeDistributedE7Systems0kE6SystemV_SbtYaKcfc : $@convention(method) @async (@owned FakeActorSystem, Bool, @isolated @owned MyDistActor) -> (@owned Optional<MyDistActor>, @error any Error) {
34+
// CHECK: sil hidden @$s14default_deinit11MyDistActorC24system_async_fail_throws4condACSg015FakeDistributedE7Systems0kE6SystemV_SbtYaKcfc : $@convention(method) @async (@owned FakeActorSystem, Bool, @sil_isolated @owned MyDistActor) -> (@owned Optional<MyDistActor>, @error any Error) {
3535
// CHECK: bb0([[SYSTEM:%[0-9]+]] : $FakeActorSystem, [[COND:%[0-9]+]] : $Bool, [[SELF:%[0-9]+]] : $MyDistActor):
3636
// CHECK: cond_br {{%[0-9]+}}, [[SUCCESS_BB:bb[0-9]+]], [[FAIL_BB:bb[0-9]+]]
3737

test/Distributed/SIL/distributed_actor_default_init_sil_5.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ distributed actor MyDistActor {
3131
self.localOnlyField = SomeClass()
3232
}
3333

34-
// CHECK: sil hidden @$s14default_deinit11MyDistActorC12system_async4condAC015FakeDistributedE7Systems0iE6SystemV_SbtYacfc : $@convention(method) @async (@owned FakeActorSystem, Bool, @isolated @owned MyDistActor) -> @owned MyDistActor {
34+
// CHECK: sil hidden @$s14default_deinit11MyDistActorC12system_async4condAC015FakeDistributedE7Systems0iE6SystemV_SbtYacfc : $@convention(method) @async (@owned FakeActorSystem, Bool, @sil_isolated @owned MyDistActor) -> @owned MyDistActor {
3535
// CHECK: bb0([[SYSTEM:%[0-9]+]] : $FakeActorSystem, [[COND:%[0-9]+]] : $Bool, [[SELF:%[0-9]+]] : $MyDistActor):
3636
// CHECK: builtin "initializeDefaultActor"([[SELF]] : $MyDistActor)
3737
// CHECK: [[SYS_FIELD:%[0-9]+]] = ref_element_addr [[SELF]] : $MyDistActor, #MyDistActor.actorSystem

test/Distributed/SIL/distributed_thunk.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ extension DA {
1313
// CHECK: function_ref @swift_distributed_actor_is_remote
1414

1515
// Call the actor function
16-
// CHECK: function_ref @$s17distributed_thunk2DAC1fyyF : $@convention(method) (@isolated @guaranteed DA) -> ()
16+
// CHECK: function_ref @$s17distributed_thunk2DAC1fyyF : $@convention(method) (@sil_isolated @guaranteed DA) -> ()
1717

1818
distributed func f() { }
1919
}

test/Distributed/SIL/distributed_thunk_skip_function_bodies.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ extension DA {
3636

3737
// CHECK-SKIP-ALL-NOT: s38distributed_thunk_skip_function_bodies2DAC13inlinableFuncyyF
3838

39-
// CHECK-SKIP-NONINLINE-LABEL: sil [serialized] [distributed] [ossa] @$s38distributed_thunk_skip_function_bodies2DAC13inlinableFuncyyF : $@convention(method) (@isolated @guaranteed DA) -> () {
39+
// CHECK-SKIP-NONINLINE-LABEL: sil [serialized] [distributed] [ossa] @$s38distributed_thunk_skip_function_bodies2DAC13inlinableFuncyyF : $@convention(method) (@sil_isolated @guaranteed DA) -> () {
4040
// CHECK-SKIP-NONINLINE: function_ref @$s38distributed_thunk_skip_function_bodies9blackHoleyyxlF
4141
// CHECK-SKIP-NONINLINE: } // end sil function '$s38distributed_thunk_skip_function_bodies2DAC13inlinableFuncyyF'
4242
@inlinable public distributed func inlinableFunc() {

test/Distributed/distributed_actor_to_actor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import Distributed
2121
// Make sure there is no runtime record of the protocol descriptor.
2222
// CHECK-IR-NOT: $sxScA11DistributedHc
2323

24-
// CHECK-SIL-LABEL: sil hidden @$s021distributed_actor_to_B011getAnyActor0aF0ScA_pxYi_t11Distributed0gF0RzlF : $@convention(thin) <τ_0_0 where τ_0_0 : DistributedActor> (@isolated @guaranteed τ_0_0) -> @owned any Actor
24+
// CHECK-SIL-LABEL: sil hidden @$s021distributed_actor_to_B011getAnyActor0aF0ScA_pxYi_t11Distributed0gF0RzlF : $@convention(thin) <τ_0_0 where τ_0_0 : DistributedActor> (@sil_isolated @guaranteed τ_0_0) -> @owned any Actor
2525
func getAnyActor(distributedActor: isolated some DistributedActor) -> any Actor {
2626
// CHECK-SIL: [[EXISTENTIAL:%.*]] = init_existential_ref %0 : $τ_0_0 : $τ_0_0, $any Actor
2727
// CHECK-SIL-NEXT: strong_retain [[EXISTENTIAL]] : $any Actor

test/IRGen/distributed_func_indirect_in_parameter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public struct LargeValue : Codable {
2121
distributed actor D {
2222
typealias ActorSystem = LocalTestingDistributedActorSystem
2323

24-
// CHECK: sil hidden [distributed] @takeLarge : $@convention(method) (@in_guaranteed LargeValue, @isolated @guaranteed D) -> () {
24+
// CHECK: sil hidden [distributed] @takeLarge : $@convention(method) (@in_guaranteed LargeValue, @sil_isolated @guaranteed D) -> () {
2525
@_silgen_name("takeLarge")
2626
distributed func takeLarge(_ l: LargeValue) {}
2727
}

test/SIL/Parser/isolated_parameters.sil

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ import Swift
1010
public protocol AnyActor: AnyObject, Sendable {}
1111
public protocol Actor : AnyActor {}
1212

13-
// CHECK-LABEL: sil @$sScAsE14assumeIsolated_4file4lineqd__qd__xYiKXE_s12StaticStringVSutKlFTwB : $@convention(method) <τ_0_0 where τ_0_0 : Actor><τ_1_0> (@guaranteed @noescape @callee_guaranteed @substituted <τ_0_0, τ_0_1 where τ_0_0 : AnyObject> (@isolated @guaranteed τ_0_0) -> (@out τ_0_1, @error any Error) for <τ_0_0, τ_1_0>, StaticString, UInt, @guaranteed τ_0_0) -> (@out τ_1_0, @error any Error)
13+
// CHECK-LABEL: sil @$sScAsE14assumeIsolated_4file4lineqd__qd__xYiKXE_s12StaticStringVSutKlFTwB : $@convention(method) <τ_0_0 where τ_0_0 : Actor><τ_1_0> (@guaranteed @noescape @callee_guaranteed @substituted <τ_0_0, τ_0_1 where τ_0_0 : AnyObject> (@sil_isolated @guaranteed τ_0_0) -> (@out τ_0_1, @error any Error) for <τ_0_0, τ_1_0>, StaticString, UInt, @guaranteed τ_0_0) -> (@out τ_1_0, @error any Error)
1414

15-
sil @$sScAsE14assumeIsolated_4file4lineqd__qd__xYiKXE_s12StaticStringVSutKlFTwB : $@convention(method) <τ_0_0 where τ_0_0 : Actor><τ_1_0> (@guaranteed @noescape @callee_guaranteed @substituted <τ_0_0, τ_0_1 where τ_0_0 : AnyObject> (@isolated @guaranteed τ_0_0) -> (@out τ_0_1, @error any Error) for <τ_0_0, τ_1_0>, StaticString, UInt, @guaranteed τ_0_0) -> (@out τ_1_0, @error any Error)
15+
sil @$sScAsE14assumeIsolated_4file4lineqd__qd__xYiKXE_s12StaticStringVSutKlFTwB : $@convention(method) <τ_0_0 where τ_0_0 : Actor><τ_1_0> (@guaranteed @noescape @callee_guaranteed @substituted <τ_0_0, τ_0_1 where τ_0_0 : AnyObject> (@sil_isolated @guaranteed τ_0_0) -> (@out τ_0_1, @error any Error) for <τ_0_0, τ_1_0>, StaticString, UInt, @guaranteed τ_0_0) -> (@out τ_1_0, @error any Error)

test/SIL/Serialization/isolated_parameters.sil

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ public protocol AnyActor: AnyObject, Sendable {}
1717
public protocol Actor : AnyActor {}
1818

1919

20-
// CHECK-LABEL: sil [serialized] [ossa] @assumeIsolated : $@convention(method) <τ_0_0 where τ_0_0 : Actor> (@isolated @guaranteed τ_0_0) -> () {
20+
// CHECK-LABEL: sil [serialized] [ossa] @assumeIsolated : $@convention(method) <τ_0_0 where τ_0_0 : Actor> (@sil_isolated @guaranteed τ_0_0) -> () {
2121

22-
sil [serialized] [ossa] @assumeIsolated : $@convention(method) <τ_0_0 where τ_0_0 : Actor> (@isolated @guaranteed τ_0_0) -> () {
22+
sil [serialized] [ossa] @assumeIsolated : $@convention(method) <τ_0_0 where τ_0_0 : Actor> (@sil_isolated @guaranteed τ_0_0) -> () {
2323
bb0(%0 : @guaranteed $τ_0_0):
2424
unreachable
2525
}

test/SILGen/async_conversion.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ actor A: P2 {
6565
actor AnActor {
6666
func isolatedMethod(_ i: Int) {}
6767

68-
// CHECK-LABEL: sil hidden [ossa] @$s4test7AnActorC6calleryyYaF : $@convention(method) @async (@isolated @guaranteed AnActor) -> () {
68+
// CHECK-LABEL: sil hidden [ossa] @$s4test7AnActorC6calleryyYaF : $@convention(method) @async (@sil_isolated @guaranteed AnActor) -> () {
6969
func caller() async {
7070
// CHECK: hop_to_executor {{..*}} : $AnActor
7171
// [[F:%.*]] = function_ref @$s4test7AnActorC6calleryyYaFySicACYicfu_ : $@convention(thin) (@guaranteed AnActor) -> @owned @callee_guaranteed (Int) -> ()

test/SILGen/async_initializer.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ enum MyEnum {
5656
}
5757

5858
actor MyActor {
59-
// CHECK-DAG: sil hidden [ossa] @$s12initializers7MyActorCACyYacfc : $@convention(method) @async (@isolated @owned MyActor) -> @owned MyActor
59+
// CHECK-DAG: sil hidden [ossa] @$s12initializers7MyActorCACyYacfc : $@convention(method) @async (@sil_isolated @owned MyActor) -> @owned MyActor
6060
init() async {}
6161
}
6262

@@ -166,7 +166,7 @@ actor SomeActor {
166166
// The implicit check-not covers that for us. The hops are inserted later.
167167
init() async {}
168168

169-
// CHECK-LABEL: sil hidden [ossa] @$s12initializers9SomeActorC10someMethodyyYaF : $@convention(method) @async (@isolated @guaranteed SomeActor) -> () {
169+
// CHECK-LABEL: sil hidden [ossa] @$s12initializers9SomeActorC10someMethodyyYaF : $@convention(method) @async (@sil_isolated @guaranteed SomeActor) -> () {
170170
// CHECK: hop_to_executor {{%[0-9]+}} : $SomeActor
171171
// CHECK: } // end sil function '$s12initializers9SomeActorC10someMethodyyYaF'
172172
func someMethod() async {}

test/SILGen/effectful_properties.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ enum E {
3434
}
3535

3636
actor A {
37-
// CHECK-DAG: sil hidden [transparent] [ossa] @$s9accessors1AC10normalPropSivg : $@convention(method) (@isolated @guaranteed A) -> Int {
37+
// CHECK-DAG: sil hidden [transparent] [ossa] @$s9accessors1AC10normalPropSivg : $@convention(method) (@sil_isolated @guaranteed A) -> Int {
3838
var normalProp : Int = 0
39-
// CHECK-DAG: sil hidden [ossa] @$s9accessors1AC12computedPropSivg : $@convention(method) (@isolated @guaranteed A) -> Int {
39+
// CHECK-DAG: sil hidden [ossa] @$s9accessors1AC12computedPropSivg : $@convention(method) (@sil_isolated @guaranteed A) -> Int {
4040
var computedProp : Int { get { 0 } }
4141

42-
// CHECK-LABEL: sil hidden [ossa] @$s9accessors1AC9asyncPropSivg : $@convention(method) @async (@isolated @guaranteed A) -> Int {
42+
// CHECK-LABEL: sil hidden [ossa] @$s9accessors1AC9asyncPropSivg : $@convention(method) @async (@sil_isolated @guaranteed A) -> Int {
4343
// CHECK: bb0([[SELF:%[0-9]+]] : @guaranteed $A):
4444
// CHECK: hop_to_executor [[SELF]] : $A
4545
// CHECK: } // end sil function '$s9accessors1AC9asyncPropSivg'
@@ -51,7 +51,7 @@ actor A {
5151

5252
// CHECK-LABEL: sil hidden [ossa] @$s9accessors19testImplicitlyAsync1aSiAA1AC_tYaF : $@convention(thin) @async (@guaranteed A) -> Int {
5353
// CHECK: hop_to_executor
54-
// CHECK: apply {{%[0-9]+}}({{%[0-9]+}}) : $@convention(method) (@isolated @guaranteed A) -> Int
54+
// CHECK: apply {{%[0-9]+}}({{%[0-9]+}}) : $@convention(method) (@sil_isolated @guaranteed A) -> Int
5555
// CHECK: hop_to_executor
5656
// CHECK: } // end sil function '$s9accessors19testImplicitlyAsync1aSiAA1AC_tYaF'
5757
func testImplicitlyAsync(a : A) async -> Int {
@@ -60,7 +60,7 @@ func testImplicitlyAsync(a : A) async -> Int {
6060

6161

6262
// CHECK-LABEL: sil hidden [ossa] @$s9accessors15testNormalAsync1aSiAA1AC_tYaF : $@convention(thin) @async (@guaranteed A) -> Int {
63-
// CHECK: apply {{%[0-9]+}}({{%[0-9]+}}) : $@convention(method) @async (@isolated @guaranteed A) -> Int
63+
// CHECK: apply {{%[0-9]+}}({{%[0-9]+}}) : $@convention(method) @async (@sil_isolated @guaranteed A) -> Int
6464
// CHECK: } // end sil function '$s9accessors15testNormalAsync1aSiAA1AC_tYaF'
6565
func testNormalAsync(a : A) async -> Int {
6666
return await a.asyncProp

test/SILGen/foreach_async.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ struct AsyncLazySequence<S: Sequence>: AsyncSequence {
8282
// CHECK: [[NEXT_RESULT:%.*]] = alloc_stack $Optional<Int>
8383
// CHECK: [[ACTOR:%.*]] = enum $Optional<any Actor>, #Optional.none!enumelt
8484
// CHECK: [[MUTATION:%.*]] = begin_access
85-
// CHECK: [[WITNESS_METHOD:%.*]] = function_ref @$sScIsE4nexty7ElementQzSgScA_pSgYiYa7FailureQzYKF : $@convention(method) @async <τ_0_0 where τ_0_0 : AsyncIteratorProtocol> (@isolated @guaranteed Optional<any Actor>, @inout τ_0_0) -> (@out Optional<τ_0_0.Element>, @error_indirect τ_0_0.Failure)
85+
// CHECK: [[WITNESS_METHOD:%.*]] = function_ref @$sScIsE4nexty7ElementQzSgScA_pSgYiYa7FailureQzYKF : $@convention(method) @async <τ_0_0 where τ_0_0 : AsyncIteratorProtocol> (@sil_isolated @guaranteed Optional<any Actor>, @inout τ_0_0) -> (@out Optional<τ_0_0.Element>, @error_indirect τ_0_0.Failure)
8686
// CHECK: [[ERROR_SLOT:%[0-9]+]] = alloc_stack $Never
87-
// CHECK: try_apply [[WITNESS_METHOD]]<AsyncLazySequence<[Int]>.Iterator>([[NEXT_RESULT]], [[ERROR_SLOT]], [[ACTOR]], [[MUTATION]]) : $@convention(method) @async <τ_0_0 where τ_0_0 : AsyncIteratorProtocol> (@isolated @guaranteed Optional<any Actor>, @inout τ_0_0) -> (@out Optional<τ_0_0.Element>, @error_indirect τ_0_0.Failure), normal [[NORMAL_BB:bb[0-2]+]], error [[ERROR_BB:bb[0-9]+]]
87+
// CHECK: try_apply [[WITNESS_METHOD]]<AsyncLazySequence<[Int]>.Iterator>([[NEXT_RESULT]], [[ERROR_SLOT]], [[ACTOR]], [[MUTATION]]) : $@convention(method) @async <τ_0_0 where τ_0_0 : AsyncIteratorProtocol> (@sil_isolated @guaranteed Optional<any Actor>, @inout τ_0_0) -> (@out Optional<τ_0_0.Element>, @error_indirect τ_0_0.Failure), normal [[NORMAL_BB:bb[0-2]+]], error [[ERROR_BB:bb[0-9]+]]
8888
// CHECK: [[NORMAL_BB]](
8989
// CHECK: end_access [[MUTATION]]
9090
// CHECK: switch_enum [[IND_VAR:%.*]] : $Optional<Int>, case #Optional.some!enumelt: [[SOME_BB:bb[0-9]+]], case #Optional.none!enumelt: [[NONE_BB:bb[0-9]+]]
@@ -115,9 +115,9 @@ func trivialStruct(_ xx: AsyncLazySequence<[Int]>) async {
115115
// CHECK: [[NEXT_RESULT:%.*]] = alloc_stack $Optional<Int>
116116
// CHECK: [[ACTOR:%.*]] = enum $Optional<any Actor>, #Optional.none!enumelt
117117
// CHECK: [[MUTATION:%.*]] = begin_access
118-
// CHECK: [[WITNESS_METHOD:%.*]] = function_ref @$sScIsE4nexty7ElementQzSgScA_pSgYiYa7FailureQzYKF : $@convention(method) @async <τ_0_0 where τ_0_0 : AsyncIteratorProtocol> (@isolated @guaranteed Optional<any Actor>, @inout τ_0_0) -> (@out Optional<τ_0_0.Element>, @error_indirect τ_0_0.Failure)
118+
// CHECK: [[WITNESS_METHOD:%.*]] = function_ref @$sScIsE4nexty7ElementQzSgScA_pSgYiYa7FailureQzYKF : $@convention(method) @async <τ_0_0 where τ_0_0 : AsyncIteratorProtocol> (@sil_isolated @guaranteed Optional<any Actor>, @inout τ_0_0) -> (@out Optional<τ_0_0.Element>, @error_indirect τ_0_0.Failure)
119119
// CHECK: [[ERROR_SLOT:%[0-9]+]] = alloc_stack $Never
120-
// CHECK: try_apply [[WITNESS_METHOD]]<AsyncLazySequence<[Int]>.Iterator>([[NEXT_RESULT]], [[ERROR_SLOT]], [[ACTOR]], [[MUTATION]]) : $@convention(method) @async <τ_0_0 where τ_0_0 : AsyncIteratorProtocol> (@isolated @guaranteed Optional<any Actor>, @inout τ_0_0) -> (@out Optional<τ_0_0.Element>, @error_indirect τ_0_0.Failure), normal [[NORMAL_BB:bb[0-2]+]], error [[ERROR_BB:bb[0-9]+]]
120+
// CHECK: try_apply [[WITNESS_METHOD]]<AsyncLazySequence<[Int]>.Iterator>([[NEXT_RESULT]], [[ERROR_SLOT]], [[ACTOR]], [[MUTATION]]) : $@convention(method) @async <τ_0_0 where τ_0_0 : AsyncIteratorProtocol> (@sil_isolated @guaranteed Optional<any Actor>, @inout τ_0_0) -> (@out Optional<τ_0_0.Element>, @error_indirect τ_0_0.Failure), normal [[NORMAL_BB:bb[0-2]+]], error [[ERROR_BB:bb[0-9]+]]
121121
// CHECK: [[NORMAL_BB]](
122122
// CHECK: end_access [[MUTATION]]
123123
// CHECK: switch_enum [[IND_VAR:%.*]] : $Optional<Int>, case #Optional.some!enumelt: [[SOME_BB:bb[0-9]+]], case #Optional.none!enumelt: [[NONE_BB:bb[0-9]+]]
@@ -175,9 +175,9 @@ func trivialStructBreak(_ xx: AsyncLazySequence<[Int]>) async {
175175
// CHECK: [[NEXT_RESULT:%.*]] = alloc_stack $Optional<Int>
176176
// CHECK: [[ACTOR:%.*]] = enum $Optional<any Actor>, #Optional.none!enumelt
177177
// CHECK: [[MUTATION:%.*]] = begin_access
178-
// CHECK: [[WITNESS_METHOD:%.*]] = function_ref @$sScIsE4nexty7ElementQzSgScA_pSgYiYa7FailureQzYKF : $@convention(method) @async <τ_0_0 where τ_0_0 : AsyncIteratorProtocol> (@isolated @guaranteed Optional<any Actor>, @inout τ_0_0) -> (@out Optional<τ_0_0.Element>, @error_indirect τ_0_0.Failure)
178+
// CHECK: [[WITNESS_METHOD:%.*]] = function_ref @$sScIsE4nexty7ElementQzSgScA_pSgYiYa7FailureQzYKF : $@convention(method) @async <τ_0_0 where τ_0_0 : AsyncIteratorProtocol> (@sil_isolated @guaranteed Optional<any Actor>, @inout τ_0_0) -> (@out Optional<τ_0_0.Element>, @error_indirect τ_0_0.Failure)
179179
// CHECK: [[ERROR_SLOT:%[0-9]+]] = alloc_stack $Never
180-
// CHECK: try_apply [[WITNESS_METHOD]]<AsyncLazySequence<[Int]>.Iterator>([[NEXT_RESULT]], [[ERROR_SLOT]], [[ACTOR]], [[MUTATION]]) : $@convention(method) @async <τ_0_0 where τ_0_0 : AsyncIteratorProtocol> (@isolated @guaranteed Optional<any Actor>, @inout τ_0_0) -> (@out Optional<τ_0_0.Element>, @error_indirect τ_0_0.Failure), normal [[NORMAL_BB:bb[0-2]+]], error [[ERROR_BB:bb[0-9]+]]
180+
// CHECK: try_apply [[WITNESS_METHOD]]<AsyncLazySequence<[Int]>.Iterator>([[NEXT_RESULT]], [[ERROR_SLOT]], [[ACTOR]], [[MUTATION]]) : $@convention(method) @async <τ_0_0 where τ_0_0 : AsyncIteratorProtocol> (@sil_isolated @guaranteed Optional<any Actor>, @inout τ_0_0) -> (@out Optional<τ_0_0.Element>, @error_indirect τ_0_0.Failure), normal [[NORMAL_BB:bb[0-2]+]], error [[ERROR_BB:bb[0-9]+]]
181181
// CHECK: [[NORMAL_BB]](
182182
// CHECK: end_access [[MUTATION]]
183183
// CHECK: switch_enum [[IND_VAR:%.*]] : $Optional<Int>, case #Optional.some!enumelt: [[SOME_BB:bb[0-9]+]], case #Optional.none!enumelt: [[NONE_BB:bb[0-9]+]]

0 commit comments

Comments
 (0)