@@ -30,10 +30,9 @@ export const Hydrating = /* */ 0b0000000010000000000; |
30 | 30 | export const HydratingAndUpdate = /* */ 0b0000000010000000100; |
31 | 31 | export const Visibility = /* */ 0b0000000100000000000; |
32 | 32 |
|
33 | | -// Passive & Update & Callback & Ref & Snapshot |
34 | | -export const LifecycleEffectMask = /* */ 0b0000000001110100100; |
| 33 | +export const LifecycleEffectMask = Passive | Update | Callback | Ref | Snapshot; |
35 | 34 |
|
36 | | -// Union of all host effects |
| 35 | +// Union of all commit flags (flags with the lifetime of a particular commit) |
37 | 36 | export const HostEffectMask = /* */ 0b0000000111111111111; |
38 | 37 |
|
39 | 38 | // These are not really side effects, but we still reuse this field. |
@@ -50,7 +49,14 @@ export const ForceUpdateForLegacySuspense = /* */ 0b0001000000000000000; |
50 | 49 | // and instead rely on the static flag as a signal that there may be cleanup work. |
51 | 50 | export const PassiveStatic = /* */ 0b0010000000000000000; |
52 | 51 |
|
53 | | -// Union of side effect groupings as pertains to subtreeFlags |
| 52 | +// These flags allow us to traverse to fibers that have effects on mount |
| 53 | +// without traversing the entire tree after every commit for |
| 54 | +// double invoking |
| 55 | +export const MountLayoutDev = /* */ 0b0100000000000000000; |
| 56 | +export const MountPassiveDev = /* */ 0b1000000000000000000; |
| 57 | + |
| 58 | +// Groups of flags that are used in the commit phase to skip over trees that |
| 59 | +// don't contain effects, by checking subtreeFlags. |
54 | 60 |
|
55 | 61 | export const BeforeMutationMask = |
56 | 62 | Snapshot | |
@@ -62,17 +68,12 @@ export const BeforeMutationMask = |
62 | 68 | Deletion | Visibility |
63 | 69 | : 0); |
64 | 70 |
|
65 | | -export const MutationMask = /* */ 0b0000000110010011110; |
66 | | -export const LayoutMask = /* */ 0b0000000000010100100; |
67 | | -export const PassiveMask = /* */ 0b0000000001000001000; |
| 71 | +export const MutationMask = |
| 72 | + Placement | Update | Deletion | ContentReset | Ref | Hydrating | Visibility; |
| 73 | +export const LayoutMask = Update | Callback | Ref; |
| 74 | +export const PassiveMask = Passive | Deletion; |
68 | 75 |
|
69 | 76 | // Union of tags that don't get reset on clones. |
70 | 77 | // This allows certain concepts to persist without recalculting them, |
71 | 78 | // e.g. whether a subtree contains passive effects or portals. |
72 | | -export const StaticMask = /* */ 0b0010000000000000000; |
73 | | - |
74 | | -// These flags allow us to traverse to fibers that have effects on mount |
75 | | -// without traversing the entire tree after every commit for |
76 | | -// double invoking |
77 | | -export const MountLayoutDev = /* */ 0b0100000000000000000; |
78 | | -export const MountPassiveDev = /* */ 0b1000000000000000000; |
| 79 | +export const StaticMask = PassiveStatic; |