-
-
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/lexer): Fix lexing of
\r\n
in JSX (#9112)
**Description:** I made a mistake while working on the performance of the lexer. **Related issue:** - Closes #9106
- Loading branch information
Showing
29 changed files
with
195 additions
and
179 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,6 @@ type ü = { | |
}; | ||
export const SomeComponent = ({ name, value }: ü)=>{ | ||
return (<div> | ||
|
||
{name} {value} | ||
|
||
</div>); | ||
}; |
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
Oops, something went wrong.
2a0ebec
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
es/full/bugs-1
270442
ns/iter (± 13154
)277173
ns/iter (± 3123
)0.98
es/full/minify/libraries/antd
1716887723
ns/iter (± 43867530
)2021256199
ns/iter (± 35238005
)0.85
es/full/minify/libraries/d3
342924588
ns/iter (± 2561096
)400983199
ns/iter (± 12235885
)0.86
es/full/minify/libraries/echarts
1434099561
ns/iter (± 17698202
)1698521459
ns/iter (± 14264891
)0.84
es/full/minify/libraries/jquery
102976141
ns/iter (± 300267
)107116522
ns/iter (± 1154548
)0.96
es/full/minify/libraries/lodash
113755629
ns/iter (± 169433
)117693311
ns/iter (± 799943
)0.97
es/full/minify/libraries/moment
59938850
ns/iter (± 86060
)61114027
ns/iter (± 533841
)0.98
es/full/minify/libraries/react
18446416
ns/iter (± 81707
)18640865
ns/iter (± 78001
)0.99
es/full/minify/libraries/terser
274340822
ns/iter (± 967863
)295637335
ns/iter (± 6653613
)0.93
es/full/minify/libraries/three
463370751
ns/iter (± 2421115
)516700125
ns/iter (± 17966877
)0.90
es/full/minify/libraries/typescript
3183782063
ns/iter (± 30010833
)3467015277
ns/iter (± 31725111
)0.92
es/full/minify/libraries/victory
714011468
ns/iter (± 11734855
)927838972
ns/iter (± 39615392
)0.77
es/full/minify/libraries/vue
145206836
ns/iter (± 334022
)152618463
ns/iter (± 2073321
)0.95
es/full/codegen/es3
58239
ns/iter (± 164
)58486
ns/iter (± 801
)1.00
es/full/codegen/es5
58569
ns/iter (± 179
)58576
ns/iter (± 294
)1.00
es/full/codegen/es2015
58746
ns/iter (± 113
)58364
ns/iter (± 253
)1.01
es/full/codegen/es2016
58314
ns/iter (± 157
)58402
ns/iter (± 145
)1.00
es/full/codegen/es2017
58973
ns/iter (± 260
)58662
ns/iter (± 208
)1.01
es/full/codegen/es2018
58489
ns/iter (± 155
)58644
ns/iter (± 197
)1.00
es/full/codegen/es2019
58616
ns/iter (± 151
)58597
ns/iter (± 3260
)1.00
es/full/codegen/es2020
58833
ns/iter (± 315
)58561
ns/iter (± 141
)1.00
es/full/all/es3
157758779
ns/iter (± 985014
)157133177
ns/iter (± 1789592
)1.00
es/full/all/es5
153731483
ns/iter (± 720953
)151619886
ns/iter (± 604305
)1.01
es/full/all/es2015
112627500
ns/iter (± 1116244
)112133018
ns/iter (± 1098222
)1.00
es/full/all/es2016
112450022
ns/iter (± 766282
)110438045
ns/iter (± 917714
)1.02
es/full/all/es2017
111204957
ns/iter (± 599960
)110908602
ns/iter (± 1355052
)1.00
es/full/all/es2018
109965725
ns/iter (± 1918626
)108810907
ns/iter (± 494710
)1.01
es/full/all/es2019
109086433
ns/iter (± 818932
)108168131
ns/iter (± 712287
)1.01
es/full/all/es2020
104292022
ns/iter (± 773632
)104256302
ns/iter (± 888590
)1.00
es/full/parser
444015
ns/iter (± 3121
)431710
ns/iter (± 4078
)1.03
es/full/base/fixer
16294
ns/iter (± 105
)15446
ns/iter (± 71
)1.05
es/full/base/resolver_and_hygiene
81131
ns/iter (± 238
)80600
ns/iter (± 1476
)1.01
serialization of serde
279
ns/iter (± 1
)277
ns/iter (± 0
)1.01
css/minify/libraries/bootstrap
21475231
ns/iter (± 797266
)22238628
ns/iter (± 105460
)0.97
css/visitor/compare/clone
1375342
ns/iter (± 5885
)1400672
ns/iter (± 32630
)0.98
css/visitor/compare/visit_mut_span
1502363
ns/iter (± 5971
)1515462
ns/iter (± 8962
)0.99
css/visitor/compare/visit_mut_span_panic
1504003
ns/iter (± 15885
)1547505
ns/iter (± 23122
)0.97
css/visitor/compare/fold_span
2006474
ns/iter (± 4547
)2037770
ns/iter (± 24482
)0.98
css/visitor/compare/fold_span_panic
2163356
ns/iter (± 7602
)2177527
ns/iter (± 10344
)0.99
css/lexer/bootstrap_5_1_3
3431631
ns/iter (± 8866
)3461278
ns/iter (± 3977
)0.99
css/lexer/foundation_6_7_4
2782641
ns/iter (± 3788
)2798925
ns/iter (± 3780
)0.99
css/lexer/tailwind_3_1_1
535193
ns/iter (± 1735
)537324
ns/iter (± 397
)1.00
css/parser/bootstrap_5_1_3
15990038
ns/iter (± 15370
)16465476
ns/iter (± 108424
)0.97
css/parser/foundation_6_7_4
12862349
ns/iter (± 22146
)13224686
ns/iter (± 184168
)0.97
css/parser/tailwind_3_1_1
2545342
ns/iter (± 4087
)2559935
ns/iter (± 76565
)0.99
es/codegen/colors
727853
ns/iter (± 395496
)713533
ns/iter (± 392528
)1.02
es/codegen/large
2946798
ns/iter (± 1583387
)2993809
ns/iter (± 1594560
)0.98
es/codegen/with-parser/colors
40548
ns/iter (± 181
)40100
ns/iter (± 357
)1.01
es/codegen/with-parser/large
453298
ns/iter (± 1033
)454318
ns/iter (± 2074
)1.00
es/minify/libraries/antd
1393869602
ns/iter (± 23373623
)1606835714
ns/iter (± 29863722
)0.87
es/minify/libraries/d3
279815136
ns/iter (± 7163527
)342369096
ns/iter (± 10411455
)0.82
es/minify/libraries/echarts
1127560915
ns/iter (± 7336894
)1351446103
ns/iter (± 21104288
)0.83
es/minify/libraries/jquery
81870742
ns/iter (± 166809
)85503316
ns/iter (± 887153
)0.96
es/minify/libraries/lodash
103008807
ns/iter (± 142004
)106710375
ns/iter (± 764583
)0.97
es/minify/libraries/moment
47837555
ns/iter (± 72144
)49813025
ns/iter (± 308882
)0.96
es/minify/libraries/react
16077200
ns/iter (± 133182
)16466208
ns/iter (± 98178
)0.98
es/minify/libraries/terser
215145000
ns/iter (± 353522
)225249824
ns/iter (± 3637426
)0.96
es/minify/libraries/three
357261892
ns/iter (± 1112865
)389704275
ns/iter (± 12480790
)0.92
es/minify/libraries/typescript
2684733007
ns/iter (± 23394229
)2788212828
ns/iter (± 19339216
)0.96
es/minify/libraries/victory
560446346
ns/iter (± 12669310
)621960278
ns/iter (± 9885942
)0.90
es/minify/libraries/vue
120124270
ns/iter (± 1069947
)122037783
ns/iter (± 587103
)0.98
es/visitor/compare/clone
1743637
ns/iter (± 7798
)1734482
ns/iter (± 5819
)1.01
es/visitor/compare/visit_mut_span
2088335
ns/iter (± 14586
)2079191
ns/iter (± 4051
)1.00
es/visitor/compare/visit_mut_span_panic
2092295
ns/iter (± 24364
)2080330
ns/iter (± 18392
)1.01
es/visitor/compare/fold_span
2831404
ns/iter (± 37914
)2789725
ns/iter (± 28484
)1.01
es/visitor/compare/fold_span_panic
2909695
ns/iter (± 42561
)2840355
ns/iter (± 4291
)1.02
es/lexer/colors
8713
ns/iter (± 45
)8340
ns/iter (± 30
)1.04
es/lexer/angular
4343006
ns/iter (± 33939
)4179101
ns/iter (± 17673
)1.04
es/lexer/backbone
635918
ns/iter (± 911
)632825
ns/iter (± 1716
)1.00
es/lexer/jquery
3695685
ns/iter (± 21085
)3553245
ns/iter (± 47074
)1.04
es/lexer/jquery mobile
5389079
ns/iter (± 10031
)5372204
ns/iter (± 16210
)1.00
es/lexer/mootools
2891683
ns/iter (± 11736
)2867453
ns/iter (± 25638
)1.01
es/lexer/underscore
544019
ns/iter (± 350
)536916
ns/iter (± 1228
)1.01
es/lexer/three
16272988
ns/iter (± 79837
)15816124
ns/iter (± 28621
)1.03
es/lexer/yui
2814652
ns/iter (± 11868
)2748313
ns/iter (± 26890
)1.02
es/lexer/cal-com
13457136
ns/iter (± 92624
)13031928
ns/iter (± 75376
)1.03
es/lexer/typescript
96840588
ns/iter (± 349129
)93208211
ns/iter (± 528816
)1.04
es/parser/colors
23128
ns/iter (± 91
)22616
ns/iter (± 138
)1.02
es/parser/angular
12144626
ns/iter (± 79984
)11809496
ns/iter (± 73510
)1.03
es/parser/backbone
1849225
ns/iter (± 9432
)1838841
ns/iter (± 5698
)1.01
es/parser/jquery
10307739
ns/iter (± 87761
)10106111
ns/iter (± 74314
)1.02
es/parser/jquery mobile
15945679
ns/iter (± 274985
)15249862
ns/iter (± 102120
)1.05
es/parser/mootools
7943225
ns/iter (± 40558
)7896697
ns/iter (± 11465
)1.01
es/parser/underscore
1615888
ns/iter (± 4877
)1601474
ns/iter (± 5946
)1.01
es/parser/three
47338168
ns/iter (± 318554
)43817144
ns/iter (± 234933
)1.08
es/parser/yui
7369330
ns/iter (± 58166
)7289518
ns/iter (± 62907
)1.01
es/parser/cal-com
43288711
ns/iter (± 339095
)39512786
ns/iter (± 191423
)1.10
es/parser/typescript
278582252
ns/iter (± 867181
)273422593
ns/iter (± 1877005
)1.02
es/preset-env/usage/builtin_type
136670
ns/iter (± 33874
)137753
ns/iter (± 34887
)0.99
es/preset-env/usage/property
15524
ns/iter (± 145
)16855
ns/iter (± 90
)0.92
es/resolver/typescript
99579415
ns/iter (± 2052676
)98826119
ns/iter (± 2082414
)1.01
es/fixer/typescript
80753978
ns/iter (± 3386976
)81532087
ns/iter (± 3414532
)0.99
es/hygiene/typescript
178433330
ns/iter (± 3644674
)178319055
ns/iter (± 4199745
)1.00
es/resolver_with_hygiene/typescript
301659317
ns/iter (± 3417388
)301361275
ns/iter (± 4418534
)1.00
es/visitor/base-perf/module_clone
55853
ns/iter (± 1031
)56303
ns/iter (± 449
)0.99
es/visitor/base-perf/fold_empty
59517
ns/iter (± 749
)59423
ns/iter (± 655
)1.00
es/visitor/base-perf/fold_noop_impl_all
59310
ns/iter (± 912
)59477
ns/iter (± 730
)1.00
es/visitor/base-perf/fold_noop_impl_vec
58986
ns/iter (± 980
)59658
ns/iter (± 538
)0.99
es/visitor/base-perf/boxing_boxed_clone
60
ns/iter (± 0
)59
ns/iter (± 0
)1.02
es/visitor/base-perf/boxing_unboxed_clone
49
ns/iter (± 0
)47
ns/iter (± 0
)1.04
es/visitor/base-perf/boxing_boxed
106
ns/iter (± 0
)105
ns/iter (± 0
)1.01
es/visitor/base-perf/boxing_unboxed
83
ns/iter (± 0
)82
ns/iter (± 0
)1.01
es/visitor/base-perf/visit_contains_this
2620
ns/iter (± 4
)2669
ns/iter (± 31
)0.98
es/base/parallel/resolver/typescript
2435181251
ns/iter (± 132565966
)2429459406
ns/iter (± 133204166
)1.00
es/base/parallel/hygiene/typescript
3199912161
ns/iter (± 44312676
)3236122155
ns/iter (± 42381377
)0.99
babelify-only
499681
ns/iter (± 16069
)493119
ns/iter (± 6583
)1.01
parse_and_babelify_angular
42425845
ns/iter (± 1896448
)41729039
ns/iter (± 4185410
)1.02
parse_and_babelify_backbone
4383668
ns/iter (± 133450
)4426418
ns/iter (± 162895
)0.99
parse_and_babelify_jquery
28493179
ns/iter (± 468178
)29464522
ns/iter (± 308205
)0.97
parse_and_babelify_jquery_mobile
51919100
ns/iter (± 872400
)52188167
ns/iter (± 638211
)0.99
parse_and_babelify_mootools
25943540
ns/iter (± 271046
)26657431
ns/iter (± 332858
)0.97
parse_and_babelify_underscore
3682857
ns/iter (± 9871
)3702607
ns/iter (± 20242
)0.99
parse_and_babelify_yui
23805352
ns/iter (± 574152
)26741635
ns/iter (± 1563673
)0.89
html/minify/document/css_spec
45117276
ns/iter (± 141180
)45388248
ns/iter (± 159652
)0.99
html/minify/document/github
18065852
ns/iter (± 26741
)18189977
ns/iter (± 83273
)0.99
html/minify/document/stackoverflow
16396169
ns/iter (± 61342
)16567800
ns/iter (± 671215
)0.99
html/minify/document_fragment/css_spec
44153697
ns/iter (± 133371
)44265506
ns/iter (± 64738
)1.00
html/minify/document_fragment/github
17799633
ns/iter (± 25112
)17862388
ns/iter (± 70645
)1.00
html/minify/document_fragment/stackoverflow
16247271
ns/iter (± 36637
)16183072
ns/iter (± 19273
)1.00
html/document/visitor/compare/clone
165586
ns/iter (± 2712
)164146
ns/iter (± 1989
)1.01
html/document/visitor/compare/visit_mut_span
181403
ns/iter (± 1269
)179951
ns/iter (± 1095
)1.01
html/document/visitor/compare/visit_mut_span_panic
187782
ns/iter (± 8472
)185856
ns/iter (± 3583
)1.01
html/document/visitor/compare/fold_span
224396
ns/iter (± 1920
)230277
ns/iter (± 1876
)0.97
html/document/visitor/compare/fold_span_panic
276049
ns/iter (± 2948
)279438
ns/iter (± 745
)0.99
html/document_fragment/visitor/compare/clone
163274
ns/iter (± 1128
)164661
ns/iter (± 824
)0.99
html/document_fragment/visitor/compare/visit_mut_span
178840
ns/iter (± 1600
)181005
ns/iter (± 2268
)0.99
html/document_fragment/visitor/compare/visit_mut_span_panic
186259
ns/iter (± 545
)186043
ns/iter (± 1019
)1.00
html/document_fragment/visitor/compare/fold_span
228105
ns/iter (± 2134
)231619
ns/iter (± 1143
)0.98
html/document_fragment/visitor/compare/fold_span_panic
277690
ns/iter (± 675
)278859
ns/iter (± 1645
)1.00
html/lexer/css_2021_spec
13081346
ns/iter (± 23416
)12902935
ns/iter (± 20881
)1.01
html/lexer/github_com_17_05_2022
4966134
ns/iter (± 48620
)4967659
ns/iter (± 106560
)1.00
html/lexer/stackoverflow_com_17_05_2022
4742863
ns/iter (± 48843
)4707214
ns/iter (± 5792
)1.01
html/parser/parser_document/css_2021_spec
25686927
ns/iter (± 94589
)26761724
ns/iter (± 104740
)0.96
html/parser/parser_document/github_com_17_05_2022
8583346
ns/iter (± 28978
)8664231
ns/iter (± 18426
)0.99
html/parser/parser_document/stackoverflow_com_17_05_2022
7504690
ns/iter (± 24864
)7569119
ns/iter (± 14644
)0.99
html/parser/parser_document_fragment/css_2021_spec
25528096
ns/iter (± 71251
)26654758
ns/iter (± 231912
)0.96
html/parser/parser_document_fragment/github_com_17_05_2022
8643234
ns/iter (± 7078
)8714091
ns/iter (± 16960
)0.99
html/parser/parser_document_fragment/stackoverflow_com_17_05_2022
7480995
ns/iter (± 53998
)7621768
ns/iter (± 20508
)0.98
This comment was automatically generated by workflow using github-action-benchmark.