Skip to content

Commit

Permalink
fix(es): Remove wrong debug assertion (#4445)
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 authored Apr 26, 2022
1 parent 3428694 commit 962cf4a
Show file tree
Hide file tree
Showing 857 changed files with 42 additions and 7 deletions.
7 changes: 0 additions & 7 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,3 @@
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged

# Remove empty directories
if command -v fd &> /dev/null
then
fd -H '^\.DS_Store$' -tf -X rm || true
fd -te -td -X rmdir || true
fi
6 changes: 6 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,10 @@
# yarn run cspell "**/src/**/*.rs"
cargo fmt --all -- --check

# Remove empty directories
if command -v fd &> /dev/null
then
fd -H '^\.DS_Store$' -tf -X rm || true
fd -te -td -X rmdir || true
fi

1 change: 1 addition & 0 deletions crates/swc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@ impl Compiler {
&& !src_map_buf.is_empty()
&& src_map_buf.iter().all(|(bp, _)| *bp == BytePos(0))
&& src.lines().count() >= 3
&& option_env!("SWC_DEBUG") == Some("1")
{
panic!("The module contains only dummy spans\n{}", src);
}
Expand Down
Loading

1 comment on commit 962cf4a

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: 962cf4a Previous: 8f2a3ea Ratio
es/full/minify/libraries/antd 1961643196 ns/iter (± 50341005) 2299405473 ns/iter (± 24113557) 0.85
es/full/minify/libraries/d3 529466242 ns/iter (± 10065909) 604450683 ns/iter (± 22616901) 0.88
es/full/minify/libraries/echarts 2318612572 ns/iter (± 8947146) 2888441870 ns/iter (± 42436493) 0.80
es/full/minify/libraries/jquery 113113367 ns/iter (± 1318378) 121398244 ns/iter (± 4604251) 0.93
es/full/minify/libraries/lodash 133731133 ns/iter (± 2915064) 145142108 ns/iter (± 8859999) 0.92
es/full/minify/libraries/moment 66321161 ns/iter (± 706405) 70100301 ns/iter (± 4452608) 0.95
es/full/minify/libraries/react 20359000 ns/iter (± 258485) 22480043 ns/iter (± 686022) 0.91
es/full/minify/libraries/terser 678748030 ns/iter (± 8561786) 901742092 ns/iter (± 25377742) 0.75
es/full/minify/libraries/three 672719178 ns/iter (± 9740576) 822706708 ns/iter (± 17385615) 0.82
es/full/minify/libraries/typescript 4346122906 ns/iter (± 20823205) 5165875730 ns/iter (± 62638496) 0.84
es/full/minify/libraries/victory 869485485 ns/iter (± 11056492) 1086039291 ns/iter (± 14169382) 0.80
es/full/minify/libraries/vue 159469960 ns/iter (± 1752185) 182287828 ns/iter (± 5342059) 0.87
es/full/codegen/es3 34163 ns/iter (± 412) 38284 ns/iter (± 2106) 0.89
es/full/codegen/es5 34121 ns/iter (± 220) 38922 ns/iter (± 1546) 0.88
es/full/codegen/es2015 34137 ns/iter (± 194) 38475 ns/iter (± 2359) 0.89
es/full/codegen/es2016 34095 ns/iter (± 173) 38106 ns/iter (± 1510) 0.89
es/full/codegen/es2017 34104 ns/iter (± 232) 37771 ns/iter (± 1730) 0.90
es/full/codegen/es2018 34157 ns/iter (± 188) 37735 ns/iter (± 1707) 0.91
es/full/codegen/es2019 34132 ns/iter (± 228) 37654 ns/iter (± 1418) 0.91
es/full/codegen/es2020 34156 ns/iter (± 282) 37971 ns/iter (± 1776) 0.90
es/full/all/es3 210891891 ns/iter (± 6982196) 221168924 ns/iter (± 5517133) 0.95
es/full/all/es5 204861432 ns/iter (± 7096061) 209426182 ns/iter (± 14636243) 0.98
es/full/all/es2015 163658751 ns/iter (± 5469830) 167737516 ns/iter (± 4877790) 0.98
es/full/all/es2016 158373529 ns/iter (± 3852309) 167640197 ns/iter (± 4041380) 0.94
es/full/all/es2017 157198143 ns/iter (± 3252223) 165363402 ns/iter (± 6123598) 0.95
es/full/all/es2018 153908613 ns/iter (± 5251596) 164783152 ns/iter (± 7370697) 0.93
es/full/all/es2019 154823424 ns/iter (± 3599237) 164519395 ns/iter (± 5797229) 0.94
es/full/all/es2020 146829361 ns/iter (± 3420164) 157189316 ns/iter (± 3852639) 0.93
es/full/parser 669878 ns/iter (± 25012) 767393 ns/iter (± 31100) 0.87
es/full/base/fixer 26707 ns/iter (± 207) 32832 ns/iter (± 1791) 0.81
es/full/base/resolver_and_hygiene 116386 ns/iter (± 8616) 137229 ns/iter (± 7253) 0.85
serialization of ast node 164 ns/iter (± 0) 175 ns/iter (± 8) 0.94
serialization of serde 165 ns/iter (± 0) 175 ns/iter (± 6) 0.94
es/codegen/colors 67178 ns/iter (± 720) 73326 ns/iter (± 7107) 0.92
es/codegen/large 375451 ns/iter (± 3132) 413680 ns/iter (± 30105) 0.91
es/codegen/with-parser/colors 63400 ns/iter (± 766) 73422 ns/iter (± 3621) 0.86
es/codegen/with-parser/large 674256 ns/iter (± 30946) 754339 ns/iter (± 37097) 0.89
es/minify/libraries/antd 1879972411 ns/iter (± 60785922) 2272639909 ns/iter (± 18254303) 0.83
es/minify/libraries/d3 511543400 ns/iter (± 10739276) 633940118 ns/iter (± 14162179) 0.81
es/minify/libraries/echarts 2275895885 ns/iter (± 13832480) 2900508413 ns/iter (± 48084664) 0.78
es/minify/libraries/jquery 110129971 ns/iter (± 3346319) 117415236 ns/iter (± 2644181) 0.94
es/minify/libraries/lodash 133096441 ns/iter (± 5624319) 144444830 ns/iter (± 2508843) 0.92
es/minify/libraries/moment 63707821 ns/iter (± 1018411) 67950333 ns/iter (± 931806) 0.94
es/minify/libraries/react 19515030 ns/iter (± 202049) 21375748 ns/iter (± 482057) 0.91
es/minify/libraries/terser 680463458 ns/iter (± 8631229) 877753398 ns/iter (± 18078907) 0.78
es/minify/libraries/three 667255378 ns/iter (± 20960889) 769974513 ns/iter (± 28075581) 0.87
es/minify/libraries/typescript 4239435648 ns/iter (± 26624002) 4981450757 ns/iter (± 48891814) 0.85
es/minify/libraries/victory 865300096 ns/iter (± 10322264) 1017750501 ns/iter (± 15293274) 0.85
es/minify/libraries/vue 158705645 ns/iter (± 2656972) 168236384 ns/iter (± 2811412) 0.94
es/visitor/compare/clone 2952336 ns/iter (± 132358) 2965212 ns/iter (± 132202) 1.00
es/visitor/compare/visit_mut_span 3753904 ns/iter (± 135809) 3701542 ns/iter (± 187097) 1.01
es/visitor/compare/visit_mut_span_panic 3689407 ns/iter (± 124458) 3871793 ns/iter (± 253184) 0.95
es/visitor/compare/fold_span 5385064 ns/iter (± 222928) 5633616 ns/iter (± 354254) 0.96
es/visitor/compare/fold_span_panic 5135357 ns/iter (± 260676) 5735111 ns/iter (± 353318) 0.90
es/lexer/colors 25022 ns/iter (± 80) 25069 ns/iter (± 1276) 1.00
es/lexer/angular 12362734 ns/iter (± 289439) 12416352 ns/iter (± 608309) 1.00
es/lexer/backbone 1628914 ns/iter (± 2490) 1655952 ns/iter (± 59347) 0.98
es/lexer/jquery 8731083 ns/iter (± 12039) 8742775 ns/iter (± 449978) 1.00
es/lexer/jquery mobile 14135772 ns/iter (± 19803) 14372358 ns/iter (± 531570) 0.98
es/lexer/mootools 6706685 ns/iter (± 39652) 6925425 ns/iter (± 302283) 0.97
es/lexer/underscore 1357639 ns/iter (± 2431) 1364307 ns/iter (± 51875) 1.00
es/lexer/three 40159783 ns/iter (± 118612) 39677909 ns/iter (± 1392166) 1.01
es/lexer/yui 7537478 ns/iter (± 141707) 7364864 ns/iter (± 313101) 1.02
es/parser/colors 42458 ns/iter (± 1808) 48034 ns/iter (± 1564) 0.88
es/parser/angular 21721073 ns/iter (± 452930) 24756366 ns/iter (± 1741389) 0.88
es/parser/backbone 3045539 ns/iter (± 25055) 3375886 ns/iter (± 167108) 0.90
es/parser/jquery 17455074 ns/iter (± 377553) 18500523 ns/iter (± 747241) 0.94
es/parser/jquery mobile 28146467 ns/iter (± 404701) 30657128 ns/iter (± 1817687) 0.92
es/parser/mootools 13045950 ns/iter (± 171120) 14622647 ns/iter (± 514725) 0.89
es/parser/underscore 2623832 ns/iter (± 14156) 2928761 ns/iter (± 124709) 0.90
es/parser/three 79161363 ns/iter (± 518720) 89399417 ns/iter (± 4801007) 0.89
es/parser/yui 13294453 ns/iter (± 381546) 14406920 ns/iter (± 1244192) 0.92
es/preset-env/usage/builtin_type 159410 ns/iter (± 10077) 171075 ns/iter (± 12855) 0.93
es/preset-env/usage/property 34228 ns/iter (± 396) 41694 ns/iter (± 2410) 0.82
es/transforms/base/resolver 163001 ns/iter (± 1812) 188564 ns/iter (± 8661) 0.86
es/transforms/base/fixer 153159 ns/iter (± 1224) 183969 ns/iter (± 11639) 0.83
es/transforms/base/hygiene 388785 ns/iter (± 1346) 435194 ns/iter (± 15576) 0.89
es/transforms/base/resolver_with_hygiene 457624 ns/iter (± 2217) 516530 ns/iter (± 24378) 0.89
es/visitor/base-perf/module_clone 113518 ns/iter (± 2366) 133696 ns/iter (± 7619) 0.85
es/visitor/base-perf/fold_empty 128370 ns/iter (± 2492) 155081 ns/iter (± 7721) 0.83
es/visitor/base-perf/fold_noop_impl_all 128575 ns/iter (± 2394) 155705 ns/iter (± 7630) 0.83
es/visitor/base-perf/fold_noop_impl_vec 131058 ns/iter (± 6828) 157754 ns/iter (± 5639) 0.83
es/visitor/base-perf/boxing_boxed_clone 82 ns/iter (± 0) 89 ns/iter (± 3) 0.92
es/visitor/base-perf/boxing_unboxed_clone 127 ns/iter (± 0) 132 ns/iter (± 9) 0.96
es/visitor/base-perf/boxing_boxed 159 ns/iter (± 0) 182 ns/iter (± 8) 0.87
es/visitor/base-perf/boxing_unboxed 195 ns/iter (± 0) 201 ns/iter (± 18) 0.97
es/visitor/base-perf/visit_contains_this 4297 ns/iter (± 116) 4068 ns/iter (± 195) 1.06
misc/visitors/time-complexity/time 5 121 ns/iter (± 2) 120 ns/iter (± 6) 1.01
misc/visitors/time-complexity/time 10 365 ns/iter (± 1) 366 ns/iter (± 14) 1.00
misc/visitors/time-complexity/time 15 769 ns/iter (± 3) 821 ns/iter (± 43) 0.94
misc/visitors/time-complexity/time 20 1321 ns/iter (± 7) 1541 ns/iter (± 74) 0.86
misc/visitors/time-complexity/time 40 4649 ns/iter (± 49) 5493 ns/iter (± 254) 0.85
misc/visitors/time-complexity/time 60 9824 ns/iter (± 47) 11690 ns/iter (± 546) 0.84
es/full-target/es2016 301845 ns/iter (± 4188) 331496 ns/iter (± 12833) 0.91
es/full-target/es2017 285030 ns/iter (± 2192) 314744 ns/iter (± 12958) 0.91
es/full-target/es2018 271756 ns/iter (± 1771) 296596 ns/iter (± 10937) 0.92
es2020_nullish_coalescing 140257 ns/iter (± 1618) 168510 ns/iter (± 9725) 0.83
es2020_optional_chaining 174383 ns/iter (± 1098) 201429 ns/iter (± 8559) 0.87
es2022_class_properties 175622 ns/iter (± 1281) 204548 ns/iter (± 9442) 0.86
es2018_object_rest_spread 132855 ns/iter (± 10878) 154017 ns/iter (± 9121) 0.86
es2019_optional_catch_binding 114773 ns/iter (± 5566) 141903 ns/iter (± 9429) 0.81
es2017_async_to_generator 114029 ns/iter (± 2513) 148986 ns/iter (± 21385) 0.77
es2016_exponentiation 138635 ns/iter (± 822) 166372 ns/iter (± 19851) 0.83
es2015_arrow 141270 ns/iter (± 1024) 168746 ns/iter (± 8997) 0.84
es2015_block_scoped_fn 139723 ns/iter (± 994) 165128 ns/iter (± 8729) 0.85
es2015_block_scoping 239681 ns/iter (± 1664) 258457 ns/iter (± 14200) 0.93
es2015_classes 198148 ns/iter (± 1900) 239502 ns/iter (± 10504) 0.83
es2015_computed_props 114699 ns/iter (± 2699) 143052 ns/iter (± 6704) 0.80
es2015_destructuring 209582 ns/iter (± 1778) 234671 ns/iter (± 9033) 0.89
es2015_duplicate_keys 118386 ns/iter (± 2508) 143864 ns/iter (± 6247) 0.82
es2015_parameters 148575 ns/iter (± 1204) 177641 ns/iter (± 8088) 0.84
es2015_fn_name 117797 ns/iter (± 2714) 147203 ns/iter (± 9678) 0.80
es2015_for_of 137241 ns/iter (± 976) 165448 ns/iter (± 7737) 0.83
es2015_instanceof 126721 ns/iter (± 1025) 154234 ns/iter (± 9615) 0.82
es2015_shorthand_property 114386 ns/iter (± 2553) 140548 ns/iter (± 8995) 0.81
es2015_spread 114092 ns/iter (± 2775) 140689 ns/iter (± 7276) 0.81
es2015_sticky_regex 116140 ns/iter (± 2806) 146140 ns/iter (± 10421) 0.79
es2015_typeof_symbol 116350 ns/iter (± 2650) 145515 ns/iter (± 5351) 0.80
es/transform/baseline/base 102095 ns/iter (± 3393) 133503 ns/iter (± 5391) 0.76
es/transform/baseline/common_reserved_word 117481 ns/iter (± 2619) 146637 ns/iter (± 6005) 0.80
es/transform/baseline/common_typescript 246062 ns/iter (± 1563) 278844 ns/iter (± 14314) 0.88
es/target/es3 305617 ns/iter (± 1903) 351986 ns/iter (± 11995) 0.87
es/target/es2015 886500 ns/iter (± 2476) 927715 ns/iter (± 39334) 0.96
es/target/es2016 138973 ns/iter (± 793) 167324 ns/iter (± 8136) 0.83
es/target/es2017 114572 ns/iter (± 2491) 141219 ns/iter (± 6800) 0.81
es/target/es2018 143652 ns/iter (± 2323) 168683 ns/iter (± 8010) 0.85
es/target/es2020 217829 ns/iter (± 1265) 242892 ns/iter (± 12725) 0.90
babelify-only 836699 ns/iter (± 38953) 926254 ns/iter (± 50671) 0.90
parse_and_babelify_angular 74249014 ns/iter (± 1318215) 81951253 ns/iter (± 3734463) 0.91
parse_and_babelify_backbone 8097795 ns/iter (± 170449) 8633641 ns/iter (± 420539) 0.94
parse_and_babelify_jquery 54493654 ns/iter (± 1419093) 60790485 ns/iter (± 2353130) 0.90
parse_and_babelify_jquery_mobile 98013722 ns/iter (± 962428) 109173516 ns/iter (± 3644779) 0.90
parse_and_babelify_mootools 42867444 ns/iter (± 1592531) 49667436 ns/iter (± 2421817) 0.86
parse_and_babelify_underscore 6977943 ns/iter (± 166636) 7597051 ns/iter (± 356883) 0.92
parse_and_babelify_yui 45902732 ns/iter (± 2046551) 47107738 ns/iter (± 2230910) 0.97

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.