-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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): Abort seq inliner if a same var is defined in outer scope #7772
Conversation
usage.ref_count += 1; | ||
} | ||
self.data.vars.insert((id.0, *ctx), usage); | ||
} |
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.
The improvement of output come from here.
…er function scope
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_utils
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
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.
reset ci
… scope (swc-project#7772) **Description:** The algorithm here is directly copied from terser, I don't if it's correct or can be improved, but it does fix the issue. **Related issue:** - Closes swc-project#7749
…ned (#7804) **Description:** It turns out that the original implementation of `infect`is incomplete because it cannot cover function param, and the new implementation introduced in #7772 is redundant because what [terser](https://github.com/terser/terser/blob/master/lib/compress/tighten-body.js#L909C18-L909C28) do is basically checking `fn_local` **Related issue:** - Closes #7784
Description:
The algorithm here is directly copied from terser, I don't if it's correct or can be improved, but it does fixes the issue.
Related issue: