-
-
Notifications
You must be signed in to change notification settings - Fork 483
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(minifier): remove unnecessary "use strict" #8173
feat(minifier): remove unnecessary "use strict" #8173
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
CodSpeed Performance ReportMerging #8173 will not alter performanceComparing Summary
|
39eeb7b
to
fd9ef8b
Compare
/// Drop `"use strict";` directives if the function is empty. | ||
fn drop_use_strict_directives_if_function_is_empty( | ||
body: &mut FunctionBody<'a>, | ||
_ctx: &mut TraverseCtx<'a>, | ||
) { | ||
if body.statements.is_empty() { | ||
body.directives.retain(|directive| !directive.is_use_strict()); | ||
} | ||
} |
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'm not sure if it makes sense to exist in PeepholeRemoveDeadCode
. This has to run after everything that might remove statements.
f5a4570
to
fc43ec5
Compare
fd9ef8b
to
81378e3
Compare
…o PeepholeRemoveDeadCode
81378e3
to
ff48152
Compare
This is not ideal, I'll try something else later. |
No description provided.