@@ -412,7 +412,7 @@ class alignas(1 << DeclAlignInBits) Decl : public ASTAllocated<Decl> {
412412 SWIFT_INLINE_BITFIELD (SubscriptDecl, VarDecl, 2 ,
413413 StaticSpelling : 2
414414 );
415- SWIFT_INLINE_BITFIELD (AbstractFunctionDecl, ValueDecl, 3 +2 +8 +1 +1 +1 +1 +1 +1 ,
415+ SWIFT_INLINE_BITFIELD (AbstractFunctionDecl, ValueDecl, 3 +2 +8 +1 +1 +1 +1 +1 +1 + 1 ,
416416 // / \see AbstractFunctionDecl::BodyKind
417417 BodyKind : 3 ,
418418
@@ -439,7 +439,11 @@ class alignas(1 << DeclAlignInBits) Decl : public ASTAllocated<Decl> {
439439
440440 // / Whether peeking into this function detected nested type declarations.
441441 // / This is set when skipping over the decl at parsing.
442- HasNestedTypeDeclarations : 1
442+ HasNestedTypeDeclarations : 1 ,
443+
444+ // / Whether this function is a distributed thunk for a distributed
445+ // / function or computed property.
446+ DistributedThunk: 1
443447 );
444448
445449 SWIFT_INLINE_BITFIELD (FuncDecl, AbstractFunctionDecl, 1 +1 +2 +1 +1 +2 +1 ,
@@ -6335,6 +6339,7 @@ class AbstractFunctionDecl : public GenericContext, public ValueDecl {
63356339 Bits.AbstractFunctionDecl .Throws = Throws;
63366340 Bits.AbstractFunctionDecl .HasSingleExpressionBody = false ;
63376341 Bits.AbstractFunctionDecl .HasNestedTypeDeclarations = false ;
6342+ Bits.AbstractFunctionDecl .DistributedThunk = false ;
63386343 }
63396344
63406345 void setBodyKind (BodyKind K) {
@@ -6433,6 +6438,16 @@ class AbstractFunctionDecl : public GenericContext, public ValueDecl {
64336438 // / Returns 'true' if the function is distributed.
64346439 bool isDistributed () const ;
64356440
6441+ // / Is this a thunk function used to access a distributed method
6442+ // / or computed property outside of its actor isolation context?
6443+ bool isDistributedThunk () const {
6444+ return Bits.AbstractFunctionDecl .DistributedThunk ;
6445+ }
6446+
6447+ void setDistributedThunk (bool isThunk) {
6448+ Bits.AbstractFunctionDecl .DistributedThunk = isThunk;
6449+ }
6450+
64366451 // / For a 'distributed' target (func or computed property),
64376452 // / get the 'thunk' responsible for performing the 'remoteCall'.
64386453 // /
0 commit comments