Skip to content

Commit 4b29089

Browse files
committed
[region-isolation] Add a little bit of documentation to ActorInstance.
1 parent 3597006 commit 4b29089

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

include/swift/SILOptimizer/Utils/SILIsolationInfo.h

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,26 @@
3030

3131
namespace swift {
3232

33+
/// Represents a generalized actor instance reference.
34+
///
35+
/// Used to generalize over cases where we actually have an actor instance
36+
/// associated with a SILValue and other cases where we know that the actor
37+
/// instance is but we don't have a value.
3338
class ActorInstance {
3439
public:
3540
enum class Kind : uint8_t {
41+
/// An actor instance where we have an actual SILValue for the actor
42+
/// instance.
3643
Value,
44+
45+
/// An actor instance in an actor accessor init where we do not have direct
46+
/// access to the self value and instead have access indirectly to the
47+
/// storage associated with the accessor.
3748
ActorAccessorInit = 0x1,
3849
};
3950

51+
/// Set to (SILValue(), ActorAccessorInit) if we have an ActorAccessorInit. Is
52+
/// null if we have (SILValue(), Kind::Value).
4053
llvm::PointerIntPair<SILValue, 1> value;
4154

4255
ActorInstance(SILValue value, Kind kind)
@@ -116,8 +129,6 @@ class SILIsolationInfo {
116129

117130
/// If set this is the SILValue that represents the actor instance that we
118131
/// derived isolatedValue from.
119-
///
120-
/// If set to (SILValue(), 1), then we are in an
121132
ActorInstance actorInstance;
122133

123134
SILIsolationInfo(SILValue isolatedValue, SILValue actorInstance,

0 commit comments

Comments
 (0)