@@ -12,12 +12,12 @@ class SwiftClass {}
12
12
sil_vtable SwiftClass {}
13
13
sil @$s13partial_apply10SwiftClassCfD : $@async @convention(method) (SwiftClass) -> ()
14
14
15
- sil @partially_applyable_to_class : $@async @convention(thin) (@owned SwiftClass) -> () {
15
+ sil @partially_applyable_to_class : $@async @convention(thin) (@guaranteed SwiftClass) -> () {
16
16
entry(%c : $SwiftClass):
17
17
%0 = builtin "int_trap"() : $Never
18
18
unreachable
19
19
}
20
- sil @partially_applyable_to_two_classes : $@async @convention(thin) (@owned SwiftClass, @owned SwiftClass) -> () {
20
+ sil @partially_applyable_to_two_classes : $@async @convention(thin) (@guaranteed SwiftClass, @guaranteed SwiftClass) -> () {
21
21
entry(%c : $SwiftClass, %d : $SwiftClass):
22
22
%0 = builtin "int_trap"() : $Never
23
23
unreachable
@@ -29,16 +29,16 @@ sil @use_closure : $@async @convention(thin) (@noescape @async @callee_guarantee
29
29
// CHECK: define{{( dllexport)?}}{{( protected)?}} swift{{(tail)?}}cc void @partial_apply_class(
30
30
sil @partial_apply_class : $@async @convention(thin) (SwiftClass) -> @async @callee_guaranteed () -> () {
31
31
entry(%c : $SwiftClass):
32
- %f = function_ref @partially_applyable_to_class : $@async @convention(thin) (@owned SwiftClass) -> ()
33
- %g = partial_apply [callee_guaranteed] %f(%c) : $@async @convention(thin) (@owned SwiftClass) -> ()
32
+ %f = function_ref @partially_applyable_to_class : $@async @convention(thin) (@guaranteed SwiftClass) -> ()
33
+ %g = partial_apply [callee_guaranteed] %f(%c) : $@async @convention(thin) (@guaranteed SwiftClass) -> ()
34
34
return %g : $@async @callee_guaranteed () -> ()
35
35
}
36
36
37
37
// CHECK: define{{( dllexport)?}}{{( protected)?}} swift{{(tail)?}}cc void @partial_apply_class_on_stack(
38
38
sil @partial_apply_class_on_stack : $@async @convention(thin) (@owned SwiftClass) -> () {
39
39
entry(%a : $SwiftClass):
40
- %f = function_ref @partially_applyable_to_class : $@async @convention(thin) (@owned SwiftClass) -> ()
41
- %c = partial_apply [callee_guaranteed] [on_stack] %f(%a) : $@async @convention(thin) (@owned SwiftClass) -> ()
40
+ %f = function_ref @partially_applyable_to_class : $@async @convention(thin) (@guaranteed SwiftClass) -> ()
41
+ %c = partial_apply [callee_guaranteed] [on_stack] %f(%a) : $@async @convention(thin) (@guaranteed SwiftClass) -> ()
42
42
%use = function_ref @use_closure : $@async @convention(thin) (@noescape @async @callee_guaranteed () -> ()) -> ()
43
43
apply %use(%c) : $@async @convention(thin) (@noescape @async @callee_guaranteed () -> ()) -> ()
44
44
dealloc_stack %c : $@noescape @async @callee_guaranteed () ->()
@@ -51,8 +51,8 @@ entry(%a : $SwiftClass):
51
51
52
52
sil @partial_apply_two_classes_on_stack : $@async @convention(thin) (@owned SwiftClass, @owned SwiftClass) -> () {
53
53
entry(%a : $SwiftClass, %b: $SwiftClass):
54
- %f = function_ref @partially_applyable_to_two_classes : $@async @convention(thin) (@owned SwiftClass, @owned SwiftClass) -> ()
55
- %c = partial_apply [callee_guaranteed] [on_stack] %f(%a, %b) : $@async @convention(thin) (@owned SwiftClass, @owned SwiftClass) -> ()
54
+ %f = function_ref @partially_applyable_to_two_classes : $@async @convention(thin) (@guaranteed SwiftClass, @guaranteed SwiftClass) -> ()
55
+ %c = partial_apply [callee_guaranteed] [on_stack] %f(%a, %b) : $@async @convention(thin) (@guaranteed SwiftClass, @guaranteed SwiftClass) -> ()
56
56
%use = function_ref @use_closure : $@async @convention(thin) (@noescape @async @callee_guaranteed () -> ()) -> ()
57
57
apply %use(%c) : $@async @convention(thin) (@noescape @async @callee_guaranteed () -> ()) -> ()
58
58
dealloc_stack %c : $@noescape @async @callee_guaranteed () ->()
@@ -201,7 +201,7 @@ bb0(%x : $*SwiftClassPair):
201
201
return %p : $@async @callee_guaranteed (Int) -> Int
202
202
}
203
203
204
- sil public @captured_fixed_and_dependent_params : $@async @convention(thin) <A> (@owned SwiftClass, @in A, Int) -> () {
204
+ sil public @captured_fixed_and_dependent_params : $@async @convention(thin) <A> (@guaranteed SwiftClass, @in_guaranteed A, Int) -> () {
205
205
entry(%c : $SwiftClass, %a : $*A, %i : $Int):
206
206
%0 = builtin "int_trap"() : $Never
207
207
unreachable
@@ -211,8 +211,8 @@ entry(%c : $SwiftClass, %a : $*A, %i : $Int):
211
211
// CHECK-LABEL: define internal swift{{(tail)?}}cc void @"$s35captured_fixed_and_dependent_paramsTA"(
212
212
sil @partial_apply_indirect_non_fixed_layout : $@async @convention(thin) <T> (@owned SwiftClass, @in T, Int) -> @async @callee_guaranteed () -> () {
213
213
bb0(%a : $SwiftClass, %b : $*T, %c : $Int):
214
- %f = function_ref @captured_fixed_and_dependent_params : $@async @convention(thin) <B> (@owned SwiftClass, @in B, Int) -> ()
215
- %p = partial_apply [callee_guaranteed] %f<T>(%a, %b, %c) : $@async @convention(thin) <C> (@owned SwiftClass, @in C, Int) -> ()
214
+ %f = function_ref @captured_fixed_and_dependent_params : $@async @convention(thin) <B> (@guaranteed SwiftClass, @in_guaranteed B, Int) -> ()
215
+ %p = partial_apply [callee_guaranteed] %f<T>(%a, %b, %c) : $@async @convention(thin) <C> (@guaranteed SwiftClass, @in_guaranteed C, Int) -> ()
216
216
return %p : $@async @callee_guaranteed () -> ()
217
217
}
218
218
@@ -248,27 +248,27 @@ class Sub : Base {
248
248
249
249
sil_vtable Sub {}
250
250
251
- sil @parametric_casting_closure : $@async @convention(thin) <C where C : Base> (@owned Base) -> @owned C {
251
+ sil @parametric_casting_closure : $@async @convention(thin) <C where C : Base> (@guaranteed Base) -> @owned C {
252
252
bb0(%0 : $Base):
253
253
%1 = unconditional_checked_cast %0 : $Base to C
254
254
return %1 : $C
255
255
}
256
256
257
257
sil public_external @receive_closure : $@async @convention(thin) <C where C : Base> (@owned @async @callee_guaranteed () -> (@owned C)) -> ()
258
- sil public_external @receive_closure2 : $@async @convention(thin) <C where C : Base> (@owned @async @callee_guaranteed (@owned Base) -> (@owned C)) -> ()
258
+ sil public_external @receive_closure2 : $@async @convention(thin) <C where C : Base> (@owned @async @callee_guaranteed (@guaranteed Base) -> (@owned C)) -> ()
259
259
260
260
// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swift{{(tail)?}}cc void @test_partial_apply(
261
261
// CHECK-LABEL: define internal swift{{(tail)?}}cc void @"$s26parametric_casting_closureTA"(
262
262
// CHECK-LABEL: define internal swift{{(tail)?}}cc void @"$s26parametric_casting_closureTA.{{[0-9]+}}"(
263
263
sil @test_partial_apply : $@async @convention(thin) (@owned Base) -> () {
264
264
bb0(%0 : $Base):
265
- %1 = function_ref @parametric_casting_closure : $@async @convention(thin) <C where C : Base> (@owned Base) -> @owned C
266
- %6 = partial_apply [callee_guaranteed] %1<Sub>() : $@async @convention(thin) <C where C : Base> (@owned Base) -> @owned C
267
- %2 = partial_apply [callee_guaranteed] %1<Sub>(%0) : $@async @convention(thin) <C where C : Base> (@owned Base) -> @owned C
265
+ %1 = function_ref @parametric_casting_closure : $@async @convention(thin) <C where C : Base> (@guaranteed Base) -> @owned C
266
+ %6 = partial_apply [callee_guaranteed] %1<Sub>() : $@async @convention(thin) <C where C : Base> (@guaranteed Base) -> @owned C
267
+ %2 = partial_apply [callee_guaranteed] %1<Sub>(%0) : $@async @convention(thin) <C where C : Base> (@guaranteed Base) -> @owned C
268
268
%3 = function_ref @receive_closure : $@async @convention(thin) <C where C : Base> (@owned @async @callee_guaranteed () -> (@owned C)) -> ()
269
269
%4 = apply %3<Sub>(%2) : $@async @convention(thin) <C where C : Base> (@owned @async @callee_guaranteed () -> (@owned C)) -> ()
270
- %5 = function_ref @receive_closure2 : $@async @convention(thin) <C where C : Base> (@owned @async @callee_guaranteed (@owned Base) -> (@owned C)) -> ()
271
- %8 = apply %5<Sub>(%6) : $@async @convention(thin) <C where C : Base> (@owned @async @callee_guaranteed (@owned Base) -> (@owned C)) -> ()
270
+ %5 = function_ref @receive_closure2 : $@async @convention(thin) <C where C : Base> (@owned @async @callee_guaranteed (@guaranteed Base) -> (@owned C)) -> ()
271
+ %8 = apply %5<Sub>(%6) : $@async @convention(thin) <C where C : Base> (@owned @async @callee_guaranteed (@guaranteed Base) -> (@owned C)) -> ()
272
272
%7 = tuple ()
273
273
return %7 : $()
274
274
}
@@ -372,7 +372,7 @@ sil @partial_apply_generic_indirect_return2 : $@async @convention(thin) (Int) ->
372
372
373
373
struct SwiftStruct {}
374
374
375
- sil @fun : $@async @convention(thin) (@thin SwiftStruct.Type, @owned SwiftClass) -> () {
375
+ sil @fun : $@async @convention(thin) (@thin SwiftStruct.Type, @guaranteed SwiftClass) -> () {
376
376
entry(%t : $@thin SwiftStruct.Type, %c : $SwiftClass):
377
377
%0 = builtin "int_trap"() : $Never
378
378
unreachable
@@ -382,8 +382,8 @@ entry(%t : $@thin SwiftStruct.Type, %c : $SwiftClass):
382
382
383
383
sil @partial_apply_thin_type : $@async @convention(thin) (@thin SwiftStruct.Type, @owned SwiftClass) -> @async @callee_guaranteed () -> () {
384
384
entry(%0: $@thin SwiftStruct.Type, %1: $SwiftClass):
385
- %fun = function_ref @fun : $@async @convention(thin) (@thin SwiftStruct.Type, @owned SwiftClass) -> ()
386
- %closure = partial_apply [callee_guaranteed] %fun (%0, %1) : $@async @convention(thin) (@thin SwiftStruct.Type, @owned SwiftClass) -> ()
385
+ %fun = function_ref @fun : $@async @convention(thin) (@thin SwiftStruct.Type, @guaranteed SwiftClass) -> ()
386
+ %closure = partial_apply [callee_guaranteed] %fun (%0, %1) : $@async @convention(thin) (@thin SwiftStruct.Type, @guaranteed SwiftClass) -> ()
387
387
return %closure : $@async @callee_guaranteed () -> ()
388
388
}
389
389
@@ -483,16 +483,16 @@ bb0(%x : $*SwiftClassPair):
483
483
484
484
// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swift{{(tail)?}}cc void @partial_apply_stack_callee_guaranteed_indirect_in_class_pair_param(
485
485
// CHECK-LABEL: define internal swift{{(tail)?}}cc void @"$s37indirect_in_captured_class_pair_paramTA"(
486
- sil public @indirect_in_captured_class_pair_param : $@async @convention(thin) (Int, @in SwiftClassPair) -> Int {
486
+ sil public @indirect_in_captured_class_pair_param : $@async @convention(thin) (Int, @in_guaranteed SwiftClassPair) -> Int {
487
487
entry(%i : $Int, %p : $*SwiftClassPair):
488
488
%0 = builtin "int_trap"() : $Never
489
489
unreachable
490
490
}
491
491
492
492
sil @partial_apply_stack_callee_guaranteed_indirect_in_class_pair_param : $@async @convention(thin) (@in SwiftClassPair) -> () {
493
493
bb0(%x : $*SwiftClassPair):
494
- %f = function_ref @indirect_in_captured_class_pair_param : $@async @convention(thin) (Int, @in SwiftClassPair) -> Int
495
- %p = partial_apply [callee_guaranteed] [on_stack] %f(%x) : $@async @convention(thin) (Int, @in SwiftClassPair) -> Int
494
+ %f = function_ref @indirect_in_captured_class_pair_param : $@async @convention(thin) (Int, @in_guaranteed SwiftClassPair) -> Int
495
+ %p = partial_apply [callee_guaranteed] [on_stack] %f(%x) : $@async @convention(thin) (Int, @in_guaranteed SwiftClassPair) -> Int
496
496
%u = function_ref @use_closure2 : $@async @convention(thin) (@noescape @async @callee_guaranteed (Int) -> Int) -> ()
497
497
%r = apply %u(%p) : $@async @convention(thin) (@noescape @async @callee_guaranteed (Int) -> Int) -> ()
498
498
dealloc_stack %p : $@noescape @async @callee_guaranteed (Int) ->(Int)
@@ -504,16 +504,16 @@ bb0(%x : $*SwiftClassPair):
504
504
505
505
// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swift{{(tail)?}}cc void @partial_apply_stack_callee_guaranteed_indirect_in_constant_class_pair_param(
506
506
// CHECK-LABEL: define internal swift{{(tail)?}}cc void @"$s46indirect_in_constant_captured_class_pair_paramTA"(
507
- sil public @indirect_in_constant_captured_class_pair_param : $@async @convention(thin) (Int, @in_constant SwiftClassPair) -> Int {
507
+ sil public @indirect_in_constant_captured_class_pair_param : $@async @convention(thin) (Int, @in_guaranteed SwiftClassPair) -> Int {
508
508
entry(%i : $Int, %ic : $*SwiftClassPair):
509
509
%0 = builtin "int_trap"() : $Never
510
510
unreachable
511
511
}
512
512
513
513
sil @partial_apply_stack_callee_guaranteed_indirect_in_constant_class_pair_param : $@async @convention(thin) (@in SwiftClassPair) -> () {
514
514
bb0(%x : $*SwiftClassPair):
515
- %f = function_ref @indirect_in_constant_captured_class_pair_param : $@async @convention(thin) (Int, @in_constant SwiftClassPair) -> Int
516
- %p = partial_apply [callee_guaranteed] [on_stack] %f(%x) : $@async @convention(thin) (Int, @in_constant SwiftClassPair) -> Int
515
+ %f = function_ref @indirect_in_constant_captured_class_pair_param : $@async @convention(thin) (Int, @in_guaranteed SwiftClassPair) -> Int
516
+ %p = partial_apply [callee_guaranteed] [on_stack] %f(%x) : $@async @convention(thin) (Int, @in_guaranteed SwiftClassPair) -> Int
517
517
%u = function_ref @use_closure2 : $@async @convention(thin) (@noescape @async @callee_guaranteed (Int) -> Int) -> ()
518
518
%r = apply %u(%p) : $@async @convention(thin) (@noescape @async @callee_guaranteed (Int) -> Int) -> ()
519
519
dealloc_stack %p : $@noescape @async @callee_guaranteed (Int) ->(Int)
0 commit comments