-
-
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
feat(es/minifier): Inline lazy inited vars #5737
Conversation
6b34d63
to
95bf24b
Compare
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!
I'm worried about some test changes
crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/conditional_nested_3/output.js
Outdated
Show resolved
Hide resolved
97c21c8
to
57a427b
Compare
Seems like it has a noticeable impact on performance.
|
How to do benchmark? However I'm afraid performance cost is unavoidable |
Can't we store it in |
To run benchmark, you can do |
I know where is wrong. I'll fix it tonight |
Can you rebase, please? |
a1462d3
to
93f9299
Compare
crates/swc/tests/tsc-references/privateNameComputedPropertyName2(target=es2022).2.minified.js
Outdated
Show resolved
Hide resolved
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.
Thanks!
crates/swc_ecma_minifier/tests/fixture/issues/firebase-core/1/output.js
Outdated
Show resolved
Hide resolved
a0775dd
to
e2f1e4d
Compare
Some personal TODO export function TinyColor(v, i) {
var mod,
r1,
g1,
rgb1 =
((r1 = [v, v, v, v, v, v][(mod = i % 6)]),
(g1 = [v, v, v, v, v, v][mod]),
{
r: 255 * r1,
g: 255 * g1,
b: 255 * [p, p, t, v, v, q][mod],
});
this.isValid = rgb1.ok;
} export function x() {
var b, c
c = (b = x(), console.log(), b)
console.log(c)
} seems both are about sequence expression |
Can you rebase? |
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.
Changes look good.
Thank you!
swc-bump:
- swc_ecma_minifier
Description:
BREAKING CHANGE:
Related issue (if exists):
related #5559