Skip to content

Commit eca7846

Browse files
committed
Update on "[compiler][patch] Patch O(n^2) traversal in validatePreserveMemo"
Double checked by syncing internally and verifying the # of `visitInstruction` calls with unique `InstructionId`s. This is a bit of an awkward pattern though. A cleaner alternative might be to override `visitValue` and store its results in a sidemap (instead of returning) [ghstack-poisoned]
2 parents 761bef9 + 8094e4f commit eca7846

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export function pruneUnusedLabelsHIR(fn: HIRFunction): void {
6969
}
7070

7171
for (const [_, block] of fn.body.blocks) {
72-
for (const pred of [...block.preds]) {
72+
for (const pred of block.preds) {
7373
const rewritten = rewrites.get(pred);
7474
if (rewritten != null) {
7575
block.preds.delete(pred);

0 commit comments

Comments
 (0)