Skip to content

Conversation

@sapphi-red
Copy link
Member

@sapphi-red sapphi-red commented Oct 15, 2025

@github-actions github-actions bot added A-minifier Area - Minifier C-bug Category - Bug labels Oct 15, 2025
Copy link
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

@sapphi-red sapphi-red requested a review from Boshen October 15, 2025 04:15
@sapphi-red sapphi-red marked this pull request as ready for review October 15, 2025 04:16
Copilot AI review requested due to automatic review settings October 15, 2025 04:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 a and e within 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-hq
Copy link

codspeed-hq bot commented Oct 15, 2025

CodSpeed Performance Report

Merging #14613 will not alter performance

Comparing 10-15-fix_minifier_bail_out_arguments_copy_loop_substitution_if_the_temporary_variables_are_referenced_outside_the_for_loop (1bf83eb) with main (1b58521)1

Summary

✅ 33 untouched
⏩ 4 skipped2

Footnotes

  1. No successful run was found on main (5e0ab1b) during the generation of this report, so 1b58521 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 4 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Oct 15, 2025
Copy link
Member

Boshen commented Oct 15, 2025

Merge activity

…porary variables are referenced outside the for loop (#14613)

fixes rolldown/rolldown#6458
refs #13114
@graphite-app graphite-app bot force-pushed the 10-15-fix_minifier_bail_out_arguments_copy_loop_substitution_if_the_temporary_variables_are_referenced_outside_the_for_loop branch from 1597011 to 1bf83eb Compare October 15, 2025 05:30
@graphite-app graphite-app bot merged commit 1bf83eb into main Oct 15, 2025
27 checks passed
@graphite-app graphite-app bot deleted the 10-15-fix_minifier_bail_out_arguments_copy_loop_substitution_if_the_temporary_variables_are_referenced_outside_the_for_loop branch October 15, 2025 05:36
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Oct 15, 2025
@lazka
Copy link

lazka commented Oct 15, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-minifier Area - Minifier C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: minify bug: assignment to undeclared variable

4 participants