Skip to content

Commit 9b33a5e

Browse files
committed
Rename ReactInterleavedUpdates -> ReactFiberConcurrentUpdates
The scope of this module is expanding so I've renamed accordingly. No behavioral changes.
1 parent 05023aa commit 9b33a5e

23 files changed

+63
-63
lines changed

packages/react-noop-renderer/src/createReactNoop.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import type {
1818
Fiber,
1919
TransitionTracingCallbacks,
2020
} from 'react-reconciler/src/ReactInternalTypes';
21-
import type {UpdateQueue} from 'react-reconciler/src/ReactUpdateQueue';
21+
import type {UpdateQueue} from 'react-reconciler/src/ReactFiberClassUpdateQueue.new';
2222
import type {ReactNodeList} from 'shared/ReactTypes';
2323
import type {RootTag} from 'react-reconciler/src/ReactRootTags';
2424

packages/react-reconciler/src/ReactFiberBeginWork.new.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import type {
3333
CacheComponentState,
3434
SpawnedCachePool,
3535
} from './ReactFiberCacheComponent.new';
36-
import type {UpdateQueue} from './ReactUpdateQueue.new';
36+
import type {UpdateQueue} from './ReactFiberClassUpdateQueue.new';
3737
import type {RootState} from './ReactFiberRoot.new';
3838
import {
3939
enableSuspenseAvoidThisFallback,
@@ -131,7 +131,7 @@ import {
131131
cloneUpdateQueue,
132132
initializeUpdateQueue,
133133
enqueueCapturedUpdate,
134-
} from './ReactUpdateQueue.new';
134+
} from './ReactFiberClassUpdateQueue.new';
135135
import {
136136
NoLane,
137137
NoLanes,

packages/react-reconciler/src/ReactFiberBeginWork.old.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import type {
3333
CacheComponentState,
3434
SpawnedCachePool,
3535
} from './ReactFiberCacheComponent.old';
36-
import type {UpdateQueue} from './ReactUpdateQueue.old';
36+
import type {UpdateQueue} from './ReactFiberClassUpdateQueue.old';
3737
import type {RootState} from './ReactFiberRoot.old';
3838
import {
3939
enableSuspenseAvoidThisFallback,
@@ -131,7 +131,7 @@ import {
131131
cloneUpdateQueue,
132132
initializeUpdateQueue,
133133
enqueueCapturedUpdate,
134-
} from './ReactUpdateQueue.old';
134+
} from './ReactFiberClassUpdateQueue.old';
135135
import {
136136
NoLane,
137137
NoLanes,

packages/react-reconciler/src/ReactFiberClassComponent.new.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import type {Fiber} from './ReactInternalTypes';
1111
import type {Lanes} from './ReactFiberLane.new';
12-
import type {UpdateQueue} from './ReactUpdateQueue.new';
12+
import type {UpdateQueue} from './ReactFiberClassUpdateQueue.new';
1313
import type {Flags} from './ReactFiberFlags';
1414

1515
import * as React from 'react';
@@ -58,7 +58,7 @@ import {
5858
ForceUpdate,
5959
initializeUpdateQueue,
6060
cloneUpdateQueue,
61-
} from './ReactUpdateQueue.new';
61+
} from './ReactFiberClassUpdateQueue.new';
6262
import {NoLanes} from './ReactFiberLane.new';
6363
import {
6464
cacheContext,

packages/react-reconciler/src/ReactFiberClassComponent.old.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import type {Fiber} from './ReactInternalTypes';
1111
import type {Lanes} from './ReactFiberLane.old';
12-
import type {UpdateQueue} from './ReactUpdateQueue.old';
12+
import type {UpdateQueue} from './ReactFiberClassUpdateQueue.old';
1313
import type {Flags} from './ReactFiberFlags';
1414

1515
import * as React from 'react';
@@ -58,7 +58,7 @@ import {
5858
ForceUpdate,
5959
initializeUpdateQueue,
6060
cloneUpdateQueue,
61-
} from './ReactUpdateQueue.old';
61+
} from './ReactFiberClassUpdateQueue.old';
6262
import {NoLanes} from './ReactFiberLane.old';
6363
import {
6464
cacheContext,

packages/react-reconciler/src/ReactUpdateQueue.new.js packages/react-reconciler/src/ReactFiberClassUpdateQueue.new.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ import {
109109
markSkippedUpdateLanes,
110110
isUnsafeClassRenderPhaseUpdate,
111111
} from './ReactFiberWorkLoop.new';
112-
import {pushInterleavedQueue} from './ReactFiberInterleavedUpdates.new';
112+
import {pushConcurrentUpdateQueue} from './ReactFiberConcurrentUpdates.new';
113113
import {setIsStrictModeForDevtools} from './ReactFiberDevToolsHook.new';
114114

115115
import assign from 'shared/assign';
@@ -242,7 +242,7 @@ export function enqueueUpdate<State>(
242242
update.next = update;
243243
// At the end of the current render, this queue's interleaved updates will
244244
// be transferred to the pending queue.
245-
pushInterleavedQueue(sharedQueue);
245+
pushConcurrentUpdateQueue(sharedQueue);
246246
} else {
247247
update.next = interleaved.next;
248248
interleaved.next = update;

packages/react-reconciler/src/ReactUpdateQueue.old.js packages/react-reconciler/src/ReactFiberClassUpdateQueue.old.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ import {
109109
markSkippedUpdateLanes,
110110
isUnsafeClassRenderPhaseUpdate,
111111
} from './ReactFiberWorkLoop.old';
112-
import {pushInterleavedQueue} from './ReactFiberInterleavedUpdates.old';
112+
import {pushConcurrentUpdateQueue} from './ReactFiberConcurrentUpdates.old';
113113
import {setIsStrictModeForDevtools} from './ReactFiberDevToolsHook.old';
114114

115115
import assign from 'shared/assign';
@@ -242,7 +242,7 @@ export function enqueueUpdate<State>(
242242
update.next = update;
243243
// At the end of the current render, this queue's interleaved updates will
244244
// be transferred to the pending queue.
245-
pushInterleavedQueue(sharedQueue);
245+
pushConcurrentUpdateQueue(sharedQueue);
246246
} else {
247247
update.next = interleaved.next;
248248
interleaved.next = update;

packages/react-reconciler/src/ReactFiberCommitWork.new.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import type {Fiber} from './ReactInternalTypes';
1919
import type {FiberRoot} from './ReactInternalTypes';
2020
import type {Lanes} from './ReactFiberLane.new';
2121
import type {SuspenseState} from './ReactFiberSuspenseComponent.new';
22-
import type {UpdateQueue} from './ReactUpdateQueue.new';
22+
import type {UpdateQueue} from './ReactFiberClassUpdateQueue.new';
2323
import type {FunctionComponentUpdateQueue} from './ReactFiberHooks.new';
2424
import type {Wakeable} from 'shared/ReactTypes';
2525
import type {
@@ -100,7 +100,7 @@ import {
100100
startPassiveEffectTimer,
101101
} from './ReactProfilerTimer.new';
102102
import {ConcurrentMode, NoMode, ProfileMode} from './ReactTypeOfMode';
103-
import {commitUpdateQueue} from './ReactUpdateQueue.new';
103+
import {commitUpdateQueue} from './ReactFiberClassUpdateQueue.new';
104104
import {
105105
getPublicInstance,
106106
supportsMutation,

packages/react-reconciler/src/ReactFiberCommitWork.old.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import type {Fiber} from './ReactInternalTypes';
1919
import type {FiberRoot} from './ReactInternalTypes';
2020
import type {Lanes} from './ReactFiberLane.old';
2121
import type {SuspenseState} from './ReactFiberSuspenseComponent.old';
22-
import type {UpdateQueue} from './ReactUpdateQueue.old';
22+
import type {UpdateQueue} from './ReactFiberClassUpdateQueue.old';
2323
import type {FunctionComponentUpdateQueue} from './ReactFiberHooks.old';
2424
import type {Wakeable} from 'shared/ReactTypes';
2525
import type {
@@ -100,7 +100,7 @@ import {
100100
startPassiveEffectTimer,
101101
} from './ReactProfilerTimer.old';
102102
import {ConcurrentMode, NoMode, ProfileMode} from './ReactTypeOfMode';
103-
import {commitUpdateQueue} from './ReactUpdateQueue.old';
103+
import {commitUpdateQueue} from './ReactFiberClassUpdateQueue.old';
104104
import {
105105
getPublicInstance,
106106
supportsMutation,

packages/react-reconciler/src/ReactFiberInterleavedUpdates.new.js packages/react-reconciler/src/ReactFiberConcurrentUpdates.new.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,35 @@
88
*/
99

1010
import type {UpdateQueue as HookQueue} from './ReactFiberHooks.new';
11-
import type {SharedQueue as ClassQueue} from './ReactUpdateQueue.new';
11+
import type {SharedQueue as ClassQueue} from './ReactFiberClassUpdateQueue.new';
1212

1313
// An array of all update queues that received updates during the current
1414
// render. When this render exits, either because it finishes or because it is
1515
// interrupted, the interleaved updates will be transferred onto the main part
1616
// of the queue.
17-
let interleavedQueues: Array<
17+
let concurrentQueues: Array<
1818
HookQueue<any, any> | ClassQueue<any>,
1919
> | null = null;
2020

21-
export function pushInterleavedQueue(
21+
export function pushConcurrentUpdateQueue(
2222
queue: HookQueue<any, any> | ClassQueue<any>,
2323
) {
24-
if (interleavedQueues === null) {
25-
interleavedQueues = [queue];
24+
if (concurrentQueues === null) {
25+
concurrentQueues = [queue];
2626
} else {
27-
interleavedQueues.push(queue);
27+
concurrentQueues.push(queue);
2828
}
2929
}
3030

31-
export function enqueueInterleavedUpdates() {
31+
export function finishQueueingConcurrentUpdates() {
3232
// Transfer the interleaved updates onto the main queue. Each queue has a
3333
// `pending` field and an `interleaved` field. When they are not null, they
3434
// point to the last node in a circular linked list. We need to append the
3535
// interleaved list to the end of the pending list by joining them into a
3636
// single, circular list.
37-
if (interleavedQueues !== null) {
38-
for (let i = 0; i < interleavedQueues.length; i++) {
39-
const queue = interleavedQueues[i];
37+
if (concurrentQueues !== null) {
38+
for (let i = 0; i < concurrentQueues.length; i++) {
39+
const queue = concurrentQueues[i];
4040
const lastInterleavedUpdate = queue.interleaved;
4141
if (lastInterleavedUpdate !== null) {
4242
queue.interleaved = null;
@@ -50,6 +50,6 @@ export function enqueueInterleavedUpdates() {
5050
queue.pending = (lastInterleavedUpdate: any);
5151
}
5252
}
53-
interleavedQueues = null;
53+
concurrentQueues = null;
5454
}
5555
}

packages/react-reconciler/src/ReactFiberInterleavedUpdates.old.js packages/react-reconciler/src/ReactFiberConcurrentUpdates.old.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,35 @@
88
*/
99

1010
import type {UpdateQueue as HookQueue} from './ReactFiberHooks.old';
11-
import type {SharedQueue as ClassQueue} from './ReactUpdateQueue.old';
11+
import type {SharedQueue as ClassQueue} from './ReactFiberClassUpdateQueue.old';
1212

1313
// An array of all update queues that received updates during the current
1414
// render. When this render exits, either because it finishes or because it is
1515
// interrupted, the interleaved updates will be transferred onto the main part
1616
// of the queue.
17-
let interleavedQueues: Array<
17+
let concurrentQueues: Array<
1818
HookQueue<any, any> | ClassQueue<any>,
1919
> | null = null;
2020

21-
export function pushInterleavedQueue(
21+
export function pushConcurrentUpdateQueue(
2222
queue: HookQueue<any, any> | ClassQueue<any>,
2323
) {
24-
if (interleavedQueues === null) {
25-
interleavedQueues = [queue];
24+
if (concurrentQueues === null) {
25+
concurrentQueues = [queue];
2626
} else {
27-
interleavedQueues.push(queue);
27+
concurrentQueues.push(queue);
2828
}
2929
}
3030

31-
export function enqueueInterleavedUpdates() {
31+
export function finishQueueingConcurrentUpdates() {
3232
// Transfer the interleaved updates onto the main queue. Each queue has a
3333
// `pending` field and an `interleaved` field. When they are not null, they
3434
// point to the last node in a circular linked list. We need to append the
3535
// interleaved list to the end of the pending list by joining them into a
3636
// single, circular list.
37-
if (interleavedQueues !== null) {
38-
for (let i = 0; i < interleavedQueues.length; i++) {
39-
const queue = interleavedQueues[i];
37+
if (concurrentQueues !== null) {
38+
for (let i = 0; i < concurrentQueues.length; i++) {
39+
const queue = concurrentQueues[i];
4040
const lastInterleavedUpdate = queue.interleaved;
4141
if (lastInterleavedUpdate !== null) {
4242
queue.interleaved = null;
@@ -50,6 +50,6 @@ export function enqueueInterleavedUpdates() {
5050
queue.pending = (lastInterleavedUpdate: any);
5151
}
5252
}
53-
interleavedQueues = null;
53+
concurrentQueues = null;
5454
}
5555
}

packages/react-reconciler/src/ReactFiberHooks.new.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ import {
111111
createUpdate as createLegacyQueueUpdate,
112112
enqueueUpdate as enqueueLegacyQueueUpdate,
113113
entangleTransitions as entangleLegacyQueueTransitions,
114-
} from './ReactUpdateQueue.new';
115-
import {pushInterleavedQueue} from './ReactFiberInterleavedUpdates.new';
114+
} from './ReactFiberClassUpdateQueue.new';
115+
import {pushConcurrentUpdateQueue} from './ReactFiberConcurrentUpdates.new';
116116
import {getTreeId} from './ReactFiberTreeContext.new';
117117
import {now} from './Scheduler';
118118

@@ -2349,7 +2349,7 @@ function enqueueUpdate<S, A>(
23492349
update.next = update;
23502350
// At the end of the current render, this queue's interleaved updates will
23512351
// be transferred to the pending queue.
2352-
pushInterleavedQueue(queue);
2352+
pushConcurrentUpdateQueue(queue);
23532353
} else {
23542354
update.next = interleaved.next;
23552355
interleaved.next = update;

packages/react-reconciler/src/ReactFiberHooks.old.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ import {
111111
createUpdate as createLegacyQueueUpdate,
112112
enqueueUpdate as enqueueLegacyQueueUpdate,
113113
entangleTransitions as entangleLegacyQueueTransitions,
114-
} from './ReactUpdateQueue.old';
115-
import {pushInterleavedQueue} from './ReactFiberInterleavedUpdates.old';
114+
} from './ReactFiberClassUpdateQueue.old';
115+
import {pushConcurrentUpdateQueue} from './ReactFiberConcurrentUpdates.old';
116116
import {getTreeId} from './ReactFiberTreeContext.old';
117117
import {now} from './Scheduler';
118118

@@ -2349,7 +2349,7 @@ function enqueueUpdate<S, A>(
23492349
update.next = update;
23502350
// At the end of the current render, this queue's interleaved updates will
23512351
// be transferred to the pending queue.
2352-
pushInterleavedQueue(queue);
2352+
pushConcurrentUpdateQueue(queue);
23532353
} else {
23542354
update.next = interleaved.next;
23552355
interleaved.next = update;

packages/react-reconciler/src/ReactFiberNewContext.new.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import type {
1515
} from './ReactInternalTypes';
1616
import type {StackCursor} from './ReactFiberStack.new';
1717
import type {Lanes} from './ReactFiberLane.new';
18-
import type {SharedQueue} from './ReactUpdateQueue.new';
18+
import type {SharedQueue} from './ReactFiberClassUpdateQueue.new';
1919

2020
import {isPrimaryRenderer} from './ReactFiberHostConfig';
2121
import {createCursor, push, pop} from './ReactFiberStack.new';
@@ -39,7 +39,7 @@ import {
3939
} from './ReactFiberFlags';
4040

4141
import is from 'shared/objectIs';
42-
import {createUpdate, ForceUpdate} from './ReactUpdateQueue.new';
42+
import {createUpdate, ForceUpdate} from './ReactFiberClassUpdateQueue.new';
4343
import {markWorkInProgressReceivedUpdate} from './ReactFiberBeginWork.new';
4444
import {
4545
enableLazyContextPropagation,

packages/react-reconciler/src/ReactFiberNewContext.old.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import type {
1515
} from './ReactInternalTypes';
1616
import type {StackCursor} from './ReactFiberStack.old';
1717
import type {Lanes} from './ReactFiberLane.old';
18-
import type {SharedQueue} from './ReactUpdateQueue.old';
18+
import type {SharedQueue} from './ReactFiberClassUpdateQueue.old';
1919

2020
import {isPrimaryRenderer} from './ReactFiberHostConfig';
2121
import {createCursor, push, pop} from './ReactFiberStack.old';
@@ -39,7 +39,7 @@ import {
3939
} from './ReactFiberFlags';
4040

4141
import is from 'shared/objectIs';
42-
import {createUpdate, ForceUpdate} from './ReactUpdateQueue.old';
42+
import {createUpdate, ForceUpdate} from './ReactFiberClassUpdateQueue.old';
4343
import {markWorkInProgressReceivedUpdate} from './ReactFiberBeginWork.old';
4444
import {
4545
enableLazyContextPropagation,

packages/react-reconciler/src/ReactFiberReconciler.new.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ import {
7373
createUpdate,
7474
enqueueUpdate,
7575
entangleTransitions,
76-
} from './ReactUpdateQueue.new';
76+
} from './ReactFiberClassUpdateQueue.new';
7777
import {
7878
isRendering as ReactCurrentFiberIsRendering,
7979
current as ReactCurrentFiberCurrent,

packages/react-reconciler/src/ReactFiberReconciler.old.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ import {
7373
createUpdate,
7474
enqueueUpdate,
7575
entangleTransitions,
76-
} from './ReactUpdateQueue.old';
76+
} from './ReactFiberClassUpdateQueue.old';
7777
import {
7878
isRendering as ReactCurrentFiberIsRendering,
7979
current as ReactCurrentFiberCurrent,

packages/react-reconciler/src/ReactFiberRoot.new.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import {
3737
enableUpdaterTracking,
3838
enableTransitionTracing,
3939
} from 'shared/ReactFeatureFlags';
40-
import {initializeUpdateQueue} from './ReactUpdateQueue.new';
40+
import {initializeUpdateQueue} from './ReactFiberClassUpdateQueue.new';
4141
import {LegacyRoot, ConcurrentRoot} from './ReactRootTags';
4242
import {createCache, retainCache} from './ReactFiberCacheComponent.new';
4343

packages/react-reconciler/src/ReactFiberRoot.old.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import {
3737
enableUpdaterTracking,
3838
enableTransitionTracing,
3939
} from 'shared/ReactFeatureFlags';
40-
import {initializeUpdateQueue} from './ReactUpdateQueue.old';
40+
import {initializeUpdateQueue} from './ReactFiberClassUpdateQueue.old';
4141
import {LegacyRoot, ConcurrentRoot} from './ReactRootTags';
4242
import {createCache, retainCache} from './ReactFiberCacheComponent.old';
4343

packages/react-reconciler/src/ReactFiberThrow.new.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import type {Fiber} from './ReactInternalTypes';
1111
import type {FiberRoot} from './ReactInternalTypes';
1212
import type {Lane, Lanes} from './ReactFiberLane.new';
1313
import type {CapturedValue} from './ReactCapturedValue';
14-
import type {Update} from './ReactUpdateQueue.new';
14+
import type {Update} from './ReactFiberClassUpdateQueue.new';
1515
import type {Wakeable} from 'shared/ReactTypes';
1616
import type {SuspenseContext} from './ReactFiberSuspenseContext.new';
1717

@@ -48,7 +48,7 @@ import {
4848
CaptureUpdate,
4949
ForceUpdate,
5050
enqueueUpdate,
51-
} from './ReactUpdateQueue.new';
51+
} from './ReactFiberClassUpdateQueue.new';
5252
import {markFailedErrorBoundaryForHotReloading} from './ReactFiberHotReloading.new';
5353
import {
5454
suspenseStackCursor,

0 commit comments

Comments
 (0)