Skip to content

Commit 791d07d

Browse files
committed
Revert "Test fixes"
This reverts commit 9c328a8.
1 parent c12a141 commit 791d07d

File tree

10 files changed

+25
-25
lines changed

10 files changed

+25
-25
lines changed

test/Concurrency/assume_mainactor.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
class Klass {
1111
// Implicit deinit
1212
// CHECK: // Klass.deinit
13-
// CHECK-NEXT: // Isolation: unspecified
13+
// CHECK-NEXT: // Isolation: concurrent
1414
// CHECK-NEXT: sil hidden [ossa] @$s16assume_mainactor5KlassCfd : $@convention(method) (@guaranteed Klass) -> @owned Builtin.NativeObject {
1515

1616
// Implicit deallocating deinit
@@ -189,7 +189,7 @@ actor MyActor {
189189

190190
// Implicit deinit
191191
// CHECK: // MyActor.deinit
192-
// CHECK-NEXT: // Isolation: unspecified
192+
// CHECK-NEXT: // Isolation: concurrent
193193
// CHECK-NEXT: sil hidden [ossa] @$s16assume_mainactor7MyActorCfd : $@convention(method) (@guaranteed MyActor) -> @owned Builtin.NativeObject {
194194

195195
// Non-async init should be nonisolated

test/Frontend/dump-parse.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@ escaping({ $0 })
6767
// CHECK-AST: (declref_expr type="(@escaping (Int) -> Int) -> ()"
6868
// CHECK-AST-NEXT: (argument_list
6969
// CHECK-AST-NEXT: (argument
70-
// CHECK-AST-NEXT: (closure_expr type="(Int) -> Int" {{.*}} discriminator=0 concurrent escaping single_expression
70+
// CHECK-AST-NEXT: (closure_expr type="(Int) -> Int" {{.*}} discriminator=0 nonisolated escaping single_expression
7171

7272
func nonescaping(_: (Int) -> Int) {}
7373
nonescaping({ $0 })
7474
// CHECK-AST: (declref_expr type="((Int) -> Int) -> ()"
7575
// CHECK-AST-NEXT: (argument_list
7676
// CHECK-AST-NEXT: (argument
77-
// CHECK-AST-NEXT: (closure_expr type="(Int) -> Int" {{.*}} discriminator=1 concurrent single_expression
77+
// CHECK-AST-NEXT: (closure_expr type="(Int) -> Int" {{.*}} discriminator=1 nonisolated single_expression
7878

7979
// CHECK-LABEL: (struct_decl range=[{{.+}}] "MyStruct")
8080
struct MyStruct {}

test/SILGen/functions.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ func testNoescape() {
489489
// Despite being a noescape closure, this needs to capture 'a' by-box so it can
490490
// be passed to the capturing closure.closure
491491
// CHECK: closure #1 () -> () in functions.testNoescape() -> ()
492-
// CHECK-NEXT: Isolation: concurrent
492+
// CHECK-NEXT: Isolation: nonisolated
493493
// CHECK-NEXT: sil private [ossa] @$s9functions12testNoescapeyyFyyXEfU_ : $@convention(thin) (@guaranteed { var Int }) -> () {
494494

495495

@@ -510,9 +510,9 @@ func testNoescape2() {
510510
// CHECK-LABEL: sil hidden [ossa] @$s9functions13testNoescape2yyF : $@convention(thin) () -> () {
511511

512512
// CHECK: // closure #1 () -> () in functions.testNoescape2() -> ()
513-
// CHECK-NEXT: Isolation: concurrent
513+
// CHECK-NEXT: Isolation: nonisolated
514514
// CHECK-NEXT: sil private [ossa] @$s9functions13testNoescape2yyFyyXEfU_ : $@convention(thin) (@guaranteed { var Int }) -> () {
515515

516516
// CHECK: // closure #1 () -> () in closure #1 () -> () in functions.testNoescape2() -> ()
517-
// CHECK-NEXT: Isolation: concurrent
517+
// CHECK-NEXT: Isolation: nonisolated
518518
// CHECK-NEXT: sil private [ossa] @$s9functions13testNoescape2yyFyyXEfU_yycfU_ : $@convention(thin) (@guaranteed { var Int }) -> () {

test/SILGen/nonisolated_inherits_isolation.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func unspecifiedAsyncUse(_ t: NonSendableKlass) async {}
1818
//===----------------------------------------------------------------------===//
1919

2020
// CHECK-LABEL: // nonisolatedAsync()
21-
// CHECK-NEXT: Isolation: nonisolated
21+
// CHECK-NEXT: Isolation: caller_isolation_inheriting
2222
// CHECK-NEXT: sil hidden [ossa] @$s30nonisolated_inherits_isolation0A5AsyncyyYaF : $@convention(thin) @async (@sil_isolated @sil_implicit_leading_param @guaranteed Optional<any Actor>) -> () {
2323
// CHECK: bb0([[ACTOR:%.*]] : @guaranteed $Optional<any Actor>):
2424
// CHECK: hop_to_executor [[ACTOR]]
@@ -28,7 +28,7 @@ nonisolated func nonisolatedAsync() async {}
2828
func unspecifiedAsyncCallee() async {}
2929

3030
// CHECK-LABEL: // unspecifiedAsync()
31-
// CHECK-NEXT: Isolation: nonisolated
31+
// CHECK-NEXT: Isolation: caller_isolation_inheriting
3232
// CHECK-NEXT: sil hidden [ossa] @$s30nonisolated_inherits_isolation16unspecifiedAsyncyyYaF : $@convention(thin) @async (@sil_isolated @sil_implicit_leading_param @guaranteed Optional<any Actor>) -> () {
3333
// CHECK: bb0([[ARG:%.*]] : @guaranteed $Optional<any Actor>):
3434
// CHECK: hop_to_executor [[ACTOR]]
@@ -52,7 +52,7 @@ struct NonisolatedStruct {
5252
// Do apply it to sync initializers.
5353
//
5454
// CHECK-LABEL: // NonisolatedStruct.init(asynchronous:)
55-
// CHECK-NEXT: // Isolation: nonisolated
55+
// CHECK-NEXT: // Isolation: caller_isolation_inheriting
5656
// CHECK-NEXT: sil hidden [ossa] @$s30nonisolated_inherits_isolation17NonisolatedStructV12asynchronousACyt_tYacfC : $@convention(method) @async (@sil_isolated @sil_implicit_leading_param @guaranteed Optional<any Actor>, @thin NonisolatedStruct.Type) -> NonisolatedStruct {
5757
// CHECK: } // end sil function '$s30nonisolated_inherits_isolation17NonisolatedStructV12asynchronousACyt_tYacfC'
5858
init(asynchronous: ()) async {}
@@ -62,14 +62,14 @@ struct NonisolatedStruct {
6262

6363
// But do apply it to async methods.
6464
// CHECK-LABEL: // NonisolatedStruct.asyncMethod()
65-
// CHECK-NEXT: // Isolation: nonisolated
65+
// CHECK-NEXT: // Isolation: caller_isolation_inheriting
6666
// CHECK-NEXT: sil hidden [ossa] @$s30nonisolated_inherits_isolation17NonisolatedStructV11asyncMethodyyYaF : $@convention(method) @async (@sil_isolated @sil_implicit_leading_param @guaranteed Optional<any Actor>, NonisolatedStruct) -> () {
6767
// CHECK: } // end sil function '$s30nonisolated_inherits_isolation17NonisolatedStructV11asyncMethodyyYaF'
6868
func asyncMethod() async {}
6969
}
7070

7171
// CHECK-LABEL: // useNonisolatedStruct()
72-
// CHECK-NEXT: // Isolation: nonisolated
72+
// CHECK-NEXT: // Isolation: caller_isolation_inheriting
7373
// CHECK-NEXT: sil hidden [ossa] @$s30nonisolated_inherits_isolation20useNonisolatedStructyyYaF : $@convention(thin) @async (@sil_isolated @sil_implicit_leading_param @guaranteed Optional<any Actor>) -> () {
7474
// CHECK: bb0([[ACTOR:%.*]] :
7575
// CHECK: hop_to_executor [[ACTOR]]
@@ -89,7 +89,7 @@ func useNonisolatedStruct() async {
8989
}
9090

9191
// CHECK-LABEL: // useNonisolatedStruct2()
92-
// CHECK-NEXT: // Isolation: nonisolated
92+
// CHECK-NEXT: // Isolation: caller_isolation_inheriting
9393
// CHECK-NEXT: sil hidden [ossa] @$s30nonisolated_inherits_isolation21useNonisolatedStruct2yyYaF : $@convention(thin) @async (@sil_isolated @sil_implicit_leading_param @guaranteed Optional<any Actor>) -> () {
9494
// CHECK: bb0([[ACTOR:%.*]] :
9595
// CHECK: hop_to_executor [[ACTOR]]

test/SILGen/synthesized_conformance_enum.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ extension Enum: Codable where T: Codable {}
6262

6363
extension NoValues: CaseIterable {}
6464
// CHECK-LABEL: // static NoValues.allCases.getter
65-
// CHECK-NEXT: // Isolation: concurrent
65+
// CHECK-NEXT: // Isolation: nonisolated
6666
// CHECK-NEXT: sil hidden [ossa] @$s28synthesized_conformance_enum8NoValuesO8allCasesSayACGvgZ : $@convention(method) (@thin NoValues.Type) -> @owned Array<NoValues> {
6767

6868
extension NoValues: Codable {}

test/SILOptimizer/moveonly_raw_layout.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ struct Lock: ~Copyable {
3030
}
3131

3232
// CHECK-LABEL: // Lock.deinit
33-
// CHECK-NEXT: // Isolation: concurrent
33+
// CHECK-NEXT: // Isolation: nonisolated
3434
// CHECK-NEXT: sil{{.*}} @[[DEINIT:\$.*4LockV.*fD]] :
3535
deinit {
3636
// CHECK-NOT: destroy_addr

test/Sema/property_wrappers.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,17 @@ public class W_58201<Value> {
7070
struct S1_58201 {
7171
// CHECK: argument_list implicit labels="wrappedValue:"
7272
// CHECK-NEXT: argument label="wrappedValue"
73-
// CHECK-NEXT: autoclosure_expr implicit type="() -> Bool?" discriminator=0 concurrent captures=(<opaque_value> ) escaping
74-
// CHECK: autoclosure_expr implicit type="() -> Bool?" discriminator=1 concurrent escaping
73+
// CHECK-NEXT: autoclosure_expr implicit type="() -> Bool?" discriminator=0 nonisolated captures=(<opaque_value> ) escaping
74+
// CHECK: autoclosure_expr implicit type="() -> Bool?" discriminator=1 nonisolated escaping
7575
@W_58201 var a: Bool?
7676
}
7777

7878
// CHECK-LABEL: struct_decl{{.*}}S2_58201
7979
struct S2_58201 {
8080
// CHECK: argument_list implicit labels="wrappedValue:"
8181
// CHECK-NEXT: argument label="wrappedValue"
82-
// CHECK-NEXT: autoclosure_expr implicit type="() -> Bool" location={{.*}}.swift:[[@LINE+2]]:26 range=[{{.+}}] discriminator=0 concurrent captures=(<opaque_value> ) escaping
83-
// CHECK: autoclosure_expr implicit type="() -> Bool" location={{.*}}.swift:[[@LINE+1]]:26 range=[{{.+}}] discriminator=1 concurrent escaping
82+
// CHECK-NEXT: autoclosure_expr implicit type="() -> Bool" location={{.*}}.swift:[[@LINE+2]]:26 range=[{{.+}}] discriminator=0 nonisolated captures=(<opaque_value> ) escaping
83+
// CHECK: autoclosure_expr implicit type="() -> Bool" location={{.*}}.swift:[[@LINE+1]]:26 range=[{{.+}}] discriminator=1 nonisolated escaping
8484
@W_58201 var b: Bool = false
8585
}
8686

test/expr/capture/dynamic_self.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
class Android {
66
func clone() -> Self {
7-
// CHECK: closure_expr type="() -> Self" {{.*}} discriminator=0 concurrent captures=(<dynamic_self> self<direct>)
7+
// CHECK: closure_expr type="() -> Self" {{.*}} discriminator=0 nonisolated captures=(<dynamic_self> self<direct>)
88
let fn = { return self }
99
return fn()
1010
}

test/expr/capture/generic_params.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ func doSomething<T>(_ t: T) {}
66

77
func outerGeneric<T>(t: T, x: AnyObject) {
88
// Simple case -- closure captures outer generic parameter
9-
// CHECK: closure_expr type="() -> ()" {{.*}} discriminator=0 concurrent captures=(<generic> t<direct>) escaping single_expression
9+
// CHECK: closure_expr type="() -> ()" {{.*}} discriminator=0 nonisolated captures=(<generic> t<direct>) escaping single_expression
1010
_ = { doSomething(t) }
1111

1212
// Special case -- closure does not capture outer generic parameters
13-
// CHECK: closure_expr type="() -> ()" {{.*}} discriminator=1 concurrent captures=(x<direct>) escaping single_expression
13+
// CHECK: closure_expr type="() -> ()" {{.*}} discriminator=1 nonisolated captures=(x<direct>) escaping single_expression
1414
_ = { doSomething(x) }
1515

1616
// Special case -- closure captures outer generic parameter, but it does not
1717
// appear as the type of any expression
18-
// CHECK: closure_expr type="() -> ()" {{.*}} discriminator=2 concurrent captures=(<generic> x<direct>)
18+
// CHECK: closure_expr type="() -> ()" {{.*}} discriminator=2 nonisolated captures=(<generic> x<direct>)
1919
_ = { if x is T {} }
2020

2121
// Nested generic functions always capture outer generic parameters, even if

test/expr/capture/nested.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
// CHECK: func_decl{{.*}}"foo2(_:)"
44
func foo2(_ x: Int) -> (Int) -> (Int) -> Int {
5-
// CHECK: closure_expr type="(Int) -> (Int) -> Int" {{.*}} discriminator=0 concurrent captures=(x)
5+
// CHECK: closure_expr type="(Int) -> (Int) -> Int" {{.*}} discriminator=0 nonisolated captures=(x)
66
return {(bar: Int) -> (Int) -> Int in
7-
// CHECK: closure_expr type="(Int) -> Int" {{.*}} discriminator=0 concurrent captures=(x<direct>, bar<direct>)
7+
// CHECK: closure_expr type="(Int) -> Int" {{.*}} discriminator=0 nonisolated captures=(x<direct>, bar<direct>)
88
return {(bas: Int) -> Int in
99
return x + bar + bas
1010
}

0 commit comments

Comments
 (0)