File tree 4 files changed +66
-0
lines changed
swc/tests/fixture/issues-7xxx/7622
swc_ecma_transforms_compat/src/es2015
4 files changed +66
-0
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "jsc" : {
3
+ "parser" : {
4
+ "syntax" : " typescript" ,
5
+ "tsx" : false
6
+ },
7
+ "target" : " es5" ,
8
+ "loose" : false ,
9
+ "minify" : {
10
+ "compress" : false ,
11
+ "mangle" : false
12
+ }
13
+ },
14
+ "module" : {
15
+ "type" : " es6"
16
+ },
17
+ "minify" : false ,
18
+ "isModule" : true
19
+ }
Original file line number Diff line number Diff line change
1
+ async function asyncWhile ( ) {
2
+ while ( true ) {
3
+ return { } ;
4
+ }
5
+ }
6
+
7
+ function * generatorWhile ( ) {
8
+ while ( true ) {
9
+ return { } ;
10
+ }
11
+ }
Original file line number Diff line number Diff line change
1
+ import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator" ;
2
+ import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator" ;
3
+ function asyncWhile ( ) {
4
+ return _asyncWhile . apply ( this , arguments ) ;
5
+ }
6
+ function _asyncWhile ( ) {
7
+ _asyncWhile = _async_to_generator ( function ( ) {
8
+ return _ts_generator ( this , function ( _state ) {
9
+ while ( true ) {
10
+ return [
11
+ 2 ,
12
+ { }
13
+ ] ;
14
+ }
15
+ return [
16
+ 2
17
+ ] ;
18
+ } ) ;
19
+ } ) ;
20
+ return _asyncWhile . apply ( this , arguments ) ;
21
+ }
22
+ function generatorWhile ( ) {
23
+ return _ts_generator ( this , function ( _state ) {
24
+ while ( true ) {
25
+ return [
26
+ 2 ,
27
+ { }
28
+ ] ;
29
+ }
30
+ return [
31
+ 2
32
+ ] ;
33
+ } ) ;
34
+ }
Original file line number Diff line number Diff line change @@ -1646,6 +1646,8 @@ impl Generator {
1646
1646
self . emit_break ( loop_label, None ) ;
1647
1647
self . end_loop_block ( ) ;
1648
1648
} else {
1649
+ node. visit_mut_children_with ( self ) ;
1650
+
1649
1651
self . emit_stmt ( Stmt :: While ( node) ) ;
1650
1652
}
1651
1653
}
You can’t perform that action at this time.
1 commit comments
github-actions[bot] commentedon Jul 6, 2023
Benchmark
es/full/bugs-1
285631
ns/iter (± 9151
)284707
ns/iter (± 4457
)1.00
es/full/minify/libraries/antd
1299990443
ns/iter (± 9999522
)1292419827
ns/iter (± 8397751
)1.01
es/full/minify/libraries/d3
276018893
ns/iter (± 7711417
)274510045
ns/iter (± 2849860
)1.01
es/full/minify/libraries/echarts
1050212355
ns/iter (± 5668307
)1038052979
ns/iter (± 10147049
)1.01
es/full/minify/libraries/jquery
84569114
ns/iter (± 104345
)83981707
ns/iter (± 77023
)1.01
es/full/minify/libraries/lodash
98474121
ns/iter (± 206667
)97444808
ns/iter (± 149222
)1.01
es/full/minify/libraries/moment
49770103
ns/iter (± 81741
)49412412
ns/iter (± 292727
)1.01
es/full/minify/libraries/react
17974112
ns/iter (± 27148
)17882151
ns/iter (± 38385
)1.01
es/full/minify/libraries/terser
217347994
ns/iter (± 423190
)216626454
ns/iter (± 563420
)1.00
es/full/minify/libraries/three
382722934
ns/iter (± 875748
)378063281
ns/iter (± 1989119
)1.01
es/full/minify/libraries/typescript
2637732672
ns/iter (± 11159058
)2632258384
ns/iter (± 7161476
)1.00
es/full/minify/libraries/victory
555289685
ns/iter (± 5146012
)549191598
ns/iter (± 1403559
)1.01
es/full/minify/libraries/vue
120487294
ns/iter (± 178237
)119372371
ns/iter (± 263475
)1.01
es/full/codegen/es3
35231
ns/iter (± 121
)34953
ns/iter (± 289
)1.01
es/full/codegen/es5
35191
ns/iter (± 67
)34903
ns/iter (± 126
)1.01
es/full/codegen/es2015
35214
ns/iter (± 124
)34865
ns/iter (± 65
)1.01
es/full/codegen/es2016
35150
ns/iter (± 129
)34827
ns/iter (± 96
)1.01
es/full/codegen/es2017
35200
ns/iter (± 114
)34784
ns/iter (± 101
)1.01
es/full/codegen/es2018
35224
ns/iter (± 269
)34750
ns/iter (± 72
)1.01
es/full/codegen/es2019
35201
ns/iter (± 82
)34772
ns/iter (± 114
)1.01
es/full/codegen/es2020
35038
ns/iter (± 192
)34775
ns/iter (± 51
)1.01
es/full/all/es3
173582531
ns/iter (± 691178
)173153029
ns/iter (± 735588
)1.00
es/full/all/es5
166407156
ns/iter (± 1801503
)165264456
ns/iter (± 985032
)1.01
es/full/all/es2015
123808368
ns/iter (± 710692
)123585199
ns/iter (± 897603
)1.00
es/full/all/es2016
123451891
ns/iter (± 632335
)122210780
ns/iter (± 736921
)1.01
es/full/all/es2017
122489359
ns/iter (± 626260
)121976629
ns/iter (± 933285
)1.00
es/full/all/es2018
120456655
ns/iter (± 773323
)119477215
ns/iter (± 933297
)1.01
es/full/all/es2019
120243183
ns/iter (± 667485
)119559385
ns/iter (± 1019338
)1.01
es/full/all/es2020
115203953
ns/iter (± 398041
)115120933
ns/iter (± 797575
)1.00
es/full/parser
530296
ns/iter (± 7536
)527625
ns/iter (± 6221
)1.01
es/full/base/fixer
20452
ns/iter (± 121
)17928
ns/iter (± 55
)1.14
es/full/base/resolver_and_hygiene
80917
ns/iter (± 268
)83299
ns/iter (± 244
)0.97
serialization of serde
323
ns/iter (± 0
)309
ns/iter (± 1
)1.05
css/minify/libraries/bootstrap
29087197
ns/iter (± 115607
)28585664
ns/iter (± 44523
)1.02
css/visitor/compare/clone
1635134
ns/iter (± 5499
)1657950
ns/iter (± 2164
)0.99
css/visitor/compare/visit_mut_span
1767527
ns/iter (± 4446
)1784793
ns/iter (± 2732
)0.99
css/visitor/compare/visit_mut_span_panic
1841931
ns/iter (± 4641
)1857215
ns/iter (± 5852
)0.99
css/visitor/compare/fold_span
2587739
ns/iter (± 11255
)2621487
ns/iter (± 12959
)0.99
css/visitor/compare/fold_span_panic
2747899
ns/iter (± 15412
)2771141
ns/iter (± 16074
)0.99
css/lexer/bootstrap_5_1_3
4431159
ns/iter (± 2961
)4458837
ns/iter (± 3832
)0.99
css/lexer/foundation_6_7_4
3743498
ns/iter (± 6706
)3758953
ns/iter (± 3602
)1.00
css/lexer/tailwind_3_1_1
711894
ns/iter (± 1324
)717410
ns/iter (± 726
)0.99
css/parser/bootstrap_5_1_3
20150085
ns/iter (± 106457
)19380377
ns/iter (± 48775
)1.04
css/parser/foundation_6_7_4
16373248
ns/iter (± 15862
)15528792
ns/iter (± 32096
)1.05
css/parser/tailwind_3_1_1
3109204
ns/iter (± 4501
)2972417
ns/iter (± 4649
)1.05
es/codegen/colors
735454
ns/iter (± 402299
)735237
ns/iter (± 401939
)1.00
es/codegen/large
3134841
ns/iter (± 1672154
)3140066
ns/iter (± 1673051
)1.00
es/codegen/with-parser/colors
43875
ns/iter (± 485
)44973
ns/iter (± 454
)0.98
es/codegen/with-parser/large
485170
ns/iter (± 811
)482584
ns/iter (± 911
)1.01
es/minify/libraries/antd
1127062273
ns/iter (± 6424099
)1119380799
ns/iter (± 5842027
)1.01
es/minify/libraries/d3
240882500
ns/iter (± 429114
)239380979
ns/iter (± 658556
)1.01
es/minify/libraries/echarts
899106257
ns/iter (± 2185040
)900321799
ns/iter (± 6403541
)1.00
es/minify/libraries/jquery
73851913
ns/iter (± 201799
)73455559
ns/iter (± 346250
)1.01
es/minify/libraries/lodash
88692400
ns/iter (± 197707
)88093294
ns/iter (± 116223
)1.01
es/minify/libraries/moment
43747803
ns/iter (± 51049
)43543679
ns/iter (± 67208
)1.00
es/minify/libraries/react
16134454
ns/iter (± 60816
)16082417
ns/iter (± 377240
)1.00
es/minify/libraries/terser
187114194
ns/iter (± 457520
)186542490
ns/iter (± 2072810
)1.00
es/minify/libraries/three
321131012
ns/iter (± 832124
)318170316
ns/iter (± 698752
)1.01
es/minify/libraries/typescript
2260071081
ns/iter (± 7206501
)2256574105
ns/iter (± 9661666
)1.00
es/minify/libraries/victory
467965910
ns/iter (± 1027463
)469445683
ns/iter (± 1247718
)1.00
es/minify/libraries/vue
107636332
ns/iter (± 186722
)107278571
ns/iter (± 174967
)1.00
es/visitor/compare/clone
1959977
ns/iter (± 4910
)1952787
ns/iter (± 7470
)1.00
es/visitor/compare/visit_mut_span
2301947
ns/iter (± 5222
)2285750
ns/iter (± 4872
)1.01
es/visitor/compare/visit_mut_span_panic
2331419
ns/iter (± 5300
)2312422
ns/iter (± 5879
)1.01
es/visitor/compare/fold_span
3365869
ns/iter (± 4709
)3342231
ns/iter (± 4107
)1.01
es/visitor/compare/fold_span_panic
3512774
ns/iter (± 10769
)3480468
ns/iter (± 5032
)1.01
es/lexer/colors
12606
ns/iter (± 65
)12603
ns/iter (± 37
)1.00
es/lexer/angular
6050152
ns/iter (± 16454
)5999114
ns/iter (± 4655
)1.01
es/lexer/backbone
777638
ns/iter (± 354
)775997
ns/iter (± 2455
)1.00
es/lexer/jquery
4418454
ns/iter (± 2159
)4387956
ns/iter (± 3344
)1.01
es/lexer/jquery mobile
6780992
ns/iter (± 4827
)6765671
ns/iter (± 10818
)1.00
es/lexer/mootools
3518056
ns/iter (± 6742
)3495895
ns/iter (± 1987
)1.01
es/lexer/underscore
649973
ns/iter (± 398
)643566
ns/iter (± 1025
)1.01
es/lexer/three
20861413
ns/iter (± 40956
)20797171
ns/iter (± 17184
)1.00
es/lexer/yui
3811789
ns/iter (± 4167
)3790128
ns/iter (± 4049
)1.01
es/parser/colors
26201
ns/iter (± 101
)26354
ns/iter (± 65
)0.99
es/parser/angular
13261755
ns/iter (± 35044
)13499319
ns/iter (± 60513
)0.98
es/parser/backbone
1967655
ns/iter (± 10216
)1986163
ns/iter (± 7307
)0.99
es/parser/jquery
10668990
ns/iter (± 47415
)10844575
ns/iter (± 50654
)0.98
es/parser/jquery mobile
16391725
ns/iter (± 34812
)16594432
ns/iter (± 43599
)0.99
es/parser/mootools
8225556
ns/iter (± 16670
)8365985
ns/iter (± 26520
)0.98
es/parser/underscore
1684166
ns/iter (± 9597
)1711675
ns/iter (± 9167
)0.98
es/parser/three
45501530
ns/iter (± 111633
)46321658
ns/iter (± 106607
)0.98
es/parser/yui
8133520
ns/iter (± 25939
)8252741
ns/iter (± 21616
)0.99
es/preset-env/usage/builtin_type
136765
ns/iter (± 32144
)138943
ns/iter (± 33215
)0.98
es/preset-env/usage/property
16811
ns/iter (± 39
)16750
ns/iter (± 59
)1.00
es/resolver/typescript
86390618
ns/iter (± 1210577
)88093657
ns/iter (± 1355267
)0.98
es/fixer/typescript
62078444
ns/iter (± 1212459
)63854651
ns/iter (± 654852
)0.97
es/hygiene/typescript
128696350
ns/iter (± 430447
)128501618
ns/iter (± 987561
)1.00
es/resolver_with_hygiene/typescript
237676785
ns/iter (± 1084554
)238355475
ns/iter (± 1080710
)1.00
es/visitor/base-perf/module_clone
59449
ns/iter (± 256
)60268
ns/iter (± 316
)0.99
es/visitor/base-perf/fold_empty
64208
ns/iter (± 231
)64539
ns/iter (± 278
)0.99
es/visitor/base-perf/fold_noop_impl_all
63764
ns/iter (± 241
)64128
ns/iter (± 414
)0.99
es/visitor/base-perf/fold_noop_impl_vec
64401
ns/iter (± 385
)64324
ns/iter (± 515
)1.00
es/visitor/base-perf/boxing_boxed_clone
57
ns/iter (± 0
)57
ns/iter (± 0
)1
es/visitor/base-perf/boxing_unboxed_clone
39
ns/iter (± 0
)39
ns/iter (± 0
)1
es/visitor/base-perf/boxing_boxed
109
ns/iter (± 0
)109
ns/iter (± 0
)1
es/visitor/base-perf/boxing_unboxed
80
ns/iter (± 0
)78
ns/iter (± 0
)1.03
es/visitor/base-perf/visit_empty
0
ns/iter (± 0
)0
ns/iter (± 0
)NaN
es/visitor/base-perf/visit_contains_this
2612
ns/iter (± 12
)2613
ns/iter (± 23
)1.00
es/base/parallel/resolver/typescript
3902177776
ns/iter (± 313180266
)4232761698
ns/iter (± 233019280
)0.92
es/base/parallel/hygiene/typescript
1431510204
ns/iter (± 15944366
)1428077275
ns/iter (± 13707865
)1.00
misc/visitors/time-complexity/time 5
148
ns/iter (± 0
)151
ns/iter (± 2
)0.98
misc/visitors/time-complexity/time 10
421
ns/iter (± 8
)430
ns/iter (± 19
)0.98
misc/visitors/time-complexity/time 15
885
ns/iter (± 1
)877
ns/iter (± 1
)1.01
misc/visitors/time-complexity/time 20
1287
ns/iter (± 5
)1288
ns/iter (± 3
)1.00
misc/visitors/time-complexity/time 40
4359
ns/iter (± 5
)4345
ns/iter (± 33
)1.00
misc/visitors/time-complexity/time 60
9039
ns/iter (± 20
)9029
ns/iter (± 13
)1.00
es/full-target/es2016
237092
ns/iter (± 1200
)238117
ns/iter (± 710
)1.00
es/full-target/es2017
225221
ns/iter (± 635
)226979
ns/iter (± 856
)0.99
es/full-target/es2018
213484
ns/iter (± 831
)215606
ns/iter (± 351
)0.99
es2020_nullish_coalescing
70739
ns/iter (± 5573
)70062
ns/iter (± 327
)1.01
es2020_optional_chaining
79418
ns/iter (± 413
)78746
ns/iter (± 291
)1.01
es2022_class_properties
120932
ns/iter (± 343
)120821
ns/iter (± 274
)1.00
es2018_object_rest_spread
77127
ns/iter (± 256
)75890
ns/iter (± 379
)1.02
es2019_optional_catch_binding
65521
ns/iter (± 351
)64034
ns/iter (± 159
)1.02
es2017_async_to_generator
64408
ns/iter (± 175
)64355
ns/iter (± 170
)1.00
es2016_exponentiation
69287
ns/iter (± 395
)68767
ns/iter (± 204
)1.01
es2015_arrow
71044
ns/iter (± 197
)71611
ns/iter (± 254
)0.99
es2015_block_scoped_fn
68474
ns/iter (± 174
)68929
ns/iter (± 272
)0.99
es2015_block_scoping
125216
ns/iter (± 604
)124036
ns/iter (± 782
)1.01
This comment was automatically generated by workflow using github-action-benchmark.