@@ -16,20 +16,17 @@ public actor class A1<T: DefaultInit> {
16
16
17
17
extension Int : DefaultInit { }
18
18
19
+ public actor class A2 {
20
+ func f( ) { }
21
+ @actorIndependent public func enqueue( partialTask: PartialAsyncTask ) { }
22
+ }
23
+
19
24
func buildIt( ) {
20
25
_ = A1 < Int > ( )
21
26
}
22
27
23
- // variable initialization expression of A1.$__actor_storage
24
- // CHECK-LABEL: sil hidden [transparent] [ossa] @$s29synthesized_conformance_actor2A1C03$__C8_storage33_550E67F1F00BFF89F882603E5B70A41BLL12_Concurrency17_NativeActorQueueVvpfi : $@convention(thin) <T where T : DefaultInit> () -> @out _NativeActorQueue {
25
- // CHECK: bb0([[PROPERTY:%.*]] : $*_NativeActorQueue):
26
- // CHECK-NEXT: [[META:%.*]] = metatype $@thick A1<T>.Type
27
- // CHECK-NEXT: [[ERASED_META:%.*]] = init_existential_metatype [[META]] : $@thick A1<T>.Type, $@thick AnyObject.Type
28
- // CHECK: [[INIT_FN:%.*]] = function_ref @$s12_Concurrency24_defaultActorQueueCreateyAA07_NativecD0VyXlXpF : $@convention(thin) (@thick AnyObject.Type) -> @out _NativeActorQueue
29
- // CHECK-NEXT: = apply [[INIT_FN]]([[PROPERTY]], [[ERASED_META]]) : $@convention(thin) (@thick AnyObject.Type) -> @out _NativeActorQueue
30
-
31
28
// A1.enqueue(partialTask:)
32
- // CHECK-LABEL: sil hidden [ossa] @$s29synthesized_conformance_actor2A1C7enqueue11partialTasky12_Concurrency012PartialAsyncG0V_tF : $@convention(method) <T where T : DefaultInit> (@in_guaranteed PartialAsyncTask, @guaranteed A1<T>) -> () {
29
+ // CHECK-LABEL: sil [ossa] @$s29synthesized_conformance_actor2A1C7enqueue11partialTasky12_Concurrency012PartialAsyncG0V_tF : $@convention(method) <T where T : DefaultInit> (@in_guaranteed PartialAsyncTask, @guaranteed A1<T>) -> () {
33
30
// CHECK: bb0([[PARTIAL_TASK:%.*]] : $*PartialAsyncTask, [[SELF:%.*]] : @guaranteed $A1<T>):
34
31
// CHECK: [[SELF_COPY:%.*]] = copy_value [[SELF]] : $A1<T>
35
32
// CHECK-NEXT: [[SELF_ANY_OBJECT:%.*]] = init_existential_ref [[SELF_COPY]] : $A1<T> : $A1<T>, $AnyObject
@@ -39,3 +36,18 @@ func buildIt() {
39
36
// CHECK: [[ENQUEUE_FN:%.*]] = function_ref @$s12_Concurrency36_defaultActorQueueEnqueuePartialTask5actor5queue07partialG0yyXl_AA07_NativecD0VzAA0f5AsyncG0VtF : $@convention(thin) (@guaranteed AnyObject, @inout _NativeActorQueue, @in_guaranteed PartialAsyncTask) -> ()
40
37
// CHECK-NEXT: apply [[ENQUEUE_FN]]([[SELF_ANY_OBJECT]], [[DYNAMIC_ACCESS]], [[PARTIAL_TASK]]) : $@convention(thin) (@guaranteed AnyObject, @inout _NativeActorQueue, @in_guaranteed PartialAsyncTask) -> ()
41
38
// CHECK-NEXT: end_access [[DYNAMIC_ACCESS]] : $*_NativeActorQueue
39
+
40
+ // variable initialization expression of A1.$__actor_storage
41
+ // CHECK-LABEL: sil [transparent] [ossa] @$s29synthesized_conformance_actor2A1C03$__C8_storage33{{.*}}12_Concurrency17_NativeActorQueueVvpfi : $@convention(thin) <T where T : DefaultInit> () -> @out _NativeActorQueue {
42
+ // CHECK: bb0([[PROPERTY:%.*]] : $*_NativeActorQueue):
43
+ // CHECK-NEXT: [[META:%.*]] = metatype $@thick A1<T>.Type
44
+ // CHECK-NEXT: [[ERASED_META:%.*]] = init_existential_metatype [[META]] : $@thick A1<T>.Type, $@thick AnyObject.Type
45
+ // CHECK: [[INIT_FN:%.*]] = function_ref @$s12_Concurrency24_defaultActorQueueCreateyAA07_NativecD0VyXlXpF : $@convention(thin) (@thick AnyObject.Type) -> @out _NativeActorQueue
46
+ // CHECK-NEXT: = apply [[INIT_FN]]([[PROPERTY]], [[ERASED_META]]) : $@convention(thin) (@thick AnyObject.Type) -> @out _NativeActorQueue
47
+
48
+ // Ensure that enqueue(partialTask:) is the first slot in the vtable.
49
+ // CHECK-LABEL: sil_vtable [serialized] A1 {
50
+ // CHECK-NEXT: #A1.enqueue: <T where T : DefaultInit> (A1<T>) -> (PartialAsyncTask) -> () : @$s29synthesized_conformance_actor2A1C7enqueue11partialTasky12_Concurrency012PartialAsyncG0V_tF
51
+
52
+ // CHECK-LABEL: sil_vtable [serialized] A2 {
53
+ // CHECK-NEXT: #A2.enqueue: (A2) -> (PartialAsyncTask) -> () : @$s29synthesized_conformance_actor2A2C7enqueue11partialTasky12_Concurrency012PartialAsyncG0V_tF // A2.enqueue(partialTask:)
0 commit comments