-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(es/compat): Change pass ordering of
es2015
(#4029)
**Description:** We should apply `regenerator` after `block_scoping` because `regenerator` does not know how to handle `const`s. **Related issue:** - Closes #3006
- Loading branch information
Showing
13 changed files
with
41 additions
and
24 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
blacklisted-names = ["bool", "char", "str", "f32", "f64", "i8", "i16", "i32", "i64", "u8", "u16", "u32", "u64", "isize", "usize"] | ||
cognitive-complexity-threshold = 50 | ||
msrv = "1.58" | ||
type-complexity-threshold = 25000 |
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
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
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
6 changes: 6 additions & 0 deletions
6
crates/swc_ecma_transforms_compat/tests/async-to-generator/issue-3006/exec.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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
async function a() { | ||
for (const number_in_a_sequence of Array.from(new Array(7), (_, i) => i)) { | ||
setTimeout(() => console.log(number_in_a_sequence), 10) | ||
} | ||
} | ||
a() |
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
3 changes: 3 additions & 0 deletions
3
crates/swc_ecma_transforms_compat/tests/for-of/issue-3006/1/exec.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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (const number_in_a_sequence of Array.from(new Array(7), (_, i) => i)) { | ||
setTimeout(() => console.log(number_in_a_sequence), 10) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
nightly-2022-02-23 | ||
nightly-2022-03-12 |
e19a60a
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
base_tr_fixer
27052
ns/iter (± 447
)22210
ns/iter (± 751
)1.22
base_tr_resolver_and_hygiene
109512
ns/iter (± 20977
)91901
ns/iter (± 9013
)1.19
codegen_es2015
35737
ns/iter (± 197
)27767
ns/iter (± 199
)1.29
codegen_es2016
35581
ns/iter (± 208
)27713
ns/iter (± 243
)1.28
codegen_es2017
35735
ns/iter (± 200
)27739
ns/iter (± 177
)1.29
codegen_es2018
35746
ns/iter (± 194
)27641
ns/iter (± 176
)1.29
codegen_es2019
36988
ns/iter (± 1698
)27643
ns/iter (± 154
)1.34
codegen_es2020
35935
ns/iter (± 740
)27659
ns/iter (± 227
)1.30
codegen_es3
35856
ns/iter (± 728
)27393
ns/iter (± 241
)1.31
codegen_es5
35766
ns/iter (± 533
)27462
ns/iter (± 310
)1.30
full_es2015
157494905
ns/iter (± 9495374
)136313683
ns/iter (± 14557834
)1.16
full_es2016
159340989
ns/iter (± 13717754
)135077479
ns/iter (± 5884726
)1.18
full_es2017
158594116
ns/iter (± 9152330
)136134649
ns/iter (± 6824306
)1.16
full_es2018
156516865
ns/iter (± 5724229
)129790430
ns/iter (± 7739716
)1.21
full_es2019
155505484
ns/iter (± 7604364
)126033588
ns/iter (± 6144735
)1.23
full_es2020
148719957
ns/iter (± 12445748
)116215039
ns/iter (± 3101287
)1.28
full_es3
213887906
ns/iter (± 8960061
)180050115
ns/iter (± 4644360
)1.19
full_es5
201278553
ns/iter (± 8295478
)170149473
ns/iter (± 5103280
)1.18
parser
663622
ns/iter (± 19719
)540854
ns/iter (± 17435
)1.23
ser_ast_node
177
ns/iter (± 2
)151
ns/iter (± 2
)1.17
ser_serde
176
ns/iter (± 1
)145
ns/iter (± 1
)1.21
emit_colors
13407410
ns/iter (± 9475344
)4969549
ns/iter (± 3487441
)2.70
emit_large
120860895
ns/iter (± 180720308
)121924818
ns/iter (± 183229827
)0.99
base_clone
3518846
ns/iter (± 592081
)2507259
ns/iter (± 23714
)1.40
fold_span
5399863
ns/iter (± 575284
)4080971
ns/iter (± 81634
)1.32
fold_span_panic
5542598
ns/iter (± 395353
)3935121
ns/iter (± 54964
)1.41
visit_mut_span
3737451
ns/iter (± 445610
)2687845
ns/iter (± 13352
)1.39
visit_mut_span_panic
4048501
ns/iter (± 627388
)2740659
ns/iter (± 35531
)1.48
usage_builtin_type
19076263
ns/iter (± 11953119
)14733129
ns/iter (± 9183134
)1.29
usage_property
456536
ns/iter (± 7948
)352364
ns/iter (± 1057
)1.30
boxing_boxed
160
ns/iter (± 0
)135
ns/iter (± 15
)1.19
boxing_boxed_clone
84
ns/iter (± 0
)77
ns/iter (± 0
)1.09
boxing_unboxed
145
ns/iter (± 1
)116
ns/iter (± 1
)1.25
boxing_unboxed_clone
76
ns/iter (± 0
)72
ns/iter (± 0
)1.06
time_10
367
ns/iter (± 4
)294
ns/iter (± 2
)1.25
time_15
882
ns/iter (± 60
)634
ns/iter (± 2
)1.39
time_20
1418
ns/iter (± 18
)1239
ns/iter (± 3
)1.14
time_40
4909
ns/iter (± 50
)7015
ns/iter (± 17
)0.70
time_5
120
ns/iter (± 2
)94
ns/iter (± 0
)1.28
time_60
10338
ns/iter (± 75
)15915
ns/iter (± 50
)0.65
es2015
10940108
ns/iter (± 69489
)total
0
ns/iter (± 0
)0
ns/iter (± 0
)NaN
This comment was automatically generated by workflow using github-action-benchmark.
e19a60a
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.
Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold
2
.emit_colors
13407410
ns/iter (± 9475344
)4969549
ns/iter (± 3487441
)2.70
This comment was automatically generated by workflow using github-action-benchmark.
CC: @kdy1