Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(minifier): collapse variables when join_vars option is true #6226

Conversation

DonIsaac
Copy link
Contributor

@DonIsaac DonIsaac commented Oct 1, 2024

The variable collapse AST pass was only collapsing declarations when CompressOptions::join_vars was true, and skipping when false. This does not follow the behavior documented for this option. This PR fixes this.

Copy link
Contributor Author

DonIsaac commented Oct 1, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @DonIsaac and the rest of your teammates on Graphite Graphite

Copy link

graphite-app bot commented Oct 1, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “0-merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@DonIsaac DonIsaac added the C-bug Category - Bug label Oct 1, 2024 — with Graphite App
@DonIsaac DonIsaac marked this pull request as ready for review October 1, 2024 17:37
Copy link

codspeed-hq bot commented Oct 1, 2024

CodSpeed Performance Report

Merging #6226 will not alter performance

Comparing don/10-01-fix_minifier_collapse_variables_when_join_vars_option_is_true (ea896ec) with main (4b42047)

Summary

✅ 29 untouched benchmarks

@DonIsaac DonIsaac force-pushed the don/10-01-fix_minifier_collapse_variables_when_join_vars_option_is_true branch from 2b9838c to ea896ec Compare October 1, 2024 17:43
@DonIsaac DonIsaac changed the title fix(minifier): collapse variables when join_vars option is true fix(minifier): collapse variables when join_vars option is true Oct 1, 2024
@overlookmotel
Copy link
Contributor

I don't know the minifier at all, so I think best leave Boshen to review this.

@overlookmotel overlookmotel removed their request for review October 1, 2024 22:19
@Boshen Boshen marked this pull request as draft October 2, 2024 01:39
@Boshen Boshen self-assigned this Oct 2, 2024
@7086cmd
Copy link
Contributor

7086cmd commented Oct 7, 2024

It appears that the test262 breakage is caused by the void x declaration. However, surprisingly, this pass does not address the void x issue at all!

@Boshen
Copy link
Member

Boshen commented Oct 13, 2024

closed by #6464

@Boshen Boshen closed this Oct 13, 2024
@Boshen Boshen deleted the don/10-01-fix_minifier_collapse_variables_when_join_vars_option_is_true branch October 13, 2024 15:02
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.

4 participants