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

feat(es/minifier): Inline lazy inited vars in condition #6089

Merged
merged 1 commit into from Oct 10, 2022

Conversation

Austaras
Copy link
Member

@Austaras Austaras commented Oct 8, 2022

Description:
At the time of writing #5737, I thought such case would be rare. That is wrong.

BREAKING CHANGE:

Related issue (if exists):

e.get_mut().cond_init |= if !inited && e.get().var_initialized {
true
} else {
var_info.cond_init
};
if var_info.var_initialized {
if e.get().var_initialized || e.get().ref_count > 0 {
Copy link
Member Author

Choose a reason for hiding this comment

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

This line needs to happen before ref_count merge and after cond_init merge

@kdy1
Copy link
Member

kdy1 commented Oct 8, 2022

Sorry, I rebased this (to make it reviewable) because I made a mistake while trying codeball

kdy1
kdy1 previously approved these changes Oct 8, 2022
Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

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

Thank you!


swc-bump:

  • swc_ecma_minifier

Copy link
Contributor

@jridgewell jridgewell left a comment

Choose a reason for hiding this comment

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

We've eliminated some assignments, but there are still the declarations.

@kdy1 kdy1 merged commit 657e5b3 into swc-project:main Oct 10, 2022
@kdy1 kdy1 modified the milestones: Planned, v1.3.7 Oct 12, 2022
@swc-project swc-project locked as resolved and limited conversation to collaborators Nov 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants