-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(es/minifier): Prepend/append correctly (#3367)
swc_ecma_minifier: - Add some assertions for injections. - Fix prepend/append logic of statements.
- Loading branch information
Showing
6 changed files
with
100 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
crates/swc/tests/tsc-references/exportCodeGen_es5.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
.../tsc-references/genericCallToOverloadedMethodWithOverloadedArguments_es2015.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
var m11, m21, m31, m41, m51, m6; | ||
m1 = m11 || (m11 = {}), (void 0).then(testFunction), m2 = m21 || (m21 = {}), (void 0).then(testFunction), m3 = m31 || (m31 = {}), (void 0).then(testFunction), m4 = m41 || (m41 = {}), (void 0).then(testFunction), m5 = m51 || (m51 = {}), (void 0).then(testFunction), m6 || (m6 = {}), (void 0).then(testFunction); | ||
var m1, m2, m3, m4, m5, m6; | ||
m1 || (m1 = {}), (void 0).then(testFunction), m2 || (m2 = {}), (void 0).then(testFunction), m3 || (m3 = {}), (void 0).then(testFunction), m4 || (m4 = {}), (void 0).then(testFunction), m5 || (m5 = {}), (void 0).then(testFunction), m6 || (m6 = {}), (void 0).then(testFunction); |
4 changes: 2 additions & 2 deletions
4
...sts/tsc-references/genericCallToOverloadedMethodWithOverloadedArguments_es5.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
var m11, m21, m31, m41, m51, m6; | ||
m1 = m11 || (m11 = {}), (void 0).then(testFunction), m2 = m21 || (m21 = {}), (void 0).then(testFunction), m3 = m31 || (m31 = {}), (void 0).then(testFunction), m4 = m41 || (m41 = {}), (void 0).then(testFunction), m5 = m51 || (m51 = {}), (void 0).then(testFunction), m6 || (m6 = {}), (void 0).then(testFunction); | ||
var m1, m2, m3, m4, m5, m6; | ||
m1 || (m1 = {}), (void 0).then(testFunction), m2 || (m2 = {}), (void 0).then(testFunction), m3 || (m3 = {}), (void 0).then(testFunction), m4 || (m4 = {}), (void 0).then(testFunction), m5 || (m5 = {}), (void 0).then(testFunction), m6 || (m6 = {}), (void 0).then(testFunction); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
703972d
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.
Benchmark
full_es2015
227227449
ns/iter (± 21785755
)168508742
ns/iter (± 14377732
)1.35
full_es2016
246081883
ns/iter (± 17362878
)174846463
ns/iter (± 18316763
)1.41
full_es2017
242279023
ns/iter (± 16094027
)170760902
ns/iter (± 16472025
)1.42
full_es2018
240469738
ns/iter (± 20441378
)171273620
ns/iter (± 17291228
)1.40
full_es2019
241294783
ns/iter (± 19663616
)169813817
ns/iter (± 19731378
)1.42
full_es2020
204232444
ns/iter (± 14953471
)156542729
ns/iter (± 12899006
)1.30
full_es3
294298864
ns/iter (± 21397607
)222253049
ns/iter (± 20920857
)1.32
full_es5
305781933
ns/iter (± 25772766
)213942890
ns/iter (± 25815550
)1.43
parser
948125
ns/iter (± 219447
)654749
ns/iter (± 143468
)1.45
This comment was automatically generated by workflow using github-action-benchmark.