Skip to content

Commit 01693b6

Browse files
committed
Update on "[compiler][hir] Correctly remove non-existent terminal preds when pruning labels"
Missed this initially in `pruneUnusedLabelsHIR`. It wasn't an active bug as `preds` wasn't referenced by later passes, until #30079 [ghstack-poisoned]
2 parents b1db59f + 0d13220 commit 01693b6

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)