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
Conversation
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 { |
There was a problem hiding this comment.
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
Sorry, I rebased this (to make it reviewable) because I made a mistake while trying codeball |
There was a problem hiding this 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
There was a problem hiding this 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.
Description:
At the time of writing #5737, I thought such case would be rare. That is wrong.
BREAKING CHANGE:
Related issue (if exists):