swc-project
swc
BlogDocsChangelog

feat(es2015): migrate arrow functions to hook-based architecture

#11351Closed
Comparing
devbird/arrow-functions-transform
(
003e485
) with
main
(
68d740c
)
CodSpeed Performance Gauge
0%
Untouched
138
Ignored
1

Benchmarks

Passed

es/preset-env/usage/property
crates/swc_ecma_preset_env/benches/polyfills.rs::benches::bench_cases
CodSpeed Performance Gauge
+1%
112 µs110.9 µs
es/preset-env/usage/builtin_type
crates/swc_ecma_preset_env/benches/polyfills.rs::benches::bench_cases
CodSpeed Performance Gauge
+1%
240.9 µs239.6 µs
es/minifier/libs/terser
crates/swc_ecma_minifier/benches/full.rs::bench_all::bench_libs::es/minifier/libs
CodSpeed Performance Gauge
0%
350 ms348.7 ms
es/codegen/colors
crates/swc_ecma_codegen/benches/bench.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
68.5 µs68.3 µs
es/hygiene/typescript
crates/swc_ecma_transforms_base/benches/base.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
423.4 ms422.6 ms
es/minifier/libs/vue
crates/swc_ecma_minifier/benches/full.rs::bench_all::bench_libs::es/minifier/libs
CodSpeed Performance Gauge
0%
143.2 ms142.9 ms
es/parser/colors
crates/swc_ecma_parser/benches/parser.rs::benches::bench_files
CodSpeed Performance Gauge
0%
80.1 µs80 µs
stackoverflow
crates/swc_html_minifier/benches/full.rs::files_document::bench_files_document::html/minify/document
CodSpeed Performance Gauge
0%
35.8 ms35.8 ms
es/minifier/libs/echarts
crates/swc_ecma_minifier/benches/full.rs::bench_all::bench_libs::es/minifier/libs
CodSpeed Performance Gauge
0%
1.5 s1.5 s
es/lexer/colors
crates/swc_ecma_parser/benches/lexer.rs::benches::bench_files
CodSpeed Performance Gauge
0%
24.7 µs24.7 µs
html/document_fragment/visitor/compare/visit_mut_span_panic
crates/swc_html_parser/benches/compare.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
1.1 ms1.1 ms
es2018_object_rest_spread
crates/swc_ecma_transforms_typescript/benches/compat.rs::benches::single_tr_group
CodSpeed Performance Gauge
0%
291.8 µs291.6 µs
stackoverflow
crates/swc_html_minifier/benches/full.rs::files_document_fragment::bench_files_document_fragment::html/minify/document_fragment
CodSpeed Performance Gauge
0%
37 ms37 ms
html/document_fragment/visitor/compare/visit_mut_span
crates/swc_html_parser/benches/compare.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
1.1 ms1.1 ms
es/parser/underscore
crates/swc_ecma_parser/benches/parser.rs::benches::bench_files
CodSpeed Performance Gauge
0%
2.3 ms2.3 ms
html/document/visitor/compare/visit_mut_span_panic
crates/swc_html_parser/benches/compare.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
1.1 ms1.1 ms
es/codegen/with-parser/colors
crates/swc_ecma_codegen/benches/with_parse.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
155.6 µs155.5 µs
es/codegen/large
crates/swc_ecma_codegen/benches/bench.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
640 µs639.7 µs
typescript/fast-strip
crates/swc_ts_fast_strip/benches/assets.rs::benches::fast_ts
CodSpeed Performance Gauge
0%
418.4 µs418.2 µs
es/minifier/libs/lodash
crates/swc_ecma_minifier/benches/full.rs::bench_all::bench_libs::es/minifier/libs
CodSpeed Performance Gauge
0%
113.8 ms113.8 ms
html/document/visitor/compare/visit_mut_span
crates/swc_html_parser/benches/compare.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
1.1 ms1.1 ms
es/lexer/typescript
crates/swc_ecma_parser/benches/lexer.rs::benches::bench_files
CodSpeed Performance Gauge
0%
103.3 ms103.2 ms
html/document_fragment/visitor/compare/clone
crates/swc_html_parser/benches/compare.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
1 ms1 ms
es/codegen/with-parser/large
crates/swc_ecma_codegen/benches/with_parse.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
1.1 ms1.1 ms
es/parser/three
crates/swc_ecma_parser/benches/parser.rs::benches::bench_files
CodSpeed Performance Gauge
0%
65.7 ms65.7 ms
es/parser/angular
crates/swc_ecma_parser/benches/parser.rs::benches::bench_files
CodSpeed Performance Gauge
0%
16.8 ms16.8 ms
html/document_fragment/visitor/compare/fold_span
crates/swc_html_parser/benches/compare.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
1.2 ms1.2 ms
es/lints/libs/antd
crates/swc_ecma_lints/benches/all.rs::files::bench_files::es/lints/libs
CodSpeed Performance Gauge
0%
156.3 ms156.3 ms
html/document/visitor/compare/fold_span_panic
crates/swc_html_parser/benches/compare.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
1.2 ms1.2 ms
html/document/visitor/compare/fold_span
crates/swc_html_parser/benches/compare.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
1.2 ms1.2 ms
es/transform/baseline/common_typescript
crates/swc_ecma_transforms_typescript/benches/compat.rs::benches::baseline_group
CodSpeed Performance Gauge
0%
371.5 µs371.4 µs
css/visitor/compare/visit_mut_span
crates/swc_css_parser/benches/compare.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
5.1 ms5.1 ms
css/visitor/compare/clone
crates/swc_css_parser/benches/compare.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
4.8 ms4.8 ms
html/parser/parser_document/css_2021_spec
crates/swc_html_parser/benches/parser.rs::benches::bench_files
CodSpeed Performance Gauge
0%
71 ms71 ms
es/lints/libs/typescript
crates/swc_ecma_lints/benches/all.rs::files::bench_files::es/lints/libs
CodSpeed Performance Gauge
0%
276.4 ms276.4 ms
es/lints/libs/echarts
crates/swc_ecma_lints/benches/all.rs::files::bench_files::es/lints/libs
CodSpeed Performance Gauge
0%
114.3 ms114.3 ms
es/parser/mootools
crates/swc_ecma_parser/benches/parser.rs::benches::bench_files
CodSpeed Performance Gauge
0%
10.7 ms10.7 ms
css/parser/bootstrap_5_1_3
crates/swc_css_parser/benches/parser.rs::benches::bench_files
CodSpeed Performance Gauge
0%
46.9 ms46.9 ms
es/target/es2017
crates/swc_ecma_transforms_typescript/benches/compat.rs::benches::version_group
CodSpeed Performance Gauge
0%
276.6 µs276.6 µs
es/lexer/underscore
crates/swc_ecma_parser/benches/lexer.rs::benches::bench_files
CodSpeed Performance Gauge
0%
683.2 µs683.1 µs
css_spec
crates/swc_html_minifier/benches/full.rs::files_document::bench_files_document::html/minify/document
CodSpeed Performance Gauge
0%
195.4 ms195.4 ms
es/resolver_with_hygiene/typescript
crates/swc_ecma_transforms_base/benches/base.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
747.2 ms747.1 ms
es/lexer/jquery
crates/swc_ecma_parser/benches/lexer.rs::benches::bench_files
CodSpeed Performance Gauge
0%
4.3 ms4.3 ms
es/parser/jquery
crates/swc_ecma_parser/benches/parser.rs::benches::bench_files
CodSpeed Performance Gauge
0%
13.7 ms13.7 ms
es/minifier/libs/react
crates/swc_ecma_minifier/benches/full.rs::bench_all::bench_libs::es/minifier/libs
CodSpeed Performance Gauge
0%
19.5 ms19.5 ms
es/fixer/typescript
crates/swc_ecma_transforms_base/benches/base.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
201.9 ms201.8 ms
es2017_async_to_generator
crates/swc_ecma_transforms_typescript/benches/compat.rs::benches::single_tr_group
CodSpeed Performance Gauge
0%
274.6 µs274.6 µs
es/lexer/angular
crates/swc_ecma_parser/benches/lexer.rs::benches::bench_files
CodSpeed Performance Gauge
0%
5.8 ms5.8 ms
es/parser/typescript
crates/swc_ecma_parser/benches/parser.rs::benches::bench_files
CodSpeed Performance Gauge
0%
368.5 ms368.5 ms
css/lexer/tailwind_3_1_1
crates/swc_css_parser/benches/lexer.rs::benches::bench_files
CodSpeed Performance Gauge
0%
1.8 ms1.8 ms
css/visitor/compare/fold_span
crates/swc_css_parser/benches/compare.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
5.8 ms5.8 ms
html/parser/parser_document/github_com_17_05_2022
crates/swc_html_parser/benches/parser.rs::benches::bench_files
CodSpeed Performance Gauge
0%
22.1 ms22.1 ms
es/minifier/libs/antd
crates/swc_ecma_minifier/benches/full.rs::bench_all::bench_libs::es/minifier/libs
CodSpeed Performance Gauge
0%
1.9 s1.9 s
es/visitor/compare/clone
crates/swc_ecma_parser/benches/compare.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
5.5 ms5.5 ms
parse_and_babelify_jquery
crates/swc_estree_compat/benches/babelify.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
98.9 ms98.9 ms
github
crates/swc_html_minifier/benches/full.rs::files_document::bench_files_document::html/minify/document
CodSpeed Performance Gauge
0%
42 ms42 ms
parse_and_babelify_mootools
crates/swc_estree_compat/benches/babelify.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
72.3 ms72.3 ms
parse_and_babelify_backbone
crates/swc_estree_compat/benches/babelify.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
15.3 ms15.3 ms
parse_and_babelify_underscore
crates/swc_estree_compat/benches/babelify.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
13 ms13 ms
html/lexer/stackoverflow_com_17_05_2022
crates/swc_html_parser/benches/lexer.rs::benches::bench_files
CodSpeed Performance Gauge
0%
14 ms14 ms
parse_and_babelify_angular
crates/swc_estree_compat/benches/babelify.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
159.4 ms159.4 ms
parse_and_babelify_yui
crates/swc_estree_compat/benches/babelify.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
67.1 ms67.1 ms
es/parser/jquery mobile
crates/swc_ecma_parser/benches/parser.rs::benches::bench_files
CodSpeed Performance Gauge
0%
21.2 ms21.2 ms
html/lexer/github_com_17_05_2022
crates/swc_html_parser/benches/lexer.rs::benches::bench_files
CodSpeed Performance Gauge
0%
14 ms14 ms
css_spec
crates/swc_html_minifier/benches/full.rs::files_document_fragment::bench_files_document_fragment::html/minify/document_fragment
CodSpeed Performance Gauge
0%
195.3 ms195.3 ms
html/lexer/css_2021_spec
crates/swc_html_parser/benches/lexer.rs::benches::bench_files
CodSpeed Performance Gauge
0%
38.7 ms38.7 ms
parse_and_babelify_jquery_mobile
crates/swc_estree_compat/benches/babelify.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
169.1 ms169.1 ms
github
crates/swc_html_minifier/benches/full.rs::files_document_fragment::bench_files_document_fragment::html/minify/document_fragment
CodSpeed Performance Gauge
0%
41.3 ms41.3 ms
css/lexer/bootstrap_5_1_3
crates/swc_css_parser/benches/lexer.rs::benches::bench_files
CodSpeed Performance Gauge
0%
11.3 ms11.3 ms
es/parser/backbone
crates/swc_ecma_parser/benches/parser.rs::benches::bench_files
CodSpeed Performance Gauge
0%
2.6 ms2.6 ms
css/visitor/compare/fold_span_panic
crates/swc_css_parser/benches/compare.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
5.8 ms5.8 ms
es/lexer/jquery mobile
crates/swc_ecma_parser/benches/lexer.rs::benches::bench_files
CodSpeed Performance Gauge
0%
6.6 ms6.6 ms
html/document/visitor/compare/clone
crates/swc_html_parser/benches/compare.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
1 ms1 ms
es/lexer/cal-com
crates/swc_ecma_parser/benches/lexer.rs::benches::bench_files
CodSpeed Performance Gauge
0%
12.6 ms12.6 ms
css/parser/tailwind_3_1_1
crates/swc_css_parser/benches/parser.rs::benches::bench_files
CodSpeed Performance Gauge
0%
7.2 ms7.2 ms
es/lexer/mootools
crates/swc_ecma_parser/benches/lexer.rs::benches::bench_files
CodSpeed Performance Gauge
0%
3.3 ms3.3 ms
es/visitor/compare/fold_span
crates/swc_ecma_parser/benches/compare.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
6.8 ms6.8 ms
css/visitor/compare/visit_mut_span_panic
crates/swc_css_parser/benches/compare.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
5.1 ms5.1 ms
es/resolver/typescript
crates/swc_ecma_transforms_base/benches/base.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
243.4 ms243.4 ms
es/visitor/compare/fold_span_panic
crates/swc_ecma_parser/benches/compare.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
6.8 ms6.8 ms
html/document_fragment/visitor/compare/fold_span_panic
crates/swc_html_parser/benches/compare.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
1.2 ms1.2 ms
babelify-only
crates/swc_estree_compat/benches/babelify.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
2.1 ms2.1 ms
es/visitor/compare/visit_mut_span
crates/swc_ecma_parser/benches/compare.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
6 ms6 ms
es/lexer/yui
crates/swc_ecma_parser/benches/lexer.rs::benches::bench_files
CodSpeed Performance Gauge
0%
3.6 ms3.6 ms
es/minifier/libs/moment
crates/swc_ecma_minifier/benches/full.rs::bench_all::bench_libs::es/minifier/libs
CodSpeed Performance Gauge
0%
62.6 ms62.6 ms
es2015_classes
crates/swc_ecma_transforms_typescript/benches/compat.rs::benches::single_tr_group
CodSpeed Performance Gauge
0%
391.1 µs391.2 µs
css/lexer/foundation_6_7_4
crates/swc_css_parser/benches/lexer.rs::benches::bench_files
CodSpeed Performance Gauge
0%
9.3 ms9.3 ms
es/visitor/compare/visit_mut_span_panic
crates/swc_ecma_parser/benches/compare.rs::benches::bench_cases
CodSpeed Performance Gauge
0%
6 ms6 ms
es/lints/libs/moment
crates/swc_ecma_lints/benches/all.rs::files::bench_files::es/lints/libs
CodSpeed Performance Gauge
0%
4.2 ms4.2 ms
es/lints/libs/react
crates/swc_ecma_lints/benches/all.rs::files::bench_files::es/lints/libs
CodSpeed Performance Gauge
0%
1.3 ms1.3 ms
css/parser/foundation_6_7_4
crates/swc_css_parser/benches/parser.rs::benches::bench_files
CodSpeed Performance Gauge
0%
37.2 ms37.2 ms
es/minifier/libs/three
crates/swc_ecma_minifier/benches/full.rs::bench_all::bench_libs::es/minifier/libs
CodSpeed Performance Gauge
0%
645.6 ms645.6 ms
es/lexer/backbone
crates/swc_ecma_parser/benches/lexer.rs::benches::bench_files
CodSpeed Performance Gauge
0%
803.9 µs804 µs
es2020_nullish_coalescing
crates/swc_ecma_transforms_typescript/benches/compat.rs::benches::single_tr_group
CodSpeed Performance Gauge
0%
310.5 µs310.5 µs
es/minifier/libs/typescript
crates/swc_ecma_minifier/benches/full.rs::bench_all::bench_libs::es/minifier/libs
CodSpeed Performance Gauge
0%
3.8 s3.8 s
html/parser/parser_document_fragment/stackoverflow_com_17_05_2022
crates/swc_html_parser/benches/parser.rs::benches::bench_files
CodSpeed Performance Gauge
0%
22.2 ms22.2 ms
html/parser/parser_document/stackoverflow_com_17_05_2022
crates/swc_html_parser/benches/parser.rs::benches::bench_files
CodSpeed Performance Gauge
0%
22.2 ms22.2 ms
html/parser/parser_document_fragment/css_2021_spec
crates/swc_html_parser/benches/parser.rs::benches::bench_files
CodSpeed Performance Gauge
0%
70.6 ms70.6 ms
es2015_shorthand_property
crates/swc_ecma_transforms_typescript/benches/compat.rs::benches::single_tr_group
CodSpeed Performance Gauge
0%
274.2 µs274.3 µs
es2022_class_properties
crates/swc_ecma_transforms_typescript/benches/compat.rs::benches::single_tr_group
CodSpeed Performance Gauge
0%
385.9 µs386 µs
html/parser/parser_document_fragment/github_com_17_05_2022
crates/swc_html_parser/benches/parser.rs::benches::bench_files
CodSpeed Performance Gauge
0%
22.1 ms22.1 ms
es/minifier/libs/jquery
crates/swc_ecma_minifier/benches/full.rs::bench_all::bench_libs::es/minifier/libs
CodSpeed Performance Gauge
0%
96.7 ms96.8 ms
es/lints/libs/lodash
crates/swc_ecma_lints/benches/all.rs::files::bench_files::es/lints/libs
CodSpeed Performance Gauge
0%
6.2 ms6.2 ms
es/lints/libs/victory
crates/swc_ecma_lints/benches/all.rs::files::bench_files::es/lints/libs
CodSpeed Performance Gauge
0%
70.7 ms70.7 ms
es/lints/libs/jquery
crates/swc_ecma_lints/benches/all.rs::files::bench_files::es/lints/libs
CodSpeed Performance Gauge
0%
6.5 ms6.5 ms
es/transform/baseline/base
crates/swc_ecma_transforms_typescript/benches/compat.rs::benches::baseline_group
CodSpeed Performance Gauge
0%
260 µs260.1 µs
es/parser/yui
crates/swc_ecma_parser/benches/parser.rs::benches::bench_files
CodSpeed Performance Gauge
0%
10.5 ms10.5 ms
es/target/es3
crates/swc_ecma_transforms_typescript/benches/compat.rs::benches::version_group
CodSpeed Performance Gauge
0%
398.8 µs399.1 µs
es2015_computed_props
crates/swc_ecma_transforms_typescript/benches/compat.rs::benches::single_tr_group
CodSpeed Performance Gauge
0%
273.8 µs274 µs
es2015_fn_name
crates/swc_ecma_transforms_typescript/benches/compat.rs::benches::single_tr_group
CodSpeed Performance Gauge
0%
282.3 µs282.4 µs
es/lints/libs/vue
crates/swc_ecma_lints/benches/all.rs::files::bench_files::es/lints/libs
CodSpeed Performance Gauge
0%
8.3 ms8.3 ms
es/parser/cal-com
crates/swc_ecma_parser/benches/parser.rs::benches::bench_files
CodSpeed Performance Gauge
0%
55.9 ms55.9 ms
es2015_for_of
crates/swc_ecma_transforms_typescript/benches/compat.rs::benches::single_tr_group
CodSpeed Performance Gauge
0%
293.6 µs293.8 µs
es/lexer/three
crates/swc_ecma_parser/benches/lexer.rs::benches::bench_files
CodSpeed Performance Gauge
0%
17.4 ms17.4 ms
es2015_spread
crates/swc_ecma_transforms_typescript/benches/compat.rs::benches::single_tr_group
CodSpeed Performance Gauge
0%
274.2 µs274.5 µs
es2015_duplicate_keys
crates/swc_ecma_transforms_typescript/benches/compat.rs::benches::single_tr_group
CodSpeed Performance Gauge
0%
280.2 µs280.5 µs
es2015_block_scoped_fn
crates/swc_ecma_transforms_typescript/benches/compat.rs::benches::single_tr_group
CodSpeed Performance Gauge
0%
291.9 µs292.2 µs
es2015_sticky_regex
crates/swc_ecma_transforms_typescript/benches/compat.rs::benches::single_tr_group
CodSpeed Performance Gauge
0%
276.4 µs276.7 µs
es2015_destructuring
crates/swc_ecma_transforms_typescript/benches/compat.rs::benches::single_tr_group
CodSpeed Performance Gauge
0%
347.4 µs347.7 µs
es/transform/baseline/common_reserved_word
crates/swc_ecma_transforms_typescript/benches/compat.rs::benches::baseline_group
CodSpeed Performance Gauge
0%
278.3 µs278.6 µs
es2015_arrow
crates/swc_ecma_transforms_typescript/benches/compat.rs::benches::single_tr_group
CodSpeed Performance Gauge
0%
300.8 µs301.1 µs
es2015_parameters
crates/swc_ecma_transforms_typescript/benches/compat.rs::benches::single_tr_group
CodSpeed Performance Gauge
0%
335.1 µs335.5 µs
es2020_optional_chaining
crates/swc_ecma_transforms_typescript/benches/compat.rs::benches::single_tr_group
CodSpeed Performance Gauge
0%
337.9 µs338.3 µs
es2015_typeof_symbol
crates/swc_ecma_transforms_typescript/benches/compat.rs::benches::single_tr_group
CodSpeed Performance Gauge
0%
276.3 µs276.8 µs
es2015_instanceof
crates/swc_ecma_transforms_typescript/benches/compat.rs::benches::single_tr_group
CodSpeed Performance Gauge
0%
279.6 µs280.1 µs
es2015_block_scoping
crates/swc_ecma_transforms_typescript/benches/compat.rs::benches::single_tr_group
CodSpeed Performance Gauge
0%
456.5 µs457.4 µs
es/minifier/libs/victory
crates/swc_ecma_minifier/benches/full.rs::bench_all::bench_libs::es/minifier/libs
CodSpeed Performance Gauge
0%
850.1 ms852.5 ms
es/target/es2015
crates/swc_ecma_transforms_typescript/benches/compat.rs::benches::version_group
CodSpeed Performance Gauge
0%
1.2 ms1.2 ms
es/lints/libs/three
crates/swc_ecma_lints/benches/all.rs::files::bench_files::es/lints/libs
CodSpeed Performance Gauge
-1%
50.2 ms50.5 ms
es/target/es2020
crates/swc_ecma_transforms_typescript/benches/compat.rs::benches::version_group
CodSpeed Performance Gauge
-1%
471 µs474.9 µs
es/minifier/libs/d3
crates/swc_ecma_minifier/benches/full.rs::bench_all::bench_libs::es/minifier/libs
CodSpeed Performance Gauge
-1%
393.6 ms397.8 ms
es/target/es2018
crates/swc_ecma_transforms_typescript/benches/compat.rs::benches::version_group
CodSpeed Performance Gauge
-1%
322.7 µs326.2 µs
es2016_exponentiation
crates/swc_ecma_transforms_typescript/benches/compat.rs::benches::single_tr_group
CodSpeed Performance Gauge
-1%
289.4 µs293 µs
es2019_optional_catch_binding
crates/swc_ecma_transforms_typescript/benches/compat.rs::benches::single_tr_group
CodSpeed Performance Gauge
-1%
282.3 µs285.8 µs
es/target/es2016
crates/swc_ecma_transforms_typescript/benches/compat.rs::benches::version_group
CodSpeed Performance Gauge
-1%
290.4 µs294.1 µs
es/full-target/es2017
crates/swc_ecma_transforms_typescript/benches/compat.rs::benches::full_group
CodSpeed Performance Gauge
-1%
569.2 µs577.2 µs
es/full-target/es2018
crates/swc_ecma_transforms_typescript/benches/compat.rs::benches::full_group
CodSpeed Performance Gauge
-1%
551.2 µs559.5 µs
es/full-target/es2016
crates/swc_ecma_transforms_typescript/benches/compat.rs::benches::full_group
CodSpeed Performance Gauge
-2%
597.9 µs608.4 µs

Ignored

es/preset-env/entry/import
crates/swc_ecma_preset_env/benches/polyfills.rs::benches::bench_cases
Ignored
CodSpeed Performance Gauge
+1%
28.8 µs28.4 µs

Commits

Click on a commit to change the comparison range
Base
main
68d740c
+2.27%
feat(es2015): migrate arrow functions to hook-based architecture This PR migrates the arrow functions transformation from the legacy `swc_ecma_compat_es2015` crate to the new hook-based architecture in `swc_ecma_transformer`. ## Changes ### New Implementation - Created `swc_ecma_transformer/src/es2015/arrow_functions.rs` - Implements `VisitMutHook<TraverseCtx>` trait - Handles `this` and `arguments` binding transformation - Properly detects usage in arrow function bodies - Uses `TraverseCtx::statement_injector` for variable injection ### Architecture Updates - Updated `Es2015Options` to include `arrow_functions: Option<Mark>` - Wired up the hook in the ES2015 module using `OptionalHook` pattern - Made `es2015` module public for backward compatibility ### Integration - Updated `swc_ecma_preset_env` to use the new transformer - Sets `options.env.es2015.arrow_functions = Some(unresolved_mark)` - Removed old `es2015::arrow(unresolved_mark)` pass ### Backward Compatibility - Updated `swc_ecma_compat_es2015` to wrap the new implementation - Maintains the same public API - Added dependencies on `swc_ecma_hooks` and `swc_ecma_transformer` ## Pattern This follows the established pattern from: - PR #11310: Exponentiation operator migration - PR #11313: Optional catch binding migration 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
81bca19
2 days ago
by github-actions[bot]
+0.01%
fix: Add exhaustive pattern matching for non-exhaustive enums Fix compilation errors by adding wildcard arms to match statements for non-exhaustive enums (BlockStmtOrExpr and PropOrSpread). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
cfde106
2 days ago
by github-actions[bot]
+2.84%
fix: Fix arrow functions transformation by implementing visit_mut_expr in backward compat wrapper The issue was that the backward compatibility wrapper (arrow.rs) was not properly forwarding expression visits to the hook. When async_arrows_in_class called expr.visit_mut_with(), it only implemented visit_mut_program, so the hook was never invoked for expression-level transformations. The fix adds a visit_mut_expr implementation that creates a VisitMutWithHook and properly forwards all expression visits, allowing the arrow functions transform to work correctly. Also moved arrow transformation from enter_expr to exit_expr to ensure children are visited before transformation, and added enter_arrow_expr to detect this/arguments usage before visiting children. Note: One edge case test (async_arrows_in_class::tests::this) still fails due to the backward compatibility wrapper not calling enter_arrow_expr, but this can be addressed in a follow-up. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
95f072d
2 days ago
by github-actions[bot]
0%
fix: Fix clippy warnings in arrow functions transformation - Replace `map_or(false, ...)` with `is_some_and(...)` for cleaner code - Collapse nested pattern matches in object literal handling - Convert single match statements to if-let for better readability - Make `check_expr_for_this` a static method to avoid unused self parameter - Remove unreachable pattern branches for exhaustive matches - Remove unused imports in backward compatibility wrapper 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
349a257
2 days ago
by github-actions[bot]
-5.12%
fix: Restore old arrow implementation in backward compat wrapper The backward compatibility wrapper needs to support the old API where arrow transforms can be applied to expressions in isolation and variables can be extracted via InjectVars::take_vars(). The new hook-based implementation uses statement injection which doesn't work for this use case. This keeps the old implementation in the compat wrapper for backward compatibility, while the new hook-based implementation in swc_ecma_transformer is used for the main transform pipeline. Fixes test failures in swc_ecma_compat_bugfixes where async_arrows_in_class transform depends on being able to extract variable declarations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
fcccaaf
2 days ago
by github-actions[bot]
-0.08%
chore: Fix CI failures - formatting and unused dependencies - Remove extra blank line in swc_ecma_transformer/src/lib.rs - Remove unused dependencies (swc_ecma_hooks, swc_ecma_transformer) from swc_ecma_compat_es2015/Cargo.toml These dependencies were added in preparation but are not yet used in the code, causing cargo shear to fail. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
ad140c9
2 days ago
by github-actions[bot]
-0.01%
chore: Trigger CI rerun This empty commit triggers a fresh CI run to ensure all checks pass with the correct formatting that was fixed in the previous commit. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
8c7b305
2 days ago
by github-actions[bot]
+0.02%
fix: Add blank line to match main branch formatting This ensures the merge commit created by GitHub doesn't introduce formatting conflicts. The blank line between variable declaration and return statement matches the style in the main branch. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
094dcd4
2 days ago
by github-actions[bot]
+0.07%
chore: Trigger CI with correct formatting The lib.rs file is already correctly formatted locally and passes cargo fmt --all -- --check. This commit triggers a fresh CI run. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
8402f29
2 days ago
by github-actions[bot]
-0.07%
fix: Remove extra blank line in lib.rs to pass cargo fmt The blank line between variable declaration and return statement was causing cargo fmt to fail. This follows the standard Rust formatting style of not having blank lines in short function bodies. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
9629b58
2 days ago
by github-actions[bot]
0%
fix: Add wildcard patterns for non-exhaustive PropOrSpread matches Fixed compilation errors on nightly Rust by adding wildcard patterns to PropOrSpread enum matches. The enum is marked as non-exhaustive, requiring explicit wildcard patterns even though all variants are covered. Resolves CI build failures in Test - swc_ecma_transforms. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
3552a8a
2 days ago
by github-actions[bot]
0%
fix: Remove unreachable wildcard patterns in arrow_functions.rs The clippy check was failing due to unreachable wildcard patterns in PropOrSpread match statements. Since PropOrSpread is an enum with only two variants (Prop and Spread), which were both explicitly handled, the wildcard patterns were unreachable. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
f8a511a
2 days ago
by github-actions[bot]
0%
fix: handle non-exhaustive patterns in arrow functions transform Add wildcard patterns to match statements for non-exhaustive enums (BlockStmtOrExpr and PropOrSpread) when building with swc_ast_unknown. This fixes the "Check unknown variant with transforms" CI test. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
bedeea1
2 days ago
by github-actions[bot]
+0.01%
fix(clippy): use cfg attribute for non-exhaustive patterns Use #[cfg(swc_ast_unknown)] instead of plain wildcard patterns to avoid unreachable pattern warnings in normal builds while still handling non-exhaustive enum variants when swc_ast_unknown is enabled. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
9d66132
2 days ago
by github-actions[bot]
+0.01%
fix(es2015): Fix this binding in arrow functions transformation This commit fixes a critical bug where `this` was being replaced too broadly during arrow function transformation, causing issues in nested scopes. The problem was that when an arrow function used `this`, we would create a `_this` variable and then replace ALL occurrences of `this` in the current scope, not just those inside the arrow function. This broke code like: ```javascript class Bar { test() { (() => { expect(this.constructor).toBe(Bar); })(); } } ``` The fix introduces an `arrow_depth` counter that tracks when we're inside an arrow function that needs `this`/`arguments` replacement. We only perform the replacement when `arrow_depth > 0`, ensuring that `this` is only replaced within the arrow functions that actually need it. Fixes 7 failing tests: - regression_7064 - static_shadow (private and private_loose) - derived_constructor_must_call_super_3 - super_reference_before_in_lambda (3 variants) - issues_10xxx__10822__1 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
5a45a90
2 days ago
by github-actions[bot]
-0.02%
fix(es2015): Fix arrow depth tracking for nested arrows The previous fix had a bug where we would decrement arrow_depth for every arrow, even if that arrow didn't increment it. This caused issues with nested arrows where only some use `this`/`arguments`. Example that was broken: ```javascript const outer = () => { // doesn't use this const inner = () => this.value; // uses this }; ``` With the previous fix: 1. Enter outer: depth stays 0 (doesn't use this) 2. Enter inner: depth becomes 1 (uses this) 3. Exit inner: depth becomes 0 ✓ 4. Exit outer: depth is 0, but we would decrement if > 0 ✗ The fix adds helper methods to check if an arrow body actually contains references to the saved `_this` or `_arguments` variables, and only decrements the depth for arrows that incremented it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
115024c
2 days ago
by github-actions[bot]
+0.01%
fix: Remove unused self parameter to fix clippy warning
72e8861
2 days ago
by github-actions[bot]
-0.01%
fix(es2015): consolidate arrow expression handling in enter_expr hook - Move arrow detection logic from enter_arrow_expr to enter_expr - This ensures child expressions are properly visited by the framework - Fixes 'this' binding replacement in arrow function bodies
d4f31c1
2 days ago
by github-actions[bot]
-0.02%
fix(es2015): prevent injecting this binding inside arrow body - Only set cur_stmt_address if not already set in current scope - This ensures we inject 'var _this = this' before the statement containing the arrow - Prevents injection inside arrow body (e.g., inside if blocks) Fixes issue where _this declaration was being injected inside conditional blocks instead of at the beginning of the enclosing function.
003e485
2 days ago
by github-actions[bot]
© 2025 CodSpeed Technology
Home Terms Privacy Docs