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(es/minifier): Fix ordering issue of analyzer #6150
Conversation
cc @Austaras Do you think this analyzer patch is correct? |
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.
swc-bump:
- swc_ecma_minifier
|
||
v.var_initialized |= has_init; | ||
}) | ||
.or_insert_with(|| VarUsageInfo { |
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 is problematic because this closure is not called if the analyzer called .var_or_default()
for the infection analysis
Looks fine to me, but why tests changed? |
Because See #6150 (comment) |
"use strict"; | ||
_class_call_check(this, C), this.prop = i; | ||
}; | ||
arr.push(C); | ||
}); |
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.
I see. In this case arr
used to be marked as var_kind
None
.
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.
Yeah and that's why it was not inlined I guess
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.
Automated review comment generated by auto-rebase script
Description:
This is the groundwork for a parallel analyzer. This PR fixes the ordering issue of the analyzer so that the analyzer works identically regardless of visit order. This patch contains some improvements because previously, we mixed
.and_modify()
and.or_default()
.Related issue: