Skip to content

Commit 2e368ce

Browse files
authored
Merge pull request #82010 from ktoso/pick-wip-fix-computed-variables-arm64-protocol-dist
[6.2][Distributed] Fix computed properties in protocols on arm64e
2 parents dd32f7f + 363cbae commit 2e368ce

5 files changed

+22
-17
lines changed

lib/IRGen/GenMeta.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -273,10 +273,11 @@ static Flags getMethodDescriptorFlags(ValueDecl *fn) {
273273
return {Flags::Kind::ModifyCoroutine, false};
274274
case AccessorKind::Modify2:
275275
return {Flags::Kind::ModifyCoroutine, true};
276+
case AccessorKind::DistributedGet:
277+
return {Flags::Kind::Getter, false};
276278
#define OPAQUE_ACCESSOR(ID, KEYWORD)
277279
#define ACCESSOR(ID) \
278280
case AccessorKind::ID:
279-
case AccessorKind::DistributedGet:
280281
#include "swift/AST/AccessorKinds.def"
281282
llvm_unreachable("these accessors never appear in protocols or v-tables");
282283
}
@@ -1070,13 +1071,6 @@ namespace {
10701071
}
10711072

10721073
for (auto &entry : pi.getWitnessEntries()) {
1073-
if (entry.isFunction() &&
1074-
entry.getFunction().getDecl()->isDistributedGetAccessor()) {
1075-
// We avoid emitting _distributed_get accessors, as they cannot be
1076-
// referred to anyway
1077-
continue;
1078-
}
1079-
10801074
if (Resilient) {
10811075
if (entry.isFunction()) {
10821076
// Define the method descriptor.

test/Distributed/Runtime/distributed_actor_localSystem_distributedProtocol.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
// RUN: %target-codesign %t/a.out
44
// RUN: %target-run %t/a.out | %FileCheck %s --color
55

6+
// Run again with library evolution:
7+
// RUN: %target-build-swift -module-name main -j2 -parse-as-library -enable-library-evolution -I %t %s -plugin-path %swift-plugin-dir -o %t/evo.out
8+
// RUN: %target-codesign %t/evo.out
9+
// RUN: %target-run %t/evo.out | %FileCheck %s --color
10+
611
// REQUIRES: executable_test
712
// REQUIRES: concurrency
813
// REQUIRES: distributed
@@ -14,9 +19,6 @@
1419
// rdar://90373022
1520
// UNSUPPORTED: OS=watchos
1621

17-
// rdar://125628060
18-
// UNSUPPORTED: CPU=arm64e
19-
2022
import Distributed
2123

2224
@Resolvable

test/Distributed/Runtime/distributed_actor_localSystem_distributedProtocol_variable.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
// RUN: %target-codesign %t/a.out
44
// RUN: %target-run %t/a.out | %FileCheck %s --color
55

6+
// Run again with library evolution:
7+
// RUN: %target-build-swift -module-name main -j2 -parse-as-library -enable-library-evolution -I %t %s -plugin-path %swift-plugin-dir -o %t/evo.out
8+
// RUN: %target-codesign %t/evo.out
9+
// RUN: %target-run %t/evo.out | %FileCheck %s --color
10+
611
// REQUIRES: executable_test
712
// REQUIRES: concurrency
813
// REQUIRES: distributed
@@ -14,9 +19,6 @@
1419
// rdar://90373022
1520
// UNSUPPORTED: OS=watchos
1621

17-
// rdar://125628060
18-
// UNSUPPORTED: CPU=arm64e
19-
2022
import Distributed
2123

2224
@Resolvable

test/Distributed/Runtime/distributed_actor_localSystem_generic_system.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
// RUN: %target-codesign %t/a.out
44
// RUN: %target-run %t/a.out | %FileCheck %s --color
55

6+
// Run again with library evolution:
7+
// RUN: %target-build-swift -module-name main -j2 -parse-as-library -enable-library-evolution -I %t %s -plugin-path %swift-plugin-dir -o %t/evo.out
8+
// RUN: %target-codesign %t/evo.out
9+
// RUN: %target-run %t/evo.out | %FileCheck %s --color
10+
611
// REQUIRES: executable_test
712
// REQUIRES: concurrency
813
// REQUIRES: distributed

test/Distributed/Runtime/distributed_actor_localSystem_manual_conformance.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
// RUN: %target-codesign %t/a.out
44
// RUN: %target-run %t/a.out | %FileCheck %s --color
55

6+
// Run again with library evolution:
7+
// RUN: %target-build-swift -module-name main -j2 -parse-as-library -enable-library-evolution -I %t %s -plugin-path %swift-plugin-dir -o %t/evo.out
8+
// RUN: %target-codesign %t/evo.out
9+
// RUN: %target-run %t/evo.out | %FileCheck %s --color
10+
611
// REQUIRES: executable_test
712
// REQUIRES: concurrency
813
// REQUIRES: distributed
@@ -14,9 +19,6 @@
1419
// rdar://90373022
1520
// UNSUPPORTED: OS=watchos
1621

17-
// rdar://125628060
18-
// UNSUPPORTED: CPU=arm64e
19-
2022
import Distributed
2123

2224
@available(SwiftStdlib 6.0, *)

0 commit comments

Comments
 (0)