Skip to content

Commit 2ed19c6

Browse files
xedinktoso
authored andcommitted
[Distributed] Mangling: Add a comment about distributed accessor thunks
1 parent 75d8564 commit 2ed19c6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/AST/ASTMangler.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3190,6 +3190,13 @@ void ASTMangler::appendEntity(const ValueDecl *decl) {
31903190
// Handle accessors specially, they are mangled as modifiers on the accessed
31913191
// declaration.
31923192
if (auto accessor = dyn_cast<AccessorDecl>(decl)) {
3193+
// Distributed thunks associated with computed properties
3194+
// are currently implemented as accessors but they don't
3195+
// have to be and that could be changed in the future.
3196+
//
3197+
// Let's mangle them as `distributed func`s to make it easier
3198+
// to change implementation and because runtime needs a function
3199+
// type associated with the thunk to form a call to it.
31933200
if (accessor->isDistributedThunk()) {
31943201
appendContextOf(decl);
31953202
appendDeclName(accessor->getStorage());

0 commit comments

Comments
 (0)