fix(minifier): bail out arguments copy loop substitution if the temporary variables are referenced outside the for loop#14613
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a bug in the minifier's arguments copy loop substitution optimization where temporary variables referenced outside the for loop were incorrectly being optimized away. The fix adds proper validation to ensure variables are only referenced within the loop before applying the substitution.
Key changes:
- Add reference counting for temporary variables
aandewithin the for loop - Implement validation to bail out of optimization if variables are referenced outside the loop
- Refactor return types to use enum for better type safety
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
CodSpeed Performance ReportMerging #14613 will not alter performanceComparing Summary
Footnotes
|
Merge activity
|
…porary variables are referenced outside the for loop (#14613) fixes rolldown/rolldown#6458 refs #13114
1597011 to
1bf83eb
Compare
|
Thanks! |

fixes rolldown/rolldown#6458
refs #13114