Skip to content

Commit 9e5adea

Browse files
committed
Update
[ghstack-poisoned]
1 parent 87936e3 commit 9e5adea

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

compiler/packages/babel-plugin-react-compiler/src/HIR/CollectHoistablePropertyLoads.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export function collectHoistablePropertyLoads(
6767
temporaries: ReadonlyMap<IdentifierId, ReactiveScopeDependency>,
6868
): ReadonlyMap<ScopeId, BlockInfo> {
6969
const nodes = collectPropertyLoadsInBlocks(fn, temporaries);
70-
deriveNonNull(fn, nodes);
70+
propagateNonNull(fn, nodes);
7171

7272
const nodesKeyedByScopeId = new Map<ScopeId, BlockInfo>();
7373
for (const [_, block] of fn.body.blocks) {
@@ -295,7 +295,7 @@ function collectPropertyLoadsInBlocks(
295295
return nodes;
296296
}
297297

298-
function deriveNonNull(
298+
function propagateNonNull(
299299
fn: HIRFunction,
300300
nodes: ReadonlyMap<BlockId, BlockInfo>,
301301
): void {
@@ -316,7 +316,7 @@ function deriveNonNull(
316316
* can assume are non-null can be calculated from the following:
317317
* X = Union(Intersect(X_neighbors), X)
318318
*/
319-
function recursivelyDeriveNonNull(
319+
function recursivelyPropagateNonNull(
320320
nodeId: BlockId,
321321
direction: 'forward' | 'backward',
322322
traversalState: Map<BlockId, 'active' | 'done'>,
@@ -347,7 +347,7 @@ function deriveNonNull(
347347
let changed = false;
348348
for (const pred of neighbors) {
349349
if (!traversalState.has(pred)) {
350-
const neighborChanged = recursivelyDeriveNonNull(
350+
const neighborChanged = recursivelyPropagateNonNull(
351351
pred,
352352
direction,
353353
traversalState,
@@ -407,7 +407,7 @@ function deriveNonNull(
407407
i++;
408408
changed = false;
409409
for (const [blockId] of fn.body.blocks) {
410-
const forwardChanged = recursivelyDeriveNonNull(
410+
const forwardChanged = recursivelyPropagateNonNull(
411411
blockId,
412412
'forward',
413413
traversalState,
@@ -417,7 +417,7 @@ function deriveNonNull(
417417
}
418418
traversalState.clear();
419419
for (const [blockId] of reversedBlocks) {
420-
const backwardChanged = recursivelyDeriveNonNull(
420+
const backwardChanged = recursivelyPropagateNonNull(
421421
blockId,
422422
'backward',
423423
traversalState,

0 commit comments

Comments
 (0)