mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
We are creating/relying on a contract between the AST and SIL... that SILDeclRef should accurately describe the method/accessor that a class_method is from. By doing this we eliminate pattern matching on the AST which ties this code too tightly to the AST and makes it brittle in the face of AST changes. This also fixes an issue where we were not handling setters correctly. I am doing this now since it is natural to fix it along side fixing the ref_element_addr issue in the previous commit since they are effectively doing the same thing. rdar://153207557
1900 lines
108 KiB
Plaintext
1900 lines
108 KiB
Plaintext
// RUN: %target-sil-opt -module-name infer --test-runner %s 2>&1 | %FileCheck %s
|
|
|
|
// REQUIRES: concurrency
|
|
// REQUIRES: asserts
|
|
|
|
// PLEASE READ THIS!
|
|
//
|
|
// This test is specifically meant to test how we infer isolation for specific
|
|
// values.
|
|
|
|
sil_stage raw
|
|
|
|
import Swift
|
|
import Builtin
|
|
import _Concurrency
|
|
|
|
////////////////////////
|
|
// MARK: Declarations //
|
|
////////////////////////
|
|
|
|
class NonSendableKlass {
|
|
}
|
|
|
|
actor MyActor {
|
|
init()
|
|
@MainActor init(_ x: NonSendableKlass)
|
|
init() async
|
|
|
|
var ns: NonSendableKlass
|
|
@MainActor var globalActorNS: NonSendableKlass
|
|
nonisolated(unsafe) var nsNonisolatedUnsafe: NonSendableKlass
|
|
|
|
var nsComputed: NonSendableKlass { get set }
|
|
@MainActor var globalActorNSComputed: NonSendableKlass { get set }
|
|
nonisolated var nsNonisolatedComputed: NonSendableKlass { get set }
|
|
|
|
func getNS() -> NonSendableKlass
|
|
@MainActor func getNSGlobalActor() -> NonSendableKlass
|
|
nonisolated func getNSNonisolated() -> NonSendableKlass
|
|
|
|
func doSomething() async -> NonSendableKlass
|
|
}
|
|
|
|
actor CustomActorInstance {}
|
|
|
|
@globalActor
|
|
struct CustomActor {
|
|
static let shared = CustomActorInstance()
|
|
}
|
|
|
|
@MainActor class MainActorIsolatedKlass {
|
|
var ns: NonSendableKlass
|
|
@CustomActor var globalActorNS: NonSendableKlass
|
|
nonisolated(unsafe) var nsNonisolatedUnsafe: NonSendableKlass
|
|
|
|
var nsComputed: NonSendableKlass { get }
|
|
@CustomActor var globalActorNSComputed: NonSendableKlass { get set }
|
|
nonisolated var nsNonisolatedComputed: NonSendableKlass { get set }
|
|
|
|
func getNS() -> NonSendableKlass
|
|
@CustomActor func getNSGlobalActor() -> NonSendableKlass
|
|
nonisolated func getNSNonisolated() -> NonSendableKlass
|
|
|
|
class var nsClassComputed: NonSendableKlass { get set }
|
|
@CustomActor class var globalActorNSClassComputed: NonSendableKlass { get set }
|
|
nonisolated(unsafe) class var nsNonisolatedUnsafeClassComputed: NonSendableKlass { get set }
|
|
nonisolated class var nsNonisolatedClassComputed: NonSendableKlass { get set }
|
|
|
|
class func getNSClassFunc() -> NonSendableKlass
|
|
@CustomActor class func getNSGlobalActorClassFunc() -> NonSendableKlass
|
|
nonisolated class func getNSNonisolatedClassFunc() -> NonSendableKlass
|
|
}
|
|
|
|
class NonisolatedKlass {
|
|
var ns: NonSendableKlass
|
|
@CustomActor var globalActorNS: NonSendableKlass
|
|
nonisolated(unsafe) var nsNonisolatedUnsafe: NonSendableKlass
|
|
|
|
var nsComputed: NonSendableKlass { get set }
|
|
@CustomActor var globalActorNSComputed: NonSendableKlass { get set }
|
|
nonisolated var nsNonisolatedComputed: NonSendableKlass { get set }
|
|
|
|
func getNS() -> NonSendableKlass
|
|
@CustomActor func getNSGlobalActor() -> NonSendableKlass
|
|
nonisolated func getNSNonisolated() -> NonSendableKlass
|
|
|
|
class var nsClassComputed: NonSendableKlass { get set }
|
|
@CustomActor class var globalActorNSClassComputed: NonSendableKlass { get set }
|
|
nonisolated(unsafe) class var nsNonisolatedUnsafeClassComputed: NonSendableKlass { get set }
|
|
nonisolated class var nsNonisolatedClassComputed: NonSendableKlass { get set }
|
|
|
|
class func getNSClassFunc() -> NonSendableKlass
|
|
@CustomActor class func getNSGlobalActorClassFunc() -> NonSendableKlass
|
|
nonisolated class func getNSNonisolatedClassFunc() -> NonSendableKlass
|
|
}
|
|
|
|
@MainActor struct MainActorIsolatedStruct {
|
|
var ns: NonSendableKlass
|
|
@CustomActor var globalActorNS: NonSendableKlass
|
|
nonisolated(unsafe) var nsNonisolatedUnsafe: NonSendableKlass
|
|
}
|
|
|
|
struct NonisolatedStruct {
|
|
var ns: NonSendableKlass
|
|
@CustomActor var globalActorNS: NonSendableKlass
|
|
nonisolated(unsafe) var nsNonisolatedUnsafe: NonSendableKlass
|
|
}
|
|
|
|
sil @transferNonSendableKlass : $@convention(thin) @async (@guaranteed NonSendableKlass) -> ()
|
|
sil @useNonSendableKlass : $@convention(thin) (@guaranteed NonSendableKlass) -> ()
|
|
sil @constructNonSendableKlass : $@convention(thin) () -> @owned NonSendableKlass
|
|
sil @constructNonSendableKlassIndirect : $@convention(thin) () -> @out NonSendableKlass
|
|
sil @constructNonSendableKlassIndirectAsync : $@convention(thin) @async () -> @out NonSendableKlass
|
|
sil @useUnmanagedNonSendableKlass : $@convention(thin) (@guaranteed @sil_unmanaged NonSendableKlass) -> ()
|
|
|
|
sil @useActor : $@convention(thin) (@sil_isolated @guaranteed MyActor) -> @owned NonSendableKlass
|
|
sil @useOptionalActor : $@convention(thin) (@sil_isolated @guaranteed Optional<MyActor>) -> @owned NonSendableKlass
|
|
|
|
///////////////////////
|
|
// MARK: Basic Tests //
|
|
///////////////////////
|
|
|
|
// For now we always infer an actor as having unknown isolation since we only
|
|
// talk about isolation of an actor (or other Sendable types).
|
|
//
|
|
// CHECK: begin running test 1 of 1 on actor_self_isolation_unknown: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK-NEXT: Input Value: %0 = argument of bb0 : $MyActor
|
|
// CHECK-NEXT: Isolation: unknown
|
|
// CHECK-NEXT: end running test 1 of 1 on actor_self_isolation_unknown: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @actor_self_isolation_unknown : $@convention(thin) (@guaranteed MyActor) -> () {
|
|
bb0(%0 : @guaranteed $MyActor):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value [trace] %0 : $MyActor
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK: begin running test 1 of 1 on actor_field_isolation: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK-NEXT: Input Value: %2 = ref_element_addr %0 : $MyActor
|
|
// CHECK-NEXT: Isolation: 'argument'-isolated
|
|
// CHECK-NEXT: end running test 1 of 1 on actor_field_isolation: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @actor_field_isolation : $@convention(thin) (@guaranteed MyActor) -> () {
|
|
bb0(%0 : @guaranteed $MyActor):
|
|
debug_value %0 : $MyActor, let, name "argument"
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
%1 = ref_element_addr %0 : $MyActor, #MyActor.ns
|
|
debug_value [trace] %1 : $*NonSendableKlass
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
/////////////////////////////////
|
|
// MARK: Temporary Alloc Stack //
|
|
/////////////////////////////////
|
|
|
|
// CHECK: begin running test 1 of 1 on temp_alloc_stack_infer_from_indirect_arg_same_block: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK-NEXT: Input Value: %0 = alloc_stack $NonSendableKlass
|
|
// CHECK-NEXT: Isolation: disconnected
|
|
// CHECK-NEXT: end running test 1 of 1 on temp_alloc_stack_infer_from_indirect_arg_same_block: sil_isolation_info_inference with: @trace[0]
|
|
sil @temp_alloc_stack_infer_from_indirect_arg_same_block : $@convention(thin) () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
%0 = alloc_stack $NonSendableKlass
|
|
%f = function_ref @constructNonSendableKlassIndirect : $@convention(thin) () -> @out NonSendableKlass
|
|
apply %f(%0) : $@convention(thin) () -> @out NonSendableKlass
|
|
debug_value [trace] %0 : $*NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
dealloc_stack %0 : $*NonSendableKlass
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK: begin running test 1 of 1 on temp_alloc_stack_infer_from_indirect_arg_with_isolation_same_block: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK-NEXT: Input Value: %0 = alloc_stack $NonSendableKlass
|
|
// CHECK-NEXT: global actor '<null>'-isolated
|
|
// CHECK-NEXT: end running test 1 of 1 on temp_alloc_stack_infer_from_indirect_arg_with_isolation_same_block: sil_isolation_info_inference with: @trace[0]
|
|
sil @temp_alloc_stack_infer_from_indirect_arg_with_isolation_same_block : $@convention(thin) @async () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
%0 = alloc_stack $NonSendableKlass
|
|
%f = function_ref @constructNonSendableKlassIndirectAsync : $@convention(thin) @async () -> @out NonSendableKlass
|
|
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %f(%0) : $@convention(thin) @async () -> @out NonSendableKlass
|
|
debug_value [trace] %0 : $*NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
dealloc_stack %0 : $*NonSendableKlass
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK: begin running test 1 of 1 on temp_alloc_stack_infer_failure_write_before_in_same_block: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK-NEXT: Input Value: %0 = alloc_stack $NonSendableKlass
|
|
// CHECK-NEXT: Isolation: disconnected
|
|
// CHECK-NEXT: end running test 1 of 1 on temp_alloc_stack_infer_failure_write_before_in_same_block: sil_isolation_info_inference with: @trace[0]
|
|
sil @temp_alloc_stack_infer_failure_write_before_in_same_block : $@convention(thin) @async () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
|
|
%0 = alloc_stack $NonSendableKlass
|
|
debug_value [trace] %0 : $*NonSendableKlass
|
|
|
|
// First call without transferring (performing a write).
|
|
%f = function_ref @constructNonSendableKlassIndirect : $@convention(thin) () -> @out NonSendableKlass
|
|
apply %f(%0) : $@convention(thin) () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
|
|
// Then do it indirect. The write before should have inhibited the inference.
|
|
%f2 = function_ref @constructNonSendableKlassIndirectAsync : $@convention(thin) @async () -> @out NonSendableKlass
|
|
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %f2(%0) : $@convention(thin) @async () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
dealloc_stack %0 : $*NonSendableKlass
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK: begin running test 1 of 1 on temp_alloc_stack_infer_failure_ignore_later_same_block_init: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK-NEXT: Input Value: %0 = alloc_stack $NonSendableKlass
|
|
// CHECK-NEXT: Isolation: global actor '<null>'-isolated
|
|
// CHECK-NEXT: end running test 1 of 1 on temp_alloc_stack_infer_failure_ignore_later_same_block_init: sil_isolation_info_inference with: @trace[0]
|
|
sil @temp_alloc_stack_infer_failure_ignore_later_same_block_init : $@convention(thin) @async () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
|
|
%0 = alloc_stack $NonSendableKlass
|
|
debug_value [trace] %0 : $*NonSendableKlass
|
|
|
|
%f = function_ref @constructNonSendableKlassIndirectAsync : $@convention(thin) @async () -> @out NonSendableKlass
|
|
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %f(%0) : $@convention(thin) @async () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
|
|
apply [caller_isolation=nonisolated] [callee_isolation=actor_instance] %f(%0) : $@convention(thin) @async () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
dealloc_stack %0 : $*NonSendableKlass
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK: begin running test 1 of 1 on temp_alloc_stack_infer_failure_ignore_later_same_block_init_2: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK-NEXT: Input Value: %0 = alloc_stack $NonSendableKlass
|
|
// CHECK-NEXT: Isolation: actor-isolated
|
|
// CHECK-NEXT: end running test 1 of 1 on temp_alloc_stack_infer_failure_ignore_later_same_block_init_2: sil_isolation_info_inference with: @trace[0]
|
|
sil @temp_alloc_stack_infer_failure_ignore_later_same_block_init_2 : $@convention(thin) @async () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
|
|
%0 = alloc_stack $NonSendableKlass
|
|
debug_value [trace] %0 : $*NonSendableKlass
|
|
|
|
%f = function_ref @constructNonSendableKlassIndirectAsync : $@convention(thin) @async () -> @out NonSendableKlass
|
|
apply [caller_isolation=nonisolated] [callee_isolation=actor_instance] %f(%0) : $@convention(thin) @async () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
|
|
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %f(%0) : $@convention(thin) @async () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
dealloc_stack %0 : $*NonSendableKlass
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK: begin running test 1 of 1 on temp_alloc_stack_different_block_simple: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK-NEXT: Input Value: %0 = alloc_stack $NonSendableKlass
|
|
// CHECK-NEXT: Isolation: actor-isolated
|
|
// CHECK-NEXT: end running test 1 of 1 on temp_alloc_stack_different_block_simple: sil_isolation_info_inference with: @trace[0]
|
|
sil @temp_alloc_stack_different_block_simple : $@convention(thin) @async () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
|
|
%0 = alloc_stack $NonSendableKlass
|
|
debug_value [trace] %0 : $*NonSendableKlass
|
|
|
|
cond_br undef, bb1, bb2
|
|
|
|
bb1:
|
|
br bb3
|
|
|
|
bb2:
|
|
br bb3
|
|
|
|
bb3:
|
|
%f = function_ref @constructNonSendableKlassIndirectAsync : $@convention(thin) @async () -> @out NonSendableKlass
|
|
apply [caller_isolation=nonisolated] [callee_isolation=actor_instance] %f(%0) : $@convention(thin) @async () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
|
|
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %f(%0) : $@convention(thin) @async () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
dealloc_stack %0 : $*NonSendableKlass
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK: begin running test 1 of 1 on temp_alloc_stack_different_block_disrupting_write: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK-NEXT: Input Value: %0 = alloc_stack $NonSendableKlass
|
|
// CHECK-NEXT: Isolation: disconnected
|
|
// CHECK-NEXT: end running test 1 of 1 on temp_alloc_stack_different_block_disrupting_write: sil_isolation_info_inference with: @trace[0]
|
|
sil @temp_alloc_stack_different_block_disrupting_write : $@convention(thin) @async () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
|
|
%0 = alloc_stack $NonSendableKlass
|
|
debug_value [trace] %0 : $*NonSendableKlass
|
|
cond_br undef, bb1, bb2
|
|
|
|
bb1:
|
|
// First call without transferring (performing a write).
|
|
%f2 = function_ref @constructNonSendableKlassIndirect : $@convention(thin) () -> @out NonSendableKlass
|
|
apply %f2(%0) : $@convention(thin) () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
br bb3
|
|
|
|
bb2:
|
|
br bb3
|
|
|
|
bb3:
|
|
%f = function_ref @constructNonSendableKlassIndirectAsync : $@convention(thin) @async () -> @out NonSendableKlass
|
|
apply [caller_isolation=nonisolated] [callee_isolation=actor_instance] %f(%0) : $@convention(thin) @async () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
|
|
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %f(%0) : $@convention(thin) @async () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
dealloc_stack %0 : $*NonSendableKlass
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK: begin running test 1 of 1 on temp_alloc_stack_different_block_disrupting_write_2: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK-NEXT: Input Value: %0 = alloc_stack $NonSendableKlass
|
|
// CHECK-NEXT: Isolation: disconnected
|
|
// CHECK-NEXT: end running test 1 of 1 on temp_alloc_stack_different_block_disrupting_write_2: sil_isolation_info_inference with: @trace[0]
|
|
sil @temp_alloc_stack_different_block_disrupting_write_2 : $@convention(thin) @async () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
|
|
%0 = alloc_stack $NonSendableKlass
|
|
debug_value [trace] %0 : $*NonSendableKlass
|
|
cond_br undef, bb1, bb2
|
|
|
|
bb1:
|
|
br bb3
|
|
|
|
bb2:
|
|
// First call without transferring (performing a write).
|
|
%f2 = function_ref @constructNonSendableKlassIndirect : $@convention(thin) () -> @out NonSendableKlass
|
|
apply %f2(%0) : $@convention(thin) () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
br bb3
|
|
|
|
bb3:
|
|
%f = function_ref @constructNonSendableKlassIndirectAsync : $@convention(thin) @async () -> @out NonSendableKlass
|
|
apply [caller_isolation=nonisolated] [callee_isolation=actor_instance] %f(%0) : $@convention(thin) @async () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
|
|
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %f(%0) : $@convention(thin) @async () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
dealloc_stack %0 : $*NonSendableKlass
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK: begin running test 1 of 1 on temp_alloc_stack_different_block_disrupting_write_3: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK-NEXT: Input Value: %0 = alloc_stack $NonSendableKlass
|
|
// CHECK-NEXT: Isolation: disconnected
|
|
// CHECK-NEXT: end running test 1 of 1 on temp_alloc_stack_different_block_disrupting_write_3: sil_isolation_info_inference with: @trace[0]
|
|
sil @temp_alloc_stack_different_block_disrupting_write_3 : $@convention(thin) @async () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
|
|
%0 = alloc_stack $NonSendableKlass
|
|
debug_value [trace] %0 : $*NonSendableKlass
|
|
|
|
// First call without transferring (performing a write).
|
|
%f2 = function_ref @constructNonSendableKlassIndirect : $@convention(thin) () -> @out NonSendableKlass
|
|
apply %f2(%0) : $@convention(thin) () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
|
|
cond_br undef, bb1, bb2
|
|
|
|
bb1:
|
|
br bb3
|
|
|
|
bb2:
|
|
br bb3
|
|
|
|
bb3:
|
|
%f = function_ref @constructNonSendableKlassIndirectAsync : $@convention(thin) @async () -> @out NonSendableKlass
|
|
apply [caller_isolation=nonisolated] [callee_isolation=actor_instance] %f(%0) : $@convention(thin) @async () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
|
|
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %f(%0) : $@convention(thin) @async () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
dealloc_stack %0 : $*NonSendableKlass
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK: begin running test 1 of 1 on temp_alloc_stack_different_block_matching_inits: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK-NEXT: Input Value: %0 = alloc_stack $NonSendableKlass
|
|
// CHECK-NEXT: Isolation: disconnected
|
|
// CHECK-NEXT: end running test 1 of 1 on temp_alloc_stack_different_block_matching_inits: sil_isolation_info_inference with: @trace[0]
|
|
sil @temp_alloc_stack_different_block_matching_inits : $@convention(thin) @async () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
|
|
%0 = alloc_stack $NonSendableKlass
|
|
debug_value [trace] %0 : $*NonSendableKlass
|
|
%f = function_ref @constructNonSendableKlassIndirectAsync : $@convention(thin) @async () -> @out NonSendableKlass
|
|
|
|
cond_br undef, bb1, bb2
|
|
|
|
bb1:
|
|
apply [caller_isolation=nonisolated] [callee_isolation=actor_instance] %f(%0) : $@convention(thin) @async () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
br bb3
|
|
|
|
bb2:
|
|
apply [caller_isolation=nonisolated] [callee_isolation=actor_instance] %f(%0) : $@convention(thin) @async () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
br bb3
|
|
|
|
bb3:
|
|
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %f(%0) : $@convention(thin) @async () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
dealloc_stack %0 : $*NonSendableKlass
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK: begin running test 1 of 1 on temp_alloc_stack_different_block_matching_inits_2: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK-NEXT: Input Value: %0 = alloc_stack $NonSendableKlass
|
|
// CHECK-NEXT: Isolation: disconnected
|
|
// CHECK-NEXT: end running test 1 of 1 on temp_alloc_stack_different_block_matching_inits_2: sil_isolation_info_inference with: @trace[0]
|
|
sil @temp_alloc_stack_different_block_matching_inits_2 : $@convention(thin) @async () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
|
|
%0 = alloc_stack $NonSendableKlass
|
|
debug_value [trace] %0 : $*NonSendableKlass
|
|
%f = function_ref @constructNonSendableKlassIndirectAsync : $@convention(thin) @async () -> @out NonSendableKlass
|
|
|
|
cond_br undef, bb1, bb2
|
|
|
|
bb1:
|
|
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %f(%0) : $@convention(thin) @async () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
br bb3
|
|
|
|
bb2:
|
|
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %f(%0) : $@convention(thin) @async () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
br bb3
|
|
|
|
bb3:
|
|
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %f(%0) : $@convention(thin) @async () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
dealloc_stack %0 : $*NonSendableKlass
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// If we see multiple initializations, just leave it as disconnected. This is
|
|
// more conservative.
|
|
//
|
|
// CHECK: begin running test 1 of 1 on temp_alloc_stack_different_block_conflicting_inits: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK-NEXT: Input Value: %0 = alloc_stack $NonSendableKlass
|
|
// CHECK-NEXT: Isolation: disconnected
|
|
// CHECK-NEXT: end running test 1 of 1 on temp_alloc_stack_different_block_conflicting_inits: sil_isolation_info_inference with: @trace[0]
|
|
sil @temp_alloc_stack_different_block_conflicting_inits : $@convention(thin) @async () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
|
|
%0 = alloc_stack $NonSendableKlass
|
|
debug_value [trace] %0 : $*NonSendableKlass
|
|
%f = function_ref @constructNonSendableKlassIndirectAsync : $@convention(thin) @async () -> @out NonSendableKlass
|
|
|
|
cond_br undef, bb1, bb2
|
|
|
|
bb1:
|
|
apply [caller_isolation=nonisolated] [callee_isolation=actor_instance] %f(%0) : $@convention(thin) @async () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
br bb3
|
|
|
|
bb2:
|
|
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %f(%0) : $@convention(thin) @async () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
br bb3
|
|
|
|
bb3:
|
|
dealloc_stack %0 : $*NonSendableKlass
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// If we see multiple initializations along any path... we need to be disconnected.
|
|
//
|
|
// CHECK: begin running test 1 of 1 on temp_alloc_stack_different_block_conflicting_inits_2: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK-NEXT: Input Value: %0 = alloc_stack $NonSendableKlass
|
|
// CHECK-NEXT: Isolation: disconnected
|
|
// CHECK-NEXT: end running test 1 of 1 on temp_alloc_stack_different_block_conflicting_inits_2: sil_isolation_info_inference with: @trace[0]
|
|
sil @temp_alloc_stack_different_block_conflicting_inits_2 : $@convention(thin) @async () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
|
|
%0 = alloc_stack $NonSendableKlass
|
|
debug_value [trace] %0 : $*NonSendableKlass
|
|
%f = function_ref @constructNonSendableKlassIndirectAsync : $@convention(thin) @async () -> @out NonSendableKlass
|
|
|
|
cond_br undef, bb1, bb2
|
|
|
|
bb1:
|
|
apply [caller_isolation=nonisolated] [callee_isolation=actor_instance] %f(%0) : $@convention(thin) @async () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
br bb3
|
|
|
|
bb2:
|
|
br bb3
|
|
|
|
bb3:
|
|
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %f(%0) : $@convention(thin) @async () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
dealloc_stack %0 : $*NonSendableKlass
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// More complex CFG work with a loop.
|
|
//
|
|
// CHECK: begin running test 1 of 1 on temp_alloc_stack_different_block_larger_cfg: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK-NEXT: Input Value: %0 = alloc_stack $NonSendableKlass
|
|
// CHECK-NEXT: Isolation: global actor '<null>'-isolated
|
|
// CHECK-NEXT: end running test 1 of 1 on temp_alloc_stack_different_block_larger_cfg: sil_isolation_info_inference with: @trace[0]
|
|
sil @temp_alloc_stack_different_block_larger_cfg : $@convention(thin) @async () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
|
|
%0 = alloc_stack $NonSendableKlass
|
|
debug_value [trace] %0 : $*NonSendableKlass
|
|
%f = function_ref @constructNonSendableKlassIndirectAsync : $@convention(thin) @async () -> @out NonSendableKlass
|
|
|
|
cond_br undef, bb1, bb2
|
|
|
|
bb1:
|
|
br bb3
|
|
|
|
bb2:
|
|
br bb3
|
|
|
|
bb3:
|
|
br bb4
|
|
|
|
bb4:
|
|
br bb5
|
|
|
|
bb5:
|
|
cond_br undef, bb4, bb6
|
|
|
|
bb6:
|
|
br bb7
|
|
|
|
bb7:
|
|
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %f(%0) : $@convention(thin) @async () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
dealloc_stack %0 : $*NonSendableKlass
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK: begin running test 1 of 1 on temp_alloc_stack_different_block_larger_cfg_2: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK-NEXT: Input Value: %0 = alloc_stack $NonSendableKlass
|
|
// CHECK-NEXT: Isolation: global actor '<null>'-isolated
|
|
// CHECK-NEXT: end running test 1 of 1 on temp_alloc_stack_different_block_larger_cfg_2: sil_isolation_info_inference with: @trace[0]
|
|
sil @temp_alloc_stack_different_block_larger_cfg_2 : $@convention(thin) @async () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
|
|
%0 = alloc_stack $NonSendableKlass
|
|
debug_value [trace] %0 : $*NonSendableKlass
|
|
%f = function_ref @constructNonSendableKlassIndirectAsync : $@convention(thin) @async () -> @out NonSendableKlass
|
|
|
|
cond_br undef, bb1, bb2
|
|
|
|
bb1:
|
|
br bb3
|
|
|
|
bb2:
|
|
br bb3
|
|
|
|
bb3:
|
|
br bb4
|
|
|
|
bb4:
|
|
br bb5
|
|
|
|
bb5:
|
|
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %f(%0) : $@convention(thin) @async () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
cond_br undef, bb4, bb6
|
|
|
|
bb6:
|
|
br bb7
|
|
|
|
bb7:
|
|
dealloc_stack %0 : $*NonSendableKlass
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK: begin running test 1 of 1 on temp_alloc_stack_different_block_larger_cfg_3: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK-NEXT: Input Value: %0 = alloc_stack $NonSendableKlass
|
|
// CHECK-NEXT: Isolation: global actor '<null>'-isolated
|
|
// CHECK-NEXT: end running test 1 of 1 on temp_alloc_stack_different_block_larger_cfg_3: sil_isolation_info_inference with: @trace[0]
|
|
sil @temp_alloc_stack_different_block_larger_cfg_3 : $@convention(thin) @async () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
|
|
%0 = alloc_stack $NonSendableKlass
|
|
debug_value [trace] %0 : $*NonSendableKlass
|
|
%f = function_ref @constructNonSendableKlassIndirectAsync : $@convention(thin) @async () -> @out NonSendableKlass
|
|
|
|
cond_br undef, bb1, bb2
|
|
|
|
bb1:
|
|
br bb3
|
|
|
|
bb2:
|
|
br bb3
|
|
|
|
bb3:
|
|
br bb4
|
|
|
|
bb4:
|
|
br bb5
|
|
|
|
bb5:
|
|
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %f(%0) : $@convention(thin) @async () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
cond_br undef, bb4, bb6
|
|
|
|
bb6:
|
|
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %f(%0) : $@convention(thin) @async () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
br bb7
|
|
|
|
bb7:
|
|
dealloc_stack %0 : $*NonSendableKlass
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK: begin running test 1 of 1 on temp_alloc_stack_different_block_larger_cfg_4: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK-NEXT: Input Value: %0 = alloc_stack $NonSendableKlass
|
|
// CHECK-NEXT: Isolation: disconnected
|
|
// CHECK-NEXT: end running test 1 of 1 on temp_alloc_stack_different_block_larger_cfg_4: sil_isolation_info_inference with: @trace[0]
|
|
sil @temp_alloc_stack_different_block_larger_cfg_4 : $@convention(thin) @async () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
|
|
%0 = alloc_stack $NonSendableKlass
|
|
debug_value [trace] %0 : $*NonSendableKlass
|
|
%f = function_ref @constructNonSendableKlassIndirectAsync : $@convention(thin) @async () -> @out NonSendableKlass
|
|
|
|
cond_br undef, bb1, bb2
|
|
|
|
bb1:
|
|
br bb3
|
|
|
|
bb2:
|
|
%f2 = function_ref @constructNonSendableKlassIndirect : $@convention(thin) () -> @out NonSendableKlass
|
|
apply %f2(%0) : $@convention(thin) () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
br bb3
|
|
|
|
bb3:
|
|
br bb4
|
|
|
|
bb4:
|
|
br bb5
|
|
|
|
bb5:
|
|
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %f(%0) : $@convention(thin) @async () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
cond_br undef, bb4, bb6
|
|
|
|
bb6:
|
|
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %f(%0) : $@convention(thin) @async () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
br bb7
|
|
|
|
bb7:
|
|
dealloc_stack %0 : $*NonSendableKlass
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK: begin running test 1 of 1 on temp_alloc_stack_different_block_larger_cfg_5: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK-NEXT: Input Value: %0 = alloc_stack $NonSendableKlass
|
|
// CHECK-NEXT: Isolation: global actor '<null>'-isolated
|
|
// CHECK-NEXT: end running test 1 of 1 on temp_alloc_stack_different_block_larger_cfg_5: sil_isolation_info_inference with: @trace[0]
|
|
sil @temp_alloc_stack_different_block_larger_cfg_5 : $@convention(thin) @async () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
|
|
%0 = alloc_stack $NonSendableKlass
|
|
debug_value [trace] %0 : $*NonSendableKlass
|
|
%f = function_ref @constructNonSendableKlassIndirectAsync : $@convention(thin) @async () -> @out NonSendableKlass
|
|
|
|
cond_br undef, bb1, bb2
|
|
|
|
bb1:
|
|
br bb3
|
|
|
|
bb2:
|
|
br bb3
|
|
|
|
bb3:
|
|
br bb4
|
|
|
|
bb4:
|
|
br bb5
|
|
|
|
bb5:
|
|
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %f(%0) : $@convention(thin) @async () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
cond_br undef, bb5a, bb6
|
|
|
|
bb5a:
|
|
%f2 = function_ref @constructNonSendableKlassIndirect : $@convention(thin) () -> @out NonSendableKlass
|
|
apply %f2(%0) : $@convention(thin) () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
br bb4
|
|
|
|
bb6:
|
|
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %f(%0) : $@convention(thin) @async () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
br bb7
|
|
|
|
bb7:
|
|
dealloc_stack %0 : $*NonSendableKlass
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK: begin running test 1 of 1 on temp_alloc_stack_different_block_larger_cfg_6: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK-NEXT: Input Value: %0 = alloc_stack $NonSendableKlass
|
|
// CHECK-NEXT: Isolation: disconnected
|
|
// CHECK-NEXT: end running test 1 of 1 on temp_alloc_stack_different_block_larger_cfg_6: sil_isolation_info_inference with: @trace[0]
|
|
sil @temp_alloc_stack_different_block_larger_cfg_6 : $@convention(thin) @async () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
|
|
%0 = alloc_stack $NonSendableKlass
|
|
debug_value [trace] %0 : $*NonSendableKlass
|
|
%f = function_ref @constructNonSendableKlassIndirectAsync : $@convention(thin) @async () -> @out NonSendableKlass
|
|
|
|
cond_br undef, bb1, bb2
|
|
|
|
bb1:
|
|
br bb3
|
|
|
|
bb2:
|
|
br bb3
|
|
|
|
bb3:
|
|
br bb4
|
|
|
|
bb4:
|
|
br bb5
|
|
|
|
bb5:
|
|
cond_br undef, bb5a, bb6
|
|
|
|
bb5a:
|
|
%f2 = function_ref @constructNonSendableKlassIndirect : $@convention(thin) () -> @out NonSendableKlass
|
|
apply %f2(%0) : $@convention(thin) () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
br bb4
|
|
|
|
bb6:
|
|
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %f(%0) : $@convention(thin) @async () -> @out NonSendableKlass
|
|
destroy_addr %0 : $*NonSendableKlass
|
|
br bb7
|
|
|
|
bb7:
|
|
dealloc_stack %0 : $*NonSendableKlass
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on lookthrough_test: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK-NEXT: Input Value: %7 = apply %6(%5) : $@convention(thin) (@sil_isolated @guaranteed MyActor) -> @owned NonSendableKlass
|
|
// CHECK-NEXT: Isolation: 'argument'-isolated
|
|
// CHECK-NEXT: end running test 1 of 1 on lookthrough_test: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @lookthrough_test : $@convention(thin) (@owned MyActor) -> @owned NonSendableKlass {
|
|
bb0(%0 : @owned $MyActor):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $MyActor, let, name "argument"
|
|
%1 = end_init_let_ref %0 : $MyActor
|
|
%1a = copy_value %1 : $MyActor
|
|
%1b = move_value %1a : $MyActor
|
|
%1c = begin_borrow %1b : $MyActor
|
|
%2 = function_ref @useActor : $@convention(thin) (@sil_isolated @guaranteed MyActor) -> @owned NonSendableKlass
|
|
%3 = apply %2(%1c) : $@convention(thin) (@sil_isolated @guaranteed MyActor) -> @owned NonSendableKlass
|
|
debug_value [trace] %3 : $NonSendableKlass
|
|
end_borrow %1c : $MyActor
|
|
destroy_value %1 : $MyActor
|
|
destroy_value %1b : $MyActor
|
|
return %3 : $NonSendableKlass
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on isolated_variable_test_1: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK-NEXT: Input Value: %2 = apply %1(%0) : $@convention(thin) (@sil_isolated @guaranteed Optional<MyActor>) -> @owned NonSendableKlass
|
|
// CHECK-NEXT: Isolation: disconnected
|
|
// CHECK-NEXT: end running test 1 of 1 on isolated_variable_test_1: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @isolated_variable_test_1 : $@convention(thin) @async () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
%0 = enum $Optional<MyActor>, #Optional.none
|
|
%1 = function_ref @useOptionalActor : $@convention(thin) (@sil_isolated @guaranteed Optional<MyActor>) -> @owned NonSendableKlass
|
|
%2 = apply %1(%0) : $@convention(thin) (@sil_isolated @guaranteed Optional<MyActor>) -> @owned NonSendableKlass
|
|
//debug_value [trace] %1 : $@convention(thin) (@sil_isolated @guaranteed Optional<MyActor>) -> @owned NonSendableKlass
|
|
debug_value [trace] %2 : $NonSendableKlass
|
|
destroy_value %2 : $NonSendableKlass
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
sil @$s5infer7MyActorC11doSomethingAA16NonSendableKlassCyYaF : $@convention(method) @async (@sil_isolated @guaranteed MyActor) -> @owned NonSendableKlass
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on isolated_variable_test_2:
|
|
// CHECK-NEXT: First Value: %3 = apply %2(%0) : $@convention(thin) (@sil_isolated @guaranteed Optional<MyActor>) -> @owned NonSendableKlass
|
|
// CHECK-NEXT: First Isolation: 'self'-isolated
|
|
// CHECK-NEXT: Second Value: %6 = apply %4(%5) : $@convention(method) @async (@sil_isolated @guaranteed MyActor) -> @owned NonSendableKlass
|
|
// CHECK-NEXT: Second Isolation: 'self'-isolated
|
|
// CHECK-NEXT: Merged Isolation: 'self'-isolated
|
|
// CHECK-NEXT: end running test 1 of 1 on isolated_variable_test_2: sil-isolation-info-merged-inference with: @trace[0], @trace[1]
|
|
sil [ossa] @isolated_variable_test_2 : $@convention(thin) @async (@guaranteed Optional<MyActor>) -> () {
|
|
bb0(%0 : @guaranteed $Optional<MyActor>):
|
|
debug_value %0 : $Optional<MyActor>, let, name "self"
|
|
specify_test "sil-isolation-info-merged-inference @trace[0] @trace[1]"
|
|
%1 = function_ref @useOptionalActor : $@convention(thin) (@sil_isolated @guaranteed Optional<MyActor>) -> @owned NonSendableKlass
|
|
%2 = apply %1(%0) : $@convention(thin) (@sil_isolated @guaranteed Optional<MyActor>) -> @owned NonSendableKlass
|
|
%3 = function_ref @$s5infer7MyActorC11doSomethingAA16NonSendableKlassCyYaF : $@convention(method) @async (@sil_isolated @guaranteed MyActor) -> @owned NonSendableKlass
|
|
%0a = unchecked_enum_data %0 : $Optional<MyActor>, #Optional.some!enumelt
|
|
%4 = apply %3(%0a) : $@convention(method) @async (@sil_isolated @guaranteed MyActor) -> @owned NonSendableKlass
|
|
debug_value [trace] %2 : $NonSendableKlass
|
|
debug_value [trace] %4 : $NonSendableKlass
|
|
destroy_value %2 : $NonSendableKlass
|
|
destroy_value %4 : $NonSendableKlass
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on isolated_variable_test_3:
|
|
// CHECK-NEXT: First Value: %4 = apply %2(%3) : $@convention(thin) (@sil_isolated @guaranteed Optional<MyActor>) -> @owned NonSendableKlass
|
|
// CHECK-NEXT: First Isolation: 'self'-isolated
|
|
// CHECK-NEXT: Second Value: %6 = apply %5(%0) : $@convention(method) @async (@sil_isolated @guaranteed MyActor) -> @owned NonSendableKlass
|
|
// CHECK-NEXT: Second Isolation: 'self'-isolated
|
|
// CHECK-NEXT: Merged Isolation: 'self'-isolated
|
|
// CHECK-NEXT: end running test 1 of 1 on isolated_variable_test_3: sil-isolation-info-merged-inference with: @trace[0], @trace[1]
|
|
sil [ossa] @isolated_variable_test_3 : $@convention(thin) @async (@guaranteed MyActor) -> () {
|
|
bb0(%0 : @guaranteed $MyActor):
|
|
debug_value %0 : $MyActor, let, name "self"
|
|
specify_test "sil-isolation-info-merged-inference @trace[0] @trace[1]"
|
|
%1 = function_ref @useOptionalActor : $@convention(thin) (@sil_isolated @guaranteed Optional<MyActor>) -> @owned NonSendableKlass
|
|
%0a = enum $Optional<MyActor>, #Optional.some!enumelt, %0 : $MyActor
|
|
%2 = apply %1(%0a) : $@convention(thin) (@sil_isolated @guaranteed Optional<MyActor>) -> @owned NonSendableKlass
|
|
%3 = function_ref @$s5infer7MyActorC11doSomethingAA16NonSendableKlassCyYaF : $@convention(method) @async (@sil_isolated @guaranteed MyActor) -> @owned NonSendableKlass
|
|
%4 = apply %3(%0) : $@convention(method) @async (@sil_isolated @guaranteed MyActor) -> @owned NonSendableKlass
|
|
debug_value [trace] %2 : $NonSendableKlass
|
|
debug_value [trace] %4 : $NonSendableKlass
|
|
destroy_value %2 : $NonSendableKlass
|
|
destroy_value %4 : $NonSendableKlass
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on isolated_variable_test_4:
|
|
// CHECK-NEXT: First Value: %8 = apply %2(%7) : $@convention(thin) (@sil_isolated @guaranteed Optional<MyActor>) -> @owned NonSendableKlass
|
|
// CHECK-NEXT: First Isolation: 'self'-isolated
|
|
// CHECK-NEXT: Second Value: %10 = apply %9(%0) : $@convention(method) @async (@sil_isolated @guaranteed MyActor) -> @owned NonSendableKlass
|
|
// CHECK-NEXT: Second Isolation: 'self'-isolated
|
|
// CHECK-NEXT: Merged Isolation: 'self'-isolated
|
|
// CHECK-NEXT: end running test 1 of 1 on isolated_variable_test_4: sil-isolation-info-merged-inference with: @trace[0], @trace[1]
|
|
sil [ossa] @isolated_variable_test_4 : $@convention(thin) @async (@guaranteed MyActor) -> () {
|
|
bb0(%0 : @guaranteed $MyActor):
|
|
debug_value %0 : $MyActor, let, name "self"
|
|
specify_test "sil-isolation-info-merged-inference @trace[0] @trace[1]"
|
|
%1 = function_ref @useOptionalActor : $@convention(thin) (@sil_isolated @guaranteed Optional<MyActor>) -> @owned NonSendableKlass
|
|
%0a = init_existential_ref %0 : $MyActor : $MyActor, $AnyObject
|
|
%0b = unconditional_checked_cast %0a : $AnyObject to MyActor
|
|
%0c = unchecked_ref_cast %0b : $MyActor to $AnyObject
|
|
%0d = unchecked_ref_cast %0c : $AnyObject to $MyActor
|
|
%0e = enum $Optional<MyActor>, #Optional.some!enumelt, %0d : $MyActor
|
|
%2 = apply %1(%0e) : $@convention(thin) (@sil_isolated @guaranteed Optional<MyActor>) -> @owned NonSendableKlass
|
|
%3 = function_ref @$s5infer7MyActorC11doSomethingAA16NonSendableKlassCyYaF : $@convention(method) @async (@sil_isolated @guaranteed MyActor) -> @owned NonSendableKlass
|
|
%4 = apply %3(%0) : $@convention(method) @async (@sil_isolated @guaranteed MyActor) -> @owned NonSendableKlass
|
|
debug_value [trace] %2 : $NonSendableKlass
|
|
debug_value [trace] %4 : $NonSendableKlass
|
|
destroy_value %2 : $NonSendableKlass
|
|
destroy_value %4 : $NonSendableKlass
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on sending_indirect_result_isnt_actor_isolated: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK-NEXT: Input Value: %0 = argument of bb0 : $*Optional<τ_0_0> // user: %2
|
|
// CHECK-NEXT: Isolation: disconnected
|
|
// CHECK-NEXT: end running test 1 of 1 on sending_indirect_result_isnt_actor_isolated: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @sending_indirect_result_isnt_actor_isolated : $@convention(thin) @async <τ_0_0> (@sil_isolated @guaranteed MyActor) -> (@sil_sending @out Optional<τ_0_0>) {
|
|
bb0(%0 : $*Optional<τ_0_0>, %1 : @guaranteed $MyActor):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value [trace] %0 : $*Optional<τ_0_0>
|
|
inject_enum_addr %0 : $*Optional<τ_0_0>, #Optional.none!enumelt
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
sil @myactor_sending_result_sync : $@convention(method) <τ_0_0> (@sil_isolated @guaranteed MyActor) -> @sil_sending @out τ_0_0
|
|
|
|
// CHECK: begin running test 1 of 1 on sending_indirect_result_isnt_actor_isolated_apply: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK-NEXT: Input Value: %3 = alloc_stack $T // users: %6, %5, %4
|
|
// CHECK-NEXT: Isolation: disconnected
|
|
// CHECK-NEXT: end running test 1 of 1 on sending_indirect_result_isnt_actor_isolated_apply: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @sending_indirect_result_isnt_actor_isolated_apply : $@convention(method) @async <T> (@sil_isolated @guaranteed MyActor) -> @sil_sending @out T {
|
|
bb0(%0 : $*T, %1 : @guaranteed $MyActor):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
%4 = function_ref @myactor_sending_result_sync : $@convention(method) <τ_0_0> (@sil_isolated @guaranteed MyActor) -> @sil_sending @out τ_0_0
|
|
%2 = alloc_stack $T
|
|
debug_value [trace] %2 : $*T
|
|
%5 = apply %4<T>(%2, %1) : $@convention(method) <τ_0_0> (@sil_isolated @guaranteed MyActor) -> @sil_sending @out τ_0_0
|
|
copy_addr [take] %2 to [init] %0 : $*T
|
|
dealloc_stack %2 : $*T
|
|
%6 = tuple ()
|
|
return %6 : $()
|
|
}
|
|
|
|
sil @myactor_sending_result_sync_throws : $@convention(method) <τ_0_0> (@sil_isolated @guaranteed MyActor) -> (@sil_sending @out τ_0_0, @error any Error)
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on sending_indirect_result_isnt_actor_isolated_try_apply: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK-NEXT: Input Value: %3 = alloc_stack $T
|
|
// CHECK-NEXT: Isolation: disconnected
|
|
// CHECK-NEXT: end running test 1 of 1 on sending_indirect_result_isnt_actor_isolated_try_apply: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @sending_indirect_result_isnt_actor_isolated_try_apply : $@convention(method) @async <T> (@sil_isolated @guaranteed MyActor) -> (@sil_sending @out T, @error any Error) {
|
|
bb0(%0 : $*T, %1 : @guaranteed $MyActor):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
%5 = function_ref @myactor_sending_result_sync_throws : $@convention(method) <τ_0_0> (@sil_isolated @guaranteed MyActor) -> (@sil_sending @out τ_0_0, @error any Error)
|
|
%2 = alloc_stack $*T
|
|
try_apply %5<T>(%2, %1) : $@convention(method) <τ_0_0> (@sil_isolated @guaranteed MyActor) -> (@sil_sending @out τ_0_0, @error any Error), normal bb1, error bb2
|
|
|
|
bb1(%7 : $()):
|
|
copy_addr [take] %2 to [init] %0 : $*T
|
|
debug_value [trace] %2 : $*T
|
|
dealloc_stack %2 : $*T
|
|
%8 = tuple ()
|
|
return %8 : $()
|
|
|
|
bb2(%10 : @owned $any Error):
|
|
dealloc_stack %2 : $*T
|
|
throw %10 : $any Error
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on optional_test: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK-NEXT: Input Value: %5 = ref_element_addr %4 : $MyActor, #MyActor.ns
|
|
// CHECK-NEXT: Isolation: 'argument'-isolated
|
|
// CHECK-NEXT: end running test 1 of 1 on optional_test: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @optional_test : $@convention(thin) (@sil_isolated @guaranteed Optional<MyActor>) -> () {
|
|
bb0(%0 : @guaranteed $Optional<MyActor>):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $Optional<MyActor>, let, name "argument"
|
|
%1a = copy_value %0 : $Optional<MyActor>
|
|
%1b = begin_borrow %1a
|
|
%1c = unchecked_enum_data %1b : $Optional<MyActor>, #Optional.some!enumelt
|
|
%1d = ref_element_addr %1c : $MyActor, #MyActor.ns
|
|
debug_value [trace] %1d
|
|
end_borrow %1b
|
|
destroy_value %1a
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
//////////////////////////////////////////////
|
|
// MARK: Global Actor On Static Field Tests //
|
|
//////////////////////////////////////////////
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_field_actor: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = ref_element_addr %0 : $MyActor, #MyActor.ns
|
|
// CHECK: Isolation: 'self'-isolated
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_field_actor: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_field_actor : $@convention(thin) (@guaranteed MyActor) -> () {
|
|
bb0(%0 : @guaranteed $MyActor):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $MyActor, let, name "self"
|
|
%1 = ref_element_addr %0 : $MyActor, #MyActor.ns
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_field_actor_globalactor: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = ref_element_addr %0 : $MyActor, #MyActor.globalActorNS
|
|
// CHECK: Isolation: main actor-isolated
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_field_actor_globalactor: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_field_actor_globalactor : $@convention(thin) (@guaranteed MyActor) -> () {
|
|
bb0(%0 : @guaranteed $MyActor):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $MyActor, let, name "self"
|
|
%1 = ref_element_addr %0 : $MyActor, #MyActor.globalActorNS
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_field_actor_nonisolated_unsafe: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = ref_element_addr %0 : $MyActor, #MyActor.nsNonisolatedUnsafe
|
|
// CHECK: Isolation: 'self'-isolated: nonisolated(unsafe)
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_field_actor_nonisolated_unsafe: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_field_actor_nonisolated_unsafe : $@convention(thin) (@guaranteed MyActor) -> () {
|
|
bb0(%0 : @guaranteed $MyActor):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $MyActor, let, name "self"
|
|
%1 = ref_element_addr %0 : $MyActor, #MyActor.nsNonisolatedUnsafe
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_field_globalactorklass: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = ref_element_addr %0 : $MainActorIsolatedKlass, #MainActorIsolatedKlass.ns
|
|
// CHECK: Isolation: main actor-isolated
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_field_globalactorklass: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_field_globalactorklass : $@convention(thin) (@guaranteed MainActorIsolatedKlass) -> () {
|
|
bb0(%0 : @guaranteed $MainActorIsolatedKlass):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $MainActorIsolatedKlass, let, name "self"
|
|
%1 = ref_element_addr %0 : $MainActorIsolatedKlass, #MainActorIsolatedKlass.ns
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_field_globalactorklass_globalactor: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = ref_element_addr %0 : $MainActorIsolatedKlass, #MainActorIsolatedKlass.globalActorNS
|
|
// CHECK: Isolation: global actor 'CustomActor'-isolated
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_field_globalactorklass_globalactor: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_field_globalactorklass_globalactor : $@convention(thin) (@guaranteed MainActorIsolatedKlass) -> () {
|
|
bb0(%0 : @guaranteed $MainActorIsolatedKlass):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $MainActorIsolatedKlass, let, name "self"
|
|
%1 = ref_element_addr %0 : $MainActorIsolatedKlass, #MainActorIsolatedKlass.globalActorNS
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_field_globalactorklass_nonisolated_unsafe: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = ref_element_addr %0 : $MainActorIsolatedKlass, #MainActorIsolatedKlass.nsNonisolatedUnsafe
|
|
// CHECK: Isolation: main actor-isolated: nonisolated(unsafe)
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_field_globalactorklass_nonisolated_unsafe: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_field_globalactorklass_nonisolated_unsafe : $@convention(thin) (@guaranteed MainActorIsolatedKlass) -> () {
|
|
bb0(%0 : @guaranteed $MainActorIsolatedKlass):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $MainActorIsolatedKlass, let, name "self"
|
|
%1 = ref_element_addr %0 : $MainActorIsolatedKlass, #MainActorIsolatedKlass.nsNonisolatedUnsafe
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_field_nonisolatedklass: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = ref_element_addr %0 : $NonisolatedKlass, #NonisolatedKlass.ns
|
|
// CHECK: Isolation: disconnected
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_field_nonisolatedklass: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_field_nonisolatedklass : $@convention(thin) (@guaranteed NonisolatedKlass) -> () {
|
|
bb0(%0 : @guaranteed $NonisolatedKlass):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $NonisolatedKlass, let, name "self"
|
|
%1 = ref_element_addr %0 : $NonisolatedKlass, #NonisolatedKlass.ns
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_field_nonisolatedklass_globalactor: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = ref_element_addr %0 : $NonisolatedKlass, #NonisolatedKlass.globalActorNS
|
|
// CHECK: Isolation: global actor 'CustomActor'-isolated
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_field_nonisolatedklass_globalactor: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_field_nonisolatedklass_globalactor : $@convention(thin) (@guaranteed NonisolatedKlass) -> () {
|
|
bb0(%0 : @guaranteed $NonisolatedKlass):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $NonisolatedKlass, let, name "self"
|
|
%1 = ref_element_addr %0 : $NonisolatedKlass, #NonisolatedKlass.globalActorNS
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_field_nonisolatedklass_nonisolated_unsafe: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = ref_element_addr %0 : $NonisolatedKlass, #NonisolatedKlass.nsNonisolatedUnsafe
|
|
// CHECK: Isolation: disconnected: nonisolated(unsafe)
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_field_nonisolatedklass_nonisolated_unsafe: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_field_nonisolatedklass_nonisolated_unsafe : $@convention(thin) (@guaranteed NonisolatedKlass) -> () {
|
|
bb0(%0 : @guaranteed $NonisolatedKlass):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $NonisolatedKlass, let, name "self"
|
|
%1 = ref_element_addr %0 : $NonisolatedKlass, #NonisolatedKlass.nsNonisolatedUnsafe
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_field_globalactorstruct: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = struct_extract %0 : $MainActorIsolatedStruct, #MainActorIsolatedStruct.ns
|
|
// CHECK: Isolation: main actor-isolated
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_field_globalactorstruct: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_field_globalactorstruct : $@convention(thin) (@guaranteed MainActorIsolatedStruct) -> () {
|
|
bb0(%0 : @guaranteed $MainActorIsolatedStruct):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $MainActorIsolatedStruct, let, name "self"
|
|
%1 = struct_extract %0 : $MainActorIsolatedStruct, #MainActorIsolatedStruct.ns
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_field_globalactorstruct_globalactor: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = struct_extract %0 : $MainActorIsolatedStruct, #MainActorIsolatedStruct.globalActorNS
|
|
// CHECK: Isolation: global actor 'CustomActor'-isolated
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_field_globalactorstruct_globalactor: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_field_globalactorstruct_globalactor : $@convention(thin) (@guaranteed MainActorIsolatedStruct) -> () {
|
|
bb0(%0 : @guaranteed $MainActorIsolatedStruct):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $MainActorIsolatedStruct, let, name "self"
|
|
%1 = struct_extract %0 : $MainActorIsolatedStruct, #MainActorIsolatedStruct.globalActorNS
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_field_globalactorstruct_nonisolated_unsafe: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = struct_extract %0 : $MainActorIsolatedStruct, #MainActorIsolatedStruct.nsNonisolatedUnsafe
|
|
// CHECK: Isolation: main actor-isolated: nonisolated(unsafe)
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_field_globalactorstruct_nonisolated_unsafe: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_field_globalactorstruct_nonisolated_unsafe : $@convention(thin) (@guaranteed MainActorIsolatedStruct) -> () {
|
|
bb0(%0 : @guaranteed $MainActorIsolatedStruct):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $MainActorIsolatedStruct, let, name "self"
|
|
%1 = struct_extract %0 : $MainActorIsolatedStruct, #MainActorIsolatedStruct.nsNonisolatedUnsafe
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_field_globalactorstruct_addr: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = struct_element_addr %0 : $*MainActorIsolatedStruct, #MainActorIsolatedStruct.ns
|
|
// CHECK: Isolation: main actor-isolated
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_field_globalactorstruct_addr: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_field_globalactorstruct_addr : $@convention(thin) (@in_guaranteed MainActorIsolatedStruct) -> () {
|
|
bb0(%0 : $*MainActorIsolatedStruct):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $*MainActorIsolatedStruct, let, name "self"
|
|
%1 = struct_element_addr %0 : $*MainActorIsolatedStruct, #MainActorIsolatedStruct.ns
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_field_globalactorstruct_addr_globalactor: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = struct_element_addr %0 : $*MainActorIsolatedStruct, #MainActorIsolatedStruct.globalActorNS
|
|
// CHECK: Isolation: global actor 'CustomActor'-isolated
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_field_globalactorstruct_addr_globalactor: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_field_globalactorstruct_addr_globalactor : $@convention(thin) (@in_guaranteed MainActorIsolatedStruct) -> () {
|
|
bb0(%0 : $*MainActorIsolatedStruct):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $*MainActorIsolatedStruct, let, name "self"
|
|
%1 = struct_element_addr %0 : $*MainActorIsolatedStruct, #MainActorIsolatedStruct.globalActorNS
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_field_globalactorstruct_addr_nonisolated_unsafe: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = struct_element_addr %0 : $*MainActorIsolatedStruct, #MainActorIsolatedStruct.nsNonisolatedUnsafe
|
|
// CHECK: Isolation: main actor-isolated: nonisolated(unsafe)
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_field_globalactorstruct_addr_nonisolated_unsafe: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_field_globalactorstruct_addr_nonisolated_unsafe : $@convention(thin) (@in_guaranteed MainActorIsolatedStruct) -> () {
|
|
bb0(%0 : $*MainActorIsolatedStruct):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $*MainActorIsolatedStruct, let, name "self"
|
|
%1 = struct_element_addr %0 : $*MainActorIsolatedStruct, #MainActorIsolatedStruct.nsNonisolatedUnsafe
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_field_nonisolatedstruct: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = struct_extract %0 : $NonisolatedStruct, #NonisolatedStruct.ns
|
|
// CHECK: Isolation: disconnected
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_field_nonisolatedstruct: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_field_nonisolatedstruct : $@convention(thin) (@guaranteed NonisolatedStruct) -> () {
|
|
bb0(%0 : @guaranteed $NonisolatedStruct):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $NonisolatedStruct, let, name "self"
|
|
%1 = struct_extract %0 : $NonisolatedStruct, #NonisolatedStruct.ns
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_field_nonisolatedstruct_globalactor: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = struct_extract %0 : $NonisolatedStruct, #NonisolatedStruct.globalActorNS
|
|
// CHECK: Isolation: global actor 'CustomActor'-isolated
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_field_nonisolatedstruct_globalactor: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_field_nonisolatedstruct_globalactor : $@convention(thin) (@guaranteed NonisolatedStruct) -> () {
|
|
bb0(%0 : @guaranteed $NonisolatedStruct):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $NonisolatedStruct, let, name "self"
|
|
%1 = struct_extract %0 : $NonisolatedStruct, #NonisolatedStruct.globalActorNS
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_field_nonisolatedstruct_nonisolated_unsafe: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = struct_extract %0 : $NonisolatedStruct, #NonisolatedStruct.nsNonisolatedUnsafe
|
|
// CHECK: Isolation: disconnected: nonisolated(unsafe)
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_field_nonisolatedstruct_nonisolated_unsafe: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_field_nonisolatedstruct_nonisolated_unsafe : $@convention(thin) (@guaranteed NonisolatedStruct) -> () {
|
|
bb0(%0 : @guaranteed $NonisolatedStruct):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $NonisolatedStruct, let, name "self"
|
|
%1 = struct_extract %0 : $NonisolatedStruct, #NonisolatedStruct.nsNonisolatedUnsafe
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_field_nonisolatedstruct_addr: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = struct_element_addr %0 : $*NonisolatedStruct, #NonisolatedStruct.ns
|
|
// CHECK: Isolation: disconnected
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_field_nonisolatedstruct_addr: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_field_nonisolatedstruct_addr : $@convention(thin) (@in_guaranteed NonisolatedStruct) -> () {
|
|
bb0(%0 : $*NonisolatedStruct):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $*NonisolatedStruct, let, name "self"
|
|
%1 = struct_element_addr %0 : $*NonisolatedStruct, #NonisolatedStruct.ns
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_field_nonisolatedstruct_addr_globalactor: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = struct_element_addr %0 : $*NonisolatedStruct, #NonisolatedStruct.globalActorNS
|
|
// CHECK: Isolation: global actor 'CustomActor'-isolated
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_field_nonisolatedstruct_addr_globalactor: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_field_nonisolatedstruct_addr_globalactor : $@convention(thin) (@in_guaranteed NonisolatedStruct) -> () {
|
|
bb0(%0 : $*NonisolatedStruct):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $*NonisolatedStruct, let, name "self"
|
|
%1 = struct_element_addr %0 : $*NonisolatedStruct, #NonisolatedStruct.globalActorNS
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_field_nonisolatedstruct_addr_nonisolated_unsafe: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = struct_element_addr %0 : $*NonisolatedStruct, #NonisolatedStruct.nsNonisolatedUnsafe
|
|
// CHECK: Isolation: disconnected: nonisolated(unsafe)
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_field_nonisolatedstruct_addr_nonisolated_unsafe: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_field_nonisolatedstruct_addr_nonisolated_unsafe : $@convention(thin) (@in_guaranteed NonisolatedStruct) -> () {
|
|
bb0(%0 : $*NonisolatedStruct):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $*NonisolatedStruct, let, name "self"
|
|
%1 = struct_element_addr %0 : $*NonisolatedStruct, #NonisolatedStruct.nsNonisolatedUnsafe
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
///////////////////////////////
|
|
// MARK: Computed Properties //
|
|
///////////////////////////////
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_computedproperty_actor: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = class_method %0 : $MyActor, #MyActor.nsComputed!getter : (isolated MyActor) -> () -> NonSendableKlass, $@convention(method) (@sil_isolated @guaranteed MyActor) -> @owned NonSendableKlass
|
|
// CHECK: Isolation: 'self'-isolated
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_computedproperty_actor: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_computedproperty_actor : $@convention(thin) (@guaranteed @sil_isolated MyActor) -> () {
|
|
bb0(%0 : @guaranteed $MyActor):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $MyActor, let, name "self"
|
|
%1 = class_method %0 : $MyActor, #MyActor.nsComputed!getter : (isolated MyActor) -> () -> NonSendableKlass, $@convention(method) (@sil_isolated @guaranteed MyActor) -> @owned NonSendableKlass
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_computedproperty_actor_globalactor: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = class_method %0 : $MyActor, #MyActor.globalActorNSComputed!getter : (MyActor) -> () -> NonSendableKlass, $@convention(method) (@guaranteed MyActor) -> @owned NonSendableKlass
|
|
// CHECK: Isolation: main actor-isolated
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_computedproperty_actor_globalactor: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_computedproperty_actor_globalactor : $@convention(thin) (@guaranteed MyActor) -> () {
|
|
bb0(%0 : @guaranteed $MyActor):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $MyActor, let, name "self"
|
|
%1 = class_method %0, #MyActor.globalActorNSComputed!getter : (MyActor) -> () -> NonSendableKlass, $@convention(method) (@guaranteed MyActor) -> @owned NonSendableKlass
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_computedproperty_actor_nonisolated: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = class_method %0 : $MyActor, #MyActor.nsNonisolatedComputed!getter : (MyActor) -> () -> NonSendableKlass, $@convention(method) (@guaranteed MyActor) -> @owned NonSendableKlass
|
|
// CHECK: Isolation: disconnected
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_computedproperty_actor_nonisolated: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_computedproperty_actor_nonisolated : $@convention(thin) (@sil_isolated @guaranteed MyActor) -> () {
|
|
bb0(%0 : @guaranteed $MyActor):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $MyActor, let, name "self"
|
|
%1 = class_method %0 : $MyActor, #MyActor.nsNonisolatedComputed!getter : (MyActor) -> () -> NonSendableKlass, $@convention(method) (@guaranteed MyActor) -> @owned NonSendableKlass
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_computedproperty_globalactorklass: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = class_method %0 : $MainActorIsolatedKlass, #MainActorIsolatedKlass.nsComputed!getter : (MainActorIsolatedKlass) -> () -> NonSendableKlass, $@convention(method) (@guaranteed MainActorIsolatedKlass) -> @owned NonSendableKlass
|
|
// CHECK: Isolation: main actor-isolated
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_computedproperty_globalactorklass: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_computedproperty_globalactorklass : $@convention(thin) (@guaranteed MainActorIsolatedKlass) -> () {
|
|
bb0(%0 : @guaranteed $MainActorIsolatedKlass):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $MainActorIsolatedKlass, let, name "self"
|
|
%1 = class_method %0 : $MainActorIsolatedKlass, #MainActorIsolatedKlass.nsComputed!getter : (MainActorIsolatedKlass) -> () -> NonSendableKlass, $@convention(method) (@guaranteed MainActorIsolatedKlass) -> @owned NonSendableKlass
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_computedproperty_globalactorklass_globalactor: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = class_method %0 : $MainActorIsolatedKlass, #MainActorIsolatedKlass.globalActorNSComputed!getter : (MainActorIsolatedKlass) -> () -> NonSendableKlass, $@convention(method) (@guaranteed MainActorIsolatedKlass) -> @owned NonSendableKlass
|
|
// CHECK: Isolation: global actor 'CustomActor'-isolated
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_computedproperty_globalactorklass_globalactor: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_computedproperty_globalactorklass_globalactor : $@convention(thin) (@guaranteed MainActorIsolatedKlass) -> () {
|
|
bb0(%0 : @guaranteed $MainActorIsolatedKlass):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $MainActorIsolatedKlass, let, name "self"
|
|
%1 = class_method %0, #MainActorIsolatedKlass.globalActorNSComputed!getter : (MainActorIsolatedKlass) -> () -> NonSendableKlass, $@convention(method) (@guaranteed MainActorIsolatedKlass) -> @owned NonSendableKlass
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_computedproperty_globalactorklass_nonisolated: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = class_method %0 : $MainActorIsolatedKlass, #MainActorIsolatedKlass.nsNonisolatedComputed!getter : (MainActorIsolatedKlass) -> () -> NonSendableKlass, $@convention(method) (@guaranteed MainActorIsolatedKlass) -> @owned NonSendableKlass
|
|
// CHECK: Isolation: disconnected
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_computedproperty_globalactorklass_nonisolated: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_computedproperty_globalactorklass_nonisolated : $@convention(thin) (@guaranteed MainActorIsolatedKlass) -> () {
|
|
bb0(%0 : @guaranteed $MainActorIsolatedKlass):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $MainActorIsolatedKlass, let, name "self"
|
|
%1 = class_method %0 : $MainActorIsolatedKlass, #MainActorIsolatedKlass.nsNonisolatedComputed!getter : (MainActorIsolatedKlass) -> () -> NonSendableKlass, $@convention(method) (@guaranteed MainActorIsolatedKlass) -> @owned NonSendableKlass
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_computedproperty_nonisolatedklass: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = class_method %0 : $NonisolatedKlass, #NonisolatedKlass.nsComputed!getter : (NonisolatedKlass) -> () -> NonSendableKlass, $@convention(method) (@guaranteed NonisolatedKlass) -> @owned NonSendableKlass
|
|
// CHECK: Isolation: disconnected
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_computedproperty_nonisolatedklass: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_computedproperty_nonisolatedklass : $@convention(thin) (@guaranteed NonisolatedKlass) -> () {
|
|
bb0(%0 : @guaranteed $NonisolatedKlass):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $NonisolatedKlass, let, name "self"
|
|
%1 = class_method %0 : $NonisolatedKlass, #NonisolatedKlass.nsComputed!getter : (NonisolatedKlass) -> () -> NonSendableKlass, $@convention(method) (@guaranteed NonisolatedKlass) -> @owned NonSendableKlass
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_computedproperty_nonisolatedklass_globalactor: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = class_method %0 : $NonisolatedKlass, #NonisolatedKlass.globalActorNSComputed!getter : (NonisolatedKlass) -> () -> NonSendableKlass, $@convention(method) (@guaranteed NonisolatedKlass) -> @owned NonSendableKlass
|
|
// CHECK: Isolation: global actor 'CustomActor'-isolated
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_computedproperty_nonisolatedklass_globalactor: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_computedproperty_nonisolatedklass_globalactor : $@convention(thin) (@guaranteed NonisolatedKlass) -> () {
|
|
bb0(%0 : @guaranteed $NonisolatedKlass):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $NonisolatedKlass, let, name "self"
|
|
%1 = class_method %0, #NonisolatedKlass.globalActorNSComputed!getter : (NonisolatedKlass) -> () -> NonSendableKlass, $@convention(method) (@guaranteed NonisolatedKlass) -> @owned NonSendableKlass
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_computedproperty_nonisolatedklass_nonisolated: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = class_method %0 : $NonisolatedKlass, #NonisolatedKlass.nsNonisolatedComputed!getter : (NonisolatedKlass) -> () -> NonSendableKlass, $@convention(method) (@guaranteed NonisolatedKlass) -> @owned NonSendableKlass
|
|
// CHECK: Isolation: disconnected
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_computedproperty_nonisolatedklass_nonisolated: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_computedproperty_nonisolatedklass_nonisolated : $@convention(thin) (@guaranteed NonisolatedKlass) -> () {
|
|
bb0(%0 : @guaranteed $NonisolatedKlass):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $NonisolatedKlass, let, name "self"
|
|
%1 = class_method %0 : $NonisolatedKlass, #NonisolatedKlass.nsNonisolatedComputed!getter : (NonisolatedKlass) -> () -> NonSendableKlass, $@convention(method) (@guaranteed NonisolatedKlass) -> @owned NonSendableKlass
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
//////////////////////////////////
|
|
// MARK: class method functions //
|
|
//////////////////////////////////
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_method_actor: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = class_method %0 : $MyActor, #MyActor.getNS : (isolated MyActor) -> () -> NonSendableKlass, $@convention(method) (@sil_isolated @guaranteed MyActor) -> @owned NonSendableKlass
|
|
// CHECK: Isolation: 'self'-isolated
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_method_actor: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_method_actor : $@convention(thin) (@guaranteed @sil_isolated MyActor) -> () {
|
|
bb0(%0 : @guaranteed $MyActor):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $MyActor, let, name "self"
|
|
%1 = class_method %0 : $MyActor, #MyActor.getNS : (isolated MyActor) -> () -> NonSendableKlass, $@convention(method) (@sil_isolated @guaranteed MyActor) -> @owned NonSendableKlass
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_method_actor_globalactor: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = class_method %0 : $MyActor, #MyActor.getNSGlobalActor : (MyActor) -> () -> NonSendableKlass, $@convention(method) (@guaranteed MyActor) -> @owned NonSendableKlass
|
|
// CHECK: Isolation: main actor-isolated
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_method_actor_globalactor: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_method_actor_globalactor : $@convention(thin) (@guaranteed MyActor) -> () {
|
|
bb0(%0 : @guaranteed $MyActor):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $MyActor, let, name "self"
|
|
%1 = class_method %0, #MyActor.getNSGlobalActor : (MyActor) -> () -> NonSendableKlass, $@convention(method) (@guaranteed MyActor) -> @owned NonSendableKlass
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_method_actor_nonisolated: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = class_method %0 : $MyActor, #MyActor.getNSNonisolated : (MyActor) -> () -> NonSendableKlass, $@convention(method) (@guaranteed MyActor) -> @owned NonSendableKlass
|
|
// CHECK: Isolation: disconnected
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_method_actor_nonisolated: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_method_actor_nonisolated : $@convention(thin) (@sil_isolated @guaranteed MyActor) -> () {
|
|
bb0(%0 : @guaranteed $MyActor):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $MyActor, let, name "self"
|
|
%1 = class_method %0 : $MyActor, #MyActor.getNSNonisolated : (MyActor) -> () -> NonSendableKlass, $@convention(method) (@guaranteed MyActor) -> @owned NonSendableKlass
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_method_globalactorklass: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = class_method %0 : $MainActorIsolatedKlass, #MainActorIsolatedKlass.getNS : (MainActorIsolatedKlass) -> () -> NonSendableKlass, $@convention(method) (@guaranteed MainActorIsolatedKlass) -> @owned NonSendableKlass
|
|
// CHECK: Isolation: main actor-isolated
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_method_globalactorklass: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_method_globalactorklass : $@convention(thin) (@guaranteed MainActorIsolatedKlass) -> () {
|
|
bb0(%0 : @guaranteed $MainActorIsolatedKlass):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $MainActorIsolatedKlass, let, name "self"
|
|
%1 = class_method %0 : $MainActorIsolatedKlass, #MainActorIsolatedKlass.getNS : (MainActorIsolatedKlass) -> () -> NonSendableKlass, $@convention(method) (@guaranteed MainActorIsolatedKlass) -> @owned NonSendableKlass
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_method_globalactorklass_globalactor: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = class_method %0 : $MainActorIsolatedKlass, #MainActorIsolatedKlass.getNSGlobalActor : (MainActorIsolatedKlass) -> () -> NonSendableKlass, $@convention(method) (@guaranteed MainActorIsolatedKlass) -> @owned NonSendableKlass
|
|
// CHECK: Isolation: global actor 'CustomActor'-isolated
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_method_globalactorklass_globalactor: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_method_globalactorklass_globalactor : $@convention(thin) (@guaranteed MainActorIsolatedKlass) -> () {
|
|
bb0(%0 : @guaranteed $MainActorIsolatedKlass):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $MainActorIsolatedKlass, let, name "self"
|
|
%1 = class_method %0, #MainActorIsolatedKlass.getNSGlobalActor : (MainActorIsolatedKlass) -> () -> NonSendableKlass, $@convention(method) (@guaranteed MainActorIsolatedKlass) -> @owned NonSendableKlass
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_method_globalactorklass_nonisolated: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = class_method %0 : $MainActorIsolatedKlass, #MainActorIsolatedKlass.getNSNonisolated : (MainActorIsolatedKlass) -> () -> NonSendableKlass, $@convention(method) (@guaranteed MainActorIsolatedKlass) -> @owned NonSendableKlass
|
|
// CHECK: Isolation: disconnected
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_method_globalactorklass_nonisolated: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_method_globalactorklass_nonisolated : $@convention(thin) (@guaranteed MainActorIsolatedKlass) -> () {
|
|
bb0(%0 : @guaranteed $MainActorIsolatedKlass):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $MainActorIsolatedKlass, let, name "self"
|
|
%1 = class_method %0 : $MainActorIsolatedKlass, #MainActorIsolatedKlass.getNSNonisolated : (MainActorIsolatedKlass) -> () -> NonSendableKlass, $@convention(method) (@guaranteed MainActorIsolatedKlass) -> @owned NonSendableKlass
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_method_nonisolatedklass: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = class_method %0 : $NonisolatedKlass, #NonisolatedKlass.getNS : (NonisolatedKlass) -> () -> NonSendableKlass, $@convention(method) (@guaranteed NonisolatedKlass) -> @owned NonSendableKlass
|
|
// CHECK: Isolation: disconnected
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_method_nonisolatedklass: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_method_nonisolatedklass : $@convention(thin) (@guaranteed NonisolatedKlass) -> () {
|
|
bb0(%0 : @guaranteed $NonisolatedKlass):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $NonisolatedKlass, let, name "self"
|
|
%1 = class_method %0 : $NonisolatedKlass, #NonisolatedKlass.getNS : (NonisolatedKlass) -> () -> NonSendableKlass, $@convention(method) (@guaranteed NonisolatedKlass) -> @owned NonSendableKlass
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_method_nonisolatedklass_globalactor: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = class_method %0 : $NonisolatedKlass, #NonisolatedKlass.getNSGlobalActor : (NonisolatedKlass) -> () -> NonSendableKlass, $@convention(method) (@guaranteed NonisolatedKlass) -> @owned NonSendableKlass
|
|
// CHECK: Isolation: global actor 'CustomActor'-isolated
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_method_nonisolatedklass_globalactor: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_method_nonisolatedklass_globalactor : $@convention(thin) (@guaranteed NonisolatedKlass) -> () {
|
|
bb0(%0 : @guaranteed $NonisolatedKlass):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $NonisolatedKlass, let, name "self"
|
|
%1 = class_method %0, #NonisolatedKlass.getNSGlobalActor : (NonisolatedKlass) -> () -> NonSendableKlass, $@convention(method) (@guaranteed NonisolatedKlass) -> @owned NonSendableKlass
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_method_nonisolatedklass_nonisolated: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %2 = class_method %0 : $NonisolatedKlass, #NonisolatedKlass.getNSNonisolated : (NonisolatedKlass) -> () -> NonSendableKlass, $@convention(method) (@guaranteed NonisolatedKlass) -> @owned NonSendableKlass
|
|
// CHECK: Isolation: disconnected
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_method_nonisolatedklass_nonisolated: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_method_nonisolatedklass_nonisolated : $@convention(thin) (@guaranteed NonisolatedKlass) -> () {
|
|
bb0(%0 : @guaranteed $NonisolatedKlass):
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
debug_value %0 : $NonisolatedKlass, let, name "self"
|
|
%1 = class_method %0 : $NonisolatedKlass, #NonisolatedKlass.getNSNonisolated : (NonisolatedKlass) -> () -> NonSendableKlass, $@convention(method) (@guaranteed NonisolatedKlass) -> @owned NonSendableKlass
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
//////////////////////////////
|
|
// MARK: metatype allocator //
|
|
//////////////////////////////
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_metatype_actor: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %1 = class_method %0 : $@thick MyActor.Type, #MyActor.init!allocator : (MyActor.Type) -> () -> MyActor, $@convention(method) (@thick MyActor.Type) -> @owned MyActor
|
|
// CHECK: Isolation: disconnected
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_metatype_actor: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_metatype_actor : $@convention(thin) () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
%0 = metatype $@thick MyActor.Type
|
|
%1 = class_method %0, #MyActor.init!allocator : (MyActor.Type) -> () -> MyActor, $@convention(method) (@thick MyActor.Type) -> @owned MyActor
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_metatype_actor_global: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %1 = class_method %0 : $@thick MyActor.Type, #MyActor.init!allocator : (MyActor.Type) -> (NonSendableKlass) -> MyActor, $@convention(method) (@owned NonSendableKlass, @thick MyActor.Type) -> @owned MyActor
|
|
// CHECK: Isolation: main actor-isolated
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_metatype_actor_global: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_metatype_actor_global : $@convention(thin) () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
%0 = metatype $@thick MyActor.Type
|
|
%1 = class_method %0, #MyActor.init!allocator : (MyActor.Type) -> (NonSendableKlass) -> MyActor, $@convention(method) (@owned NonSendableKlass, @thick MyActor.Type) -> @owned MyActor
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on test_globalactor_inference_on_nominal_metatype_actor_global_2: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %1 = class_method %0 : $@thick MyActor.Type, #MyActor.init!allocator : (MyActor.Type) -> () async -> MyActor, $@convention(method) @async (@thick MyActor.Type) -> @owned MyActor
|
|
// CHECK: Isolation: 'self'-isolated (actor-async-allocating-init)
|
|
// CHECK: end running test 1 of 1 on test_globalactor_inference_on_nominal_metatype_actor_global_2: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @test_globalactor_inference_on_nominal_metatype_actor_global_2 : $@convention(thin) () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
%0 = metatype $@thick MyActor.Type
|
|
%1 = class_method %0, #MyActor.init!allocator : (MyActor.Type) -> () async -> MyActor, $@convention(method) @async (@thick MyActor.Type) -> @owned MyActor
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
//////////////////////////////////////
|
|
// MARK: dynamic 'class' properties //
|
|
//////////////////////////////////////
|
|
//
|
|
// DISCUSSION: This is for methods on a class called a 'class method', that is
|
|
// methods that are dynamic methods on the metatype. These can only appear on
|
|
// classes, not on actors.
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on globalactor_isolated_class_classproperty_getter: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %1 = class_method %0 : $@thick MainActorIsolatedKlass.Type, #MainActorIsolatedKlass.nsClassComputed!getter : (MainActorIsolatedKlass.Type) -> () -> NonSendableKlass, $@convention(method) (@thick MainActorIsolatedKlass.Type) -> @owned NonSendableKlass
|
|
// CHECK: Isolation: main actor-isolated
|
|
// CHECK: end running test 1 of 1 on globalactor_isolated_class_classproperty_getter: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @globalactor_isolated_class_classproperty_getter : $@convention(thin) () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
%0 = metatype $@thick MainActorIsolatedKlass.Type
|
|
%1 = class_method %0, #MainActorIsolatedKlass.nsClassComputed!getter : (MainActorIsolatedKlass.Type) -> () -> NonSendableKlass, $@convention(method) (@thick MainActorIsolatedKlass.Type) -> @owned NonSendableKlass
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on globalactor_isolated_class_classproperty_setter: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %1 = class_method %0 : $@thick MainActorIsolatedKlass.Type, #MainActorIsolatedKlass.nsClassComputed!setter : (MainActorIsolatedKlass.Type) -> (NonSendableKlass) -> (), $@convention(method) (@owned NonSendableKlass, @thick MainActorIsolatedKlass.Type) -> ()
|
|
// CHECK: Isolation: main actor-isolated
|
|
// CHECK: end running test 1 of 1 on globalactor_isolated_class_classproperty_setter: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @globalactor_isolated_class_classproperty_setter : $@convention(thin) () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
%0 = metatype $@thick MainActorIsolatedKlass.Type
|
|
%1 = class_method %0, #MainActorIsolatedKlass.nsClassComputed!setter : (MainActorIsolatedKlass.Type) -> (NonSendableKlass) -> (), $@convention(method) (@owned NonSendableKlass, @thick MainActorIsolatedKlass.Type) -> ()
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on globalactor_isolated_class_globalactorclassproperty_getter: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %1 = class_method %0 : $@thick MainActorIsolatedKlass.Type, #MainActorIsolatedKlass.globalActorNSClassComputed!getter : (MainActorIsolatedKlass.Type) -> () -> NonSendableKlass, $@convention(method) (@thick MainActorIsolatedKlass.Type) -> @owned NonSendableKlass
|
|
// CHECK: Isolation: global actor 'CustomActor'-isolated
|
|
// CHECK: end running test 1 of 1 on globalactor_isolated_class_globalactorclassproperty_getter: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @globalactor_isolated_class_globalactorclassproperty_getter : $@convention(thin) () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
%0 = metatype $@thick MainActorIsolatedKlass.Type
|
|
%1 = class_method %0, #MainActorIsolatedKlass.globalActorNSClassComputed!getter : (MainActorIsolatedKlass.Type) -> () -> NonSendableKlass, $@convention(method) (@thick MainActorIsolatedKlass.Type) -> @owned NonSendableKlass
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on globalactor_isolated_class_globalactorclassproperty_setter: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %1 = class_method %0 : $@thick MainActorIsolatedKlass.Type, #MainActorIsolatedKlass.globalActorNSClassComputed!setter : (MainActorIsolatedKlass.Type) -> (NonSendableKlass) -> (), $@convention(method) (@owned NonSendableKlass, @thick MainActorIsolatedKlass.Type) -> ()
|
|
// CHECK: Isolation: global actor 'CustomActor'-isolated
|
|
// CHECK: end running test 1 of 1 on globalactor_isolated_class_globalactorclassproperty_setter: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @globalactor_isolated_class_globalactorclassproperty_setter : $@convention(thin) () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
%0 = metatype $@thick MainActorIsolatedKlass.Type
|
|
%1 = class_method %0, #MainActorIsolatedKlass.globalActorNSClassComputed!setter : (MainActorIsolatedKlass.Type) -> (NonSendableKlass) -> (), $@convention(method) (@owned NonSendableKlass, @thick MainActorIsolatedKlass.Type) -> ()
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on globalactor_isolated_class_nonisolatedunsafeclassproperty_getter: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %1 = class_method %0 : $@thick MainActorIsolatedKlass.Type, #MainActorIsolatedKlass.nsNonisolatedUnsafeClassComputed!getter : (MainActorIsolatedKlass.Type) -> () -> NonSendableKlass, $@convention(method) (@thick MainActorIsolatedKlass.Type) -> @owned NonSendableKlass
|
|
// CHECK: Isolation: main actor-isolated: nonisolated(unsafe)
|
|
// CHECK: end running test 1 of 1 on globalactor_isolated_class_nonisolatedunsafeclassproperty_getter: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @globalactor_isolated_class_nonisolatedunsafeclassproperty_getter : $@convention(thin) () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
%0 = metatype $@thick MainActorIsolatedKlass.Type
|
|
%1 = class_method %0, #MainActorIsolatedKlass.nsNonisolatedUnsafeClassComputed!getter : (MainActorIsolatedKlass.Type) -> () -> NonSendableKlass, $@convention(method) (@thick MainActorIsolatedKlass.Type) -> @owned NonSendableKlass
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on globalactor_isolated_class_nonisolatedunsafeclassproperty_setter: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %1 = class_method %0 : $@thick MainActorIsolatedKlass.Type, #MainActorIsolatedKlass.nsNonisolatedUnsafeClassComputed!setter : (MainActorIsolatedKlass.Type) -> (NonSendableKlass) -> (), $@convention(method) (@owned NonSendableKlass, @thick MainActorIsolatedKlass.Type) -> ()
|
|
// CHECK: Isolation: main actor-isolated: nonisolated(unsafe)
|
|
// CHECK: end running test 1 of 1 on globalactor_isolated_class_nonisolatedunsafeclassproperty_setter: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @globalactor_isolated_class_nonisolatedunsafeclassproperty_setter : $@convention(thin) () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
%0 = metatype $@thick MainActorIsolatedKlass.Type
|
|
%1 = class_method %0, #MainActorIsolatedKlass.nsNonisolatedUnsafeClassComputed!setter : (MainActorIsolatedKlass.Type) -> (NonSendableKlass) -> (), $@convention(method) (@owned NonSendableKlass, @thick MainActorIsolatedKlass.Type) -> ()
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on globalactor_isolated_class_nonisolatedclassproperty_getter: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %1 = class_method %0 : $@thick MainActorIsolatedKlass.Type, #MainActorIsolatedKlass.nsNonisolatedClassComputed!getter : (MainActorIsolatedKlass.Type) -> () -> NonSendableKlass, $@convention(method) (@thick MainActorIsolatedKlass.Type) -> @owned NonSendableKlass
|
|
// CHECK: Isolation: disconnected
|
|
// CHECK: end running test 1 of 1 on globalactor_isolated_class_nonisolatedclassproperty_getter: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @globalactor_isolated_class_nonisolatedclassproperty_getter : $@convention(thin) () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
%0 = metatype $@thick MainActorIsolatedKlass.Type
|
|
%1 = class_method %0, #MainActorIsolatedKlass.nsNonisolatedClassComputed!getter : (MainActorIsolatedKlass.Type) -> () -> NonSendableKlass, $@convention(method) (@thick MainActorIsolatedKlass.Type) -> @owned NonSendableKlass
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on globalactor_isolated_class_nonisolatedclassproperty_setter: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %1 = class_method %0 : $@thick MainActorIsolatedKlass.Type, #MainActorIsolatedKlass.nsNonisolatedClassComputed!setter : (MainActorIsolatedKlass.Type) -> (NonSendableKlass) -> (), $@convention(method) (@owned NonSendableKlass, @thick MainActorIsolatedKlass.Type) -> ()
|
|
// CHECK: Isolation: disconnected
|
|
// CHECK: end running test 1 of 1 on globalactor_isolated_class_nonisolatedclassproperty_setter: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @globalactor_isolated_class_nonisolatedclassproperty_setter : $@convention(thin) () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
%0 = metatype $@thick MainActorIsolatedKlass.Type
|
|
%1 = class_method %0, #MainActorIsolatedKlass.nsNonisolatedClassComputed!setter : (MainActorIsolatedKlass.Type) -> (NonSendableKlass) -> (), $@convention(method) (@owned NonSendableKlass, @thick MainActorIsolatedKlass.Type) -> ()
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on nonisolated_class_classproperty_getter: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %1 = class_method %0 : $@thick NonisolatedKlass.Type, #NonisolatedKlass.nsClassComputed!getter : (NonisolatedKlass.Type) -> () -> NonSendableKlass, $@convention(method) (@thick NonisolatedKlass.Type) -> @owned NonSendableKlass
|
|
// CHECK: Isolation: disconnected
|
|
// CHECK: end running test 1 of 1 on nonisolated_class_classproperty_getter: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @nonisolated_class_classproperty_getter : $@convention(thin) () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
%0 = metatype $@thick NonisolatedKlass.Type
|
|
%1 = class_method %0, #NonisolatedKlass.nsClassComputed!getter : (NonisolatedKlass.Type) -> () -> NonSendableKlass, $@convention(method) (@thick NonisolatedKlass.Type) -> @owned NonSendableKlass
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on nonisolated_class_classproperty_setter: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %1 = class_method %0 : $@thick NonisolatedKlass.Type, #NonisolatedKlass.nsClassComputed!setter : (NonisolatedKlass.Type) -> (NonSendableKlass) -> (), $@convention(method) (@owned NonSendableKlass, @thick NonisolatedKlass.Type) -> ()
|
|
// CHECK: Isolation: disconnected
|
|
// CHECK: end running test 1 of 1 on nonisolated_class_classproperty_setter: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @nonisolated_class_classproperty_setter : $@convention(thin) () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
%0 = metatype $@thick NonisolatedKlass.Type
|
|
%1 = class_method %0, #NonisolatedKlass.nsClassComputed!setter : (NonisolatedKlass.Type) -> (NonSendableKlass) -> (), $@convention(method) (@owned NonSendableKlass, @thick NonisolatedKlass.Type) -> ()
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on nonisolated_class_globalactorclassproperty_getter: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %1 = class_method %0 : $@thick NonisolatedKlass.Type, #NonisolatedKlass.globalActorNSClassComputed!getter : (NonisolatedKlass.Type) -> () -> NonSendableKlass, $@convention(method) (@thick NonisolatedKlass.Type) -> @owned NonSendableKlass
|
|
// CHECK: Isolation: global actor 'CustomActor'-isolated
|
|
// CHECK: end running test 1 of 1 on nonisolated_class_globalactorclassproperty_getter: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @nonisolated_class_globalactorclassproperty_getter : $@convention(thin) () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
%0 = metatype $@thick NonisolatedKlass.Type
|
|
%1 = class_method %0, #NonisolatedKlass.globalActorNSClassComputed!getter : (NonisolatedKlass.Type) -> () -> NonSendableKlass, $@convention(method) (@thick NonisolatedKlass.Type) -> @owned NonSendableKlass
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on nonisolated_class_globalactorclassproperty_setter: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %1 = class_method %0 : $@thick NonisolatedKlass.Type, #NonisolatedKlass.globalActorNSClassComputed!setter : (NonisolatedKlass.Type) -> (NonSendableKlass) -> (), $@convention(method) (@owned NonSendableKlass, @thick NonisolatedKlass.Type) -> ()
|
|
// CHECK: Isolation: global actor 'CustomActor'-isolated
|
|
// CHECK: end running test 1 of 1 on nonisolated_class_globalactorclassproperty_setter: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @nonisolated_class_globalactorclassproperty_setter : $@convention(thin) () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
%0 = metatype $@thick NonisolatedKlass.Type
|
|
%1 = class_method %0, #NonisolatedKlass.globalActorNSClassComputed!setter : (NonisolatedKlass.Type) -> (NonSendableKlass) -> (), $@convention(method) (@owned NonSendableKlass, @thick NonisolatedKlass.Type) -> ()
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on nonisolated_class_nonisolatedunsafeclassproperty_getter: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %1 = class_method %0 : $@thick NonisolatedKlass.Type, #NonisolatedKlass.nsNonisolatedUnsafeClassComputed!getter : (NonisolatedKlass.Type) -> () -> NonSendableKlass, $@convention(method) (@thick NonisolatedKlass.Type) -> @owned NonSendableKlass
|
|
// CHECK: Isolation: disconnected: nonisolated(unsafe)
|
|
// CHECK: end running test 1 of 1 on nonisolated_class_nonisolatedunsafeclassproperty_getter: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @nonisolated_class_nonisolatedunsafeclassproperty_getter : $@convention(thin) () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
%0 = metatype $@thick NonisolatedKlass.Type
|
|
%1 = class_method %0, #NonisolatedKlass.nsNonisolatedUnsafeClassComputed!getter : (NonisolatedKlass.Type) -> () -> NonSendableKlass, $@convention(method) (@thick NonisolatedKlass.Type) -> @owned NonSendableKlass
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on nonisolated_class_nonisolatedunsafeclassproperty_setter: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %1 = class_method %0 : $@thick NonisolatedKlass.Type, #NonisolatedKlass.nsNonisolatedUnsafeClassComputed!setter : (NonisolatedKlass.Type) -> (NonSendableKlass) -> (), $@convention(method) (@owned NonSendableKlass, @thick NonisolatedKlass.Type) -> ()
|
|
// CHECK: Isolation: disconnected: nonisolated(unsafe)
|
|
// CHECK: end running test 1 of 1 on nonisolated_class_nonisolatedunsafeclassproperty_setter: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @nonisolated_class_nonisolatedunsafeclassproperty_setter : $@convention(thin) () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
%0 = metatype $@thick NonisolatedKlass.Type
|
|
%1 = class_method %0, #NonisolatedKlass.nsNonisolatedUnsafeClassComputed!setter : (NonisolatedKlass.Type) -> (NonSendableKlass) -> (), $@convention(method) (@owned NonSendableKlass, @thick NonisolatedKlass.Type) -> ()
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on nonisolated_class_nonisolatedclassproperty_getter: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %1 = class_method %0 : $@thick NonisolatedKlass.Type, #NonisolatedKlass.nsNonisolatedClassComputed!getter : (NonisolatedKlass.Type) -> () -> NonSendableKlass, $@convention(method) (@thick NonisolatedKlass.Type) -> @owned NonSendableKlass
|
|
// CHECK: Isolation: disconnected
|
|
// CHECK: end running test 1 of 1 on nonisolated_class_nonisolatedclassproperty_getter: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @nonisolated_class_nonisolatedclassproperty_getter : $@convention(thin) () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
%0 = metatype $@thick NonisolatedKlass.Type
|
|
%1 = class_method %0, #NonisolatedKlass.nsNonisolatedClassComputed!getter : (NonisolatedKlass.Type) -> () -> NonSendableKlass, $@convention(method) (@thick NonisolatedKlass.Type) -> @owned NonSendableKlass
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on nonisolated_class_nonisolatedclassproperty_setter: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %1 = class_method %0 : $@thick NonisolatedKlass.Type, #NonisolatedKlass.nsNonisolatedClassComputed!setter : (NonisolatedKlass.Type) -> (NonSendableKlass) -> (), $@convention(method) (@owned NonSendableKlass, @thick NonisolatedKlass.Type) -> ()
|
|
// CHECK: Isolation: disconnected
|
|
// CHECK: end running test 1 of 1 on nonisolated_class_nonisolatedclassproperty_setter: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @nonisolated_class_nonisolatedclassproperty_setter : $@convention(thin) () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
%0 = metatype $@thick NonisolatedKlass.Type
|
|
%1 = class_method %0, #NonisolatedKlass.nsNonisolatedClassComputed!setter : (NonisolatedKlass.Type) -> (NonSendableKlass) -> (), $@convention(method) (@owned NonSendableKlass, @thick NonisolatedKlass.Type) -> ()
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
///////////////////////////////////
|
|
// MARK: Dynamic 'class' methods //
|
|
///////////////////////////////////
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on globalactor_isolated_class_nonisolatedclassmethod: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %1 = class_method %0 : $@thick MainActorIsolatedKlass.Type, #MainActorIsolatedKlass.getNSClassFunc : (MainActorIsolatedKlass.Type) -> () -> NonSendableKlass, $@convention(method) (@thick MainActorIsolatedKlass.Type) -> @owned NonSendableKlass
|
|
// CHECK: Isolation: main actor-isolated
|
|
// CHECK: end running test 1 of 1 on globalactor_isolated_class_nonisolatedclassmethod: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @globalactor_isolated_class_nonisolatedclassmethod : $@convention(thin) () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
%0 = metatype $@thick MainActorIsolatedKlass.Type
|
|
%1 = class_method %0, #MainActorIsolatedKlass.getNSClassFunc : (MainActorIsolatedKlass.Type) -> () -> NonSendableKlass, $@convention(method) (@thick MainActorIsolatedKlass.Type) -> @owned NonSendableKlass
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on globalactor_isolated_class_globalactorisolatedclassmethod: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %1 = class_method %0 : $@thick MainActorIsolatedKlass.Type, #MainActorIsolatedKlass.getNSGlobalActorClassFunc : (MainActorIsolatedKlass.Type) -> () -> NonSendableKlass, $@convention(method) (@thick MainActorIsolatedKlass.Type) -> @owned NonSendableKlass
|
|
// CHECK: Isolation: global actor 'CustomActor'-isolated
|
|
// CHECK: end running test 1 of 1 on globalactor_isolated_class_globalactorisolatedclassmethod: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @globalactor_isolated_class_globalactorisolatedclassmethod : $@convention(thin) () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
%0 = metatype $@thick MainActorIsolatedKlass.Type
|
|
%1 = class_method %0, #MainActorIsolatedKlass.getNSGlobalActorClassFunc : (MainActorIsolatedKlass.Type) -> () -> NonSendableKlass, $@convention(method) (@thick MainActorIsolatedKlass.Type) -> @owned NonSendableKlass
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on globalactor_isolated_class_nonisolatedclassmethod_: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %1 = class_method %0 : $@thick MainActorIsolatedKlass.Type, #MainActorIsolatedKlass.getNSNonisolatedClassFunc : (MainActorIsolatedKlass.Type) -> () -> NonSendableKlass, $@convention(method) (@thick MainActorIsolatedKlass.Type) -> @owned NonSendableKlass
|
|
// CHECK: Isolation: disconnected
|
|
// CHECK: end running test 1 of 1 on globalactor_isolated_class_nonisolatedclassmethod_: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @globalactor_isolated_class_nonisolatedclassmethod_ : $@convention(thin) () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
%0 = metatype $@thick MainActorIsolatedKlass.Type
|
|
%1 = class_method %0, #MainActorIsolatedKlass.getNSNonisolatedClassFunc : (MainActorIsolatedKlass.Type) -> () -> NonSendableKlass, $@convention(method) (@thick MainActorIsolatedKlass.Type) -> @owned NonSendableKlass
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on nonisolated_class_nonisolatedclassmethod: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %1 = class_method %0 : $@thick NonisolatedKlass.Type, #NonisolatedKlass.getNSClassFunc : (NonisolatedKlass.Type) -> () -> NonSendableKlass, $@convention(method) (@thick NonisolatedKlass.Type) -> @owned NonSendableKlass
|
|
// CHECK: Isolation: disconnected
|
|
// CHECK: end running test 1 of 1 on nonisolated_class_nonisolatedclassmethod: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @nonisolated_class_nonisolatedclassmethod : $@convention(thin) () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
%0 = metatype $@thick NonisolatedKlass.Type
|
|
%1 = class_method %0, #NonisolatedKlass.getNSClassFunc : (NonisolatedKlass.Type) -> () -> NonSendableKlass, $@convention(method) (@thick NonisolatedKlass.Type) -> @owned NonSendableKlass
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on nonisolated_class_globalactorisolatedclassmethod: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %1 = class_method %0 : $@thick NonisolatedKlass.Type, #NonisolatedKlass.getNSGlobalActorClassFunc : (NonisolatedKlass.Type) -> () -> NonSendableKlass, $@convention(method) (@thick NonisolatedKlass.Type) -> @owned NonSendableKlass
|
|
// CHECK: Isolation: global actor 'CustomActor'-isolated
|
|
// CHECK: end running test 1 of 1 on nonisolated_class_globalactorisolatedclassmethod: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @nonisolated_class_globalactorisolatedclassmethod : $@convention(thin) () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
%0 = metatype $@thick NonisolatedKlass.Type
|
|
%1 = class_method %0, #NonisolatedKlass.getNSGlobalActorClassFunc : (NonisolatedKlass.Type) -> () -> NonSendableKlass, $@convention(method) (@thick NonisolatedKlass.Type) -> @owned NonSendableKlass
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: begin running test 1 of 1 on nonisolated_class_nonisolatedclassmethod_: sil_isolation_info_inference with: @trace[0]
|
|
// CHECK: Input Value: %1 = class_method %0 : $@thick NonisolatedKlass.Type, #NonisolatedKlass.getNSNonisolatedClassFunc : (NonisolatedKlass.Type) -> () -> NonSendableKlass, $@convention(method) (@thick NonisolatedKlass.Type) -> @owned NonSendableKlass
|
|
// CHECK: Isolation: disconnected
|
|
// CHECK: end running test 1 of 1 on nonisolated_class_nonisolatedclassmethod_: sil_isolation_info_inference with: @trace[0]
|
|
sil [ossa] @nonisolated_class_nonisolatedclassmethod_ : $@convention(thin) () -> () {
|
|
bb0:
|
|
specify_test "sil_isolation_info_inference @trace[0]"
|
|
%0 = metatype $@thick NonisolatedKlass.Type
|
|
%1 = class_method %0, #NonisolatedKlass.getNSNonisolatedClassFunc : (NonisolatedKlass.Type) -> () -> NonSendableKlass, $@convention(method) (@thick NonisolatedKlass.Type) -> @owned NonSendableKlass
|
|
debug_value [trace] %1
|
|
%9999 = tuple ()
|
|
return %9999 : $()
|
|
} |