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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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 renamed to packages/react-reconciler/src/ReactFiberClassUpdateQueue.new.js

Lines changed: 2 additions & 2 deletions
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 renamed to packages/react-reconciler/src/ReactFiberClassUpdateQueue.old.js

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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 renamed to packages/react-reconciler/src/ReactFiberConcurrentUpdates.new.js

Lines changed: 11 additions & 11 deletions
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
}

0 commit comments

Comments
 (0)