Skip to content

Commit 3f3410d

Browse files
committed
[Distributed] Mangling: Add a comment about distributed accessor thunks
1 parent 3006e92 commit 3f3410d

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
@@ -3192,6 +3192,13 @@ void ASTMangler::appendEntity(const ValueDecl *decl) {
31923192
// Handle accessors specially, they are mangled as modifiers on the accessed
31933193
// declaration.
31943194
if (auto accessor = dyn_cast<AccessorDecl>(decl)) {
3195+
// Distributed thunks associated with computed properties
3196+
// are currently implemented as accessors but they don't
3197+
// have to be and that could be changed in the future.
3198+
//
3199+
// Let's mangle them as `distributed func`s to make it easier
3200+
// to change implementation and because runtime needs a function
3201+
// type associated with the thunk to form a call to it.
31953202
if (accessor->isDistributedThunk()) {
31963203
appendContextOf(decl);
31973204
appendDeclName(accessor->getStorage());

0 commit comments

Comments
 (0)