Skip to content

Commit

Permalink
Go back to 31 lanes
Browse files Browse the repository at this point in the history
  • Loading branch information
rickhanlonii committed Mar 24, 2021
1 parent e0ee779 commit ec5f9f7
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ export {
COMPACT_LINE_HEIGHT,
} from 'react-devtools-shared/src/constants.js';

export const REACT_TOTAL_NUM_LANES = 30;
export const REACT_TOTAL_NUM_LANES = 31;
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe(getLanesFromTransportDecimalBitmask, () => {
it('should ignore lanes outside REACT_TOTAL_NUM_LANES', () => {
// Sanity check; this test may need to be updated when the no. of fiber
// lanes are changed.
expect(REACT_TOTAL_NUM_LANES).toBe(30);
expect(REACT_TOTAL_NUM_LANES).toBe(31);

expect(
getLanesFromTransportDecimalBitmask(
Expand Down
78 changes: 40 additions & 38 deletions packages/react-reconciler/src/ReactFiberLane.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,54 +71,55 @@ export const NoLanePriority: LanePriority = 0;
// Lane values below should be kept in sync with getLabelsForLanes(), used by react-devtools-scheduling-profiler.
// If those values are changed that package should be rebuilt and redeployed.

export const TotalLanes = 30;
export const TotalLanes = 31;

export const NoLanes: Lanes = /* */ 0b000000000000000000000000000000;
export const NoLane: Lane = /* */ 0b000000000000000000000000000000;

export const SyncLane: Lane = /* */ 0b000000000000000000000000000001;

const InputContinuousHydrationLane: Lane = /* */ 0b000000000000000000000000000010;
export const InputContinuousLane: Lanes = /* */ 0b000000000000000000000000000100;

export const DefaultHydrationLane: Lane = /* */ 0b000000000000000000000000001000;
export const DefaultLane: Lanes = /* */ 0b000000000000000000000000010000;

const TransitionHydrationLane: Lane = /* */ 0b000000000000000000000000100000;
const TransitionLanes: Lanes = /* */ 0b000000001111111111111111000000;
const TransitionLane1: Lane = /* */ 0b000000000000000000000001000000;
const TransitionLane2: Lane = /* */ 0b000000000000000000000010000000;
const TransitionLane3: Lane = /* */ 0b000000000000000000000100000000;
const TransitionLane4: Lane = /* */ 0b000000000000000000001000000000;
const TransitionLane5: Lane = /* */ 0b000000000000000000010000000000;
const TransitionLane6: Lane = /* */ 0b000000000000000000100000000000;
const TransitionLane7: Lane = /* */ 0b000000000000000001000000000000;
const TransitionLane8: Lane = /* */ 0b000000000000000010000000000000;
const TransitionLane9: Lane = /* */ 0b000000000000000100000000000000;
const TransitionLane10: Lane = /* */ 0b000000000000001000000000000000;
const TransitionLane11: Lane = /* */ 0b000000000000010000000000000000;
const TransitionLane12: Lane = /* */ 0b000000000000100000000000000000;
const TransitionLane13: Lane = /* */ 0b000000000001000000000000000000;
const TransitionLane14: Lane = /* */ 0b000000000010000000000000000000;
const TransitionLane15: Lane = /* */ 0b000000000100000000000000000000;
const TransitionLane16: Lane = /* */ 0b000000001000000000000000000000;

const RetryLanes: Lanes = /* */ 0b000011110000000000000000000000;
const RetryLane1: Lane = /* */ 0b000000010000000000000000000000;
const RetryLane2: Lane = /* */ 0b000000100000000000000000000000;
const RetryLane3: Lane = /* */ 0b000001000000000000000000000000;
const RetryLane4: Lane = /* */ 0b000010000000000000000000000000;
export const SyncLane: Lane = /* */ 0b0000000000000000000000000000001;

const InputContinuousHydrationLane: Lane = /* */ 0b0000000000000000000000000000010;
export const InputContinuousLane: Lanes = /* */ 0b0000000000000000000000000000100;

export const DefaultHydrationLane: Lane = /* */ 0b0000000000000000000000000001000;
export const DefaultLane: Lanes = /* */ 0b0000000000000000000000000010000;

const TransitionHydrationLane: Lane = /* */ 0b0000000000000000000000000100000;
const TransitionLanes: Lanes = /* */ 0b0000000001111111111111111000000;
const TransitionLane1: Lane = /* */ 0b0000000000000000000000001000000;
const TransitionLane2: Lane = /* */ 0b0000000000000000000000010000000;
const TransitionLane3: Lane = /* */ 0b0000000000000000000000100000000;
const TransitionLane4: Lane = /* */ 0b0000000000000000000001000000000;
const TransitionLane5: Lane = /* */ 0b0000000000000000000010000000000;
const TransitionLane6: Lane = /* */ 0b0000000000000000000100000000000;
const TransitionLane7: Lane = /* */ 0b0000000000000000001000000000000;
const TransitionLane8: Lane = /* */ 0b0000000000000000010000000000000;
const TransitionLane9: Lane = /* */ 0b0000000000000000100000000000000;
const TransitionLane10: Lane = /* */ 0b0000000000000001000000000000000;
const TransitionLane11: Lane = /* */ 0b0000000000000010000000000000000;
const TransitionLane12: Lane = /* */ 0b0000000000000100000000000000000;
const TransitionLane13: Lane = /* */ 0b0000000000001000000000000000000;
const TransitionLane14: Lane = /* */ 0b0000000000010000000000000000000;
const TransitionLane15: Lane = /* */ 0b0000000000100000000000000000000;
const TransitionLane16: Lane = /* */ 0b0000000001000000000000000000000;

const RetryLanes: Lanes = /* */ 0b0000111110000000000000000000000;
const RetryLane1: Lane = /* */ 0b0000000010000000000000000000000;
const RetryLane2: Lane = /* */ 0b0000000100000000000000000000000;
const RetryLane3: Lane = /* */ 0b0000001000000000000000000000000;
const RetryLane4: Lane = /* */ 0b0000010000000000000000000000000;
const RetryLane5: Lane = /* */ 0b0000100000000000000000000000000;

export const SomeRetryLane: Lane = RetryLane1;

export const SelectiveHydrationLane: Lane = /* */ 0b000100000000000000000000000000;
export const SelectiveHydrationLane: Lane = /* */ 0b0001000000000000000000000000000;

const NonIdleLanes = /* */ 0b000111111111111111111111111111;
const NonIdleLanes = /* */ 0b0001111111111111111111111111111;

export const IdleHydrationLane: Lane = /* */ 0b001000000000000000000000000000;
const IdleLane: Lanes = /* */ 0b010000000000000000000000000000;
export const IdleHydrationLane: Lane = /* */ 0b0010000000000000000000000000000;
const IdleLane: Lanes = /* */ 0b0100000000000000000000000000000;

export const OffscreenLane: Lane = /* */ 0b100000000000000000000000000000;
export const OffscreenLane: Lane = /* */ 0b1000000000000000000000000000000;

// This function is used for the experimental scheduling profiler (react-devtools-scheduling-profiler)
// It should be kept in sync with the Lanes values above.
Expand Down Expand Up @@ -226,6 +227,7 @@ function getHighestPriorityLanes(lanes: Lanes | Lane): Lanes {
case RetryLane2:
case RetryLane3:
case RetryLane4:
case RetryLane5:
return_highestLanePriority = RetryLanePriority;
return lanes & RetryLanes;
case SelectiveHydrationLane:
Expand Down

0 comments on commit ec5f9f7

Please sign in to comment.