Skip to content

Commit

Permalink
feat(es/compat): Support pure_getters for optional_chaining (#7933)
Browse files Browse the repository at this point in the history
**Related issue:**

 - Closes #7921
  • Loading branch information
Austaras authored Sep 13, 2023
1 parent 26b01bd commit c091c5e
Show file tree
Hide file tree
Showing 62 changed files with 567 additions and 553 deletions.
19 changes: 11 additions & 8 deletions crates/swc/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,15 +233,18 @@ impl<'a, 'b, P: swc_ecma_visit::Fold> PassBuilder<'a, 'b, P> {
should_enable(self.target, EsVersion::Es2021)
),
Optional::new(
compat::es2020::es2020(compat::es2020::Config {
nullish_coalescing: compat::es2020::nullish_coalescing::Config {
no_document_all: assumptions.no_document_all
compat::es2020::es2020(
compat::es2020::Config {
nullish_coalescing: compat::es2020::nullish_coalescing::Config {
no_document_all: assumptions.no_document_all
},
optional_chaining: compat::es2020::optional_chaining::Config {
no_document_all: assumptions.no_document_all,
pure_getter: assumptions.pure_getters
}
},
optional_chaining: compat::es2020::optional_chaining::Config {
no_document_all: assumptions.no_document_all,
pure_getter: assumptions.pure_getters
}
}),
self.unresolved_mark
),
should_enable(self.target, EsVersion::Es2020)
),
Optional::new(
Expand Down
10 changes: 4 additions & 6 deletions crates/swc/tests/fixture/issues-3xxx/3381/1/output/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ var dummyTsFunction = function() {
2
];
var func1 = function(array) {
var // Mapping array
_array;
return (_array = array) === null || _array === void 0 ? void 0 : _array.map(function(i) {
return(// Mapping array
array === null || array === void 0 ? void 0 : array.map(function(i) {
return i;
});
}));
};
var func2 = function(array) {
var _array;
return (_array = array) === null || _array === void 0 ? void 0 : _array.map(function(i) {
return array === null || array === void 0 ? void 0 : array.map(function(i) {
return i;
});
};
Expand Down
14 changes: 7 additions & 7 deletions crates/swc/tests/fixture/issues-4xxx/4108/1/output/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Transaction } from "@solana/web3.js";
import { WalletNotConnectedError } from "@solana/wallet-adapter-base";
export var getErrorForTransaction = function() {
var _ref = _async_to_generator(function(connection, txid) {
var _tx, tx, errors;
var tx, errors;
return _ts_generator(this, function(_state) {
switch(_state.label){
case 0:
Expand All @@ -26,7 +26,7 @@ export var getErrorForTransaction = function() {
case 2:
tx = _state.sent();
errors = [];
if (((_tx = tx) === null || _tx === void 0 ? void 0 : _tx.meta) && tx.meta.logMessages) {
if ((tx === null || tx === void 0 ? void 0 : tx.meta) && tx.meta.logMessages) {
tx.meta.logMessages.forEach(function(log) {
var regex = /Error: (.*)/gm;
var m;
Expand Down Expand Up @@ -366,7 +366,7 @@ export var sendTransactions = function() {
}();
export var sendTransaction = function() {
var _ref = _async_to_generator(function(connection, wallet, instructions, signers) {
var awaitConfirmation, commitment, includesFeePayer, block, transaction, _tmp, _transaction, _transaction1, _transaction2, rawTransaction, options, txid, slot, _confirmation, _confirmation1, confirmation, errors;
var awaitConfirmation, commitment, includesFeePayer, block, transaction, _tmp, _transaction, _transaction1, _transaction2, rawTransaction, options, txid, slot, confirmation, errors;
var _arguments = arguments;
return _ts_generator(this, function(_state) {
switch(_state.label){
Expand Down Expand Up @@ -454,8 +454,8 @@ export var sendTransaction = function() {
case 7:
confirmation = _state.sent();
if (!confirmation) throw new Error("Timed out awaiting confirmation on transaction");
slot = ((_confirmation = confirmation) === null || _confirmation === void 0 ? void 0 : _confirmation.slot) || 0;
if (!((_confirmation1 = confirmation) === null || _confirmation1 === void 0 ? void 0 : _confirmation1.err)) return [
slot = (confirmation === null || confirmation === void 0 ? void 0 : confirmation.slot) || 0;
if (!(confirmation === null || confirmation === void 0 ? void 0 : confirmation.err)) return [
3,
9
];
Expand Down Expand Up @@ -574,7 +574,7 @@ export function sendSignedTransaction(_) {
}
function _sendSignedTransaction() {
_sendSignedTransaction = _async_to_generator(function(param) {
var signedTransaction, connection, _param_timeout, timeout, rawTransaction, startTime, slot, txid, done, _confirmation, confirmation, err, simulateResult, e, i, line;
var signedTransaction, connection, _param_timeout, timeout, rawTransaction, startTime, slot, txid, done, confirmation, err, simulateResult, e, i, line;
return _ts_generator(this, function(_state) {
switch(_state.label){
case 0:
Expand Down Expand Up @@ -639,7 +639,7 @@ function _sendSignedTransaction() {
console.error(confirmation.err);
throw new Error("Transaction failed: Custom instruction error");
}
slot = ((_confirmation = confirmation) === null || _confirmation === void 0 ? void 0 : _confirmation.slot) || 0;
slot = (confirmation === null || confirmation === void 0 ? void 0 : confirmation.slot) || 0;
return [
3,
10
Expand Down
24 changes: 8 additions & 16 deletions crates/swc/tests/fixture/issues-7xxx/7547/output/1.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,24 @@
// code below dont work
var _a;
var a = {};
new Promise(function(r) {
var _a;
r((_a = a) === null || _a === void 0 ? void 0 : _a.b);
r(a === null || a === void 0 ? void 0 : a.b);
}).then(function(a) {
var _a;
return (_a = a) === null || _a === void 0 ? void 0 : _a.b;
return a === null || a === void 0 ? void 0 : a.b;
});
var anony = function() {
var _a;
return (_a = a) === null || _a === void 0 ? void 0 : _a.b;
return a === null || a === void 0 ? void 0 : a.b;
};
// code below works
var b = (_a = a) === null || _a === void 0 ? void 0 : _a.b;
var b = a === null || a === void 0 ? void 0 : a.b;
function fn() {
var _a;
return (_a = a) === null || _a === void 0 ? void 0 : _a.b;
return a === null || a === void 0 ? void 0 : a.b;
}
setTimeout(function() {
var _a;
return (_a = a) === null || _a === void 0 ? void 0 : _a.b;
return a === null || a === void 0 ? void 0 : a.b;
}, 0);
var anony2 = function anony2() {
var _a;
return (_a = a) === null || _a === void 0 ? void 0 : _a.b;
return a === null || a === void 0 ? void 0 : a.b;
};
(function() {
var _a;
return (_a = a) === null || _a === void 0 ? void 0 : _a.b;
return a === null || a === void 0 ? void 0 : a.b;
})();
2 changes: 1 addition & 1 deletion crates/swc/tests/fixture/issues-7xxx/7659/1/output/1.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"use strict";var _a;var a=undefined;(_a=a)===null||_a===void 0?void 0:_a.b.c;
"use strict";var a=undefined;a===null||a===void 0?void 0:a.b.c;
2 changes: 1 addition & 1 deletion crates/swc/tests/fixture/issues-7xxx/7659/2/output/1.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"use strict";var _a;var a=undefined;(_a=a)===null||_a===void 0?void 0:_a.b.c;
"use strict";var a=undefined;a===null||a===void 0?void 0:a.b.c;
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var Router = /*#__PURE__*/ function() {
value: function change(method, url, as, options, forcedScroll) {
var _this = this;
return _async_to_generator(function() {
var shouldResolveHref, prevLocale, parsedAs, localePathResult, didNavigate, _this_locales, detectedDomain, asNoBasePath, _options_shallow, shallow, routeProps, cleanedAs, localeChange, parsed, pathname, query, pages, rewrites, ref, err, resolvedAs, rewritesResult, route, parsedAs1, asPathname, routeRegex, routeMatch, shouldInterpolate, interpolatedAs, missingParams, _self___NEXT_DATA___props_pageProps, _self___NEXT_DATA___props, _props, routeInfo, error, props, __N_SSG, __N_SSP, destination, parsedHref, _prepareUrlAs, newUrl, newAs, notFoundRoute, _, isValidShallowRoute, _options_scroll, shouldScroll, resetScroll, err1;
var shouldResolveHref, prevLocale, parsedAs, localePathResult, didNavigate, _this_locales, detectedDomain, asNoBasePath, _options_shallow, shallow, routeProps, cleanedAs, localeChange, parsed, pathname, query, pages, rewrites, ref, err, resolvedAs, rewritesResult, route, parsedAs1, asPathname, routeRegex, routeMatch, shouldInterpolate, interpolatedAs, missingParams, _self___NEXT_DATA___props_pageProps, _self___NEXT_DATA___props, routeInfo, error, props, __N_SSG, __N_SSP, destination, parsedHref, _prepareUrlAs, newUrl, newAs, notFoundRoute, _, isValidShallowRoute, _options_scroll, shouldScroll, resetScroll, err1;
return _ts_generator(this, function(_state) {
switch(_state.label){
case 0:
Expand Down Expand Up @@ -312,7 +312,7 @@ var Router = /*#__PURE__*/ function() {
case 13:
Router.events.emit("beforeHistoryChange", as, routeProps);
_this.changeState(method, url, as, options);
if (options._h && pathname === "/_error" && ((_self___NEXT_DATA___props = self.__NEXT_DATA__.props) === null || _self___NEXT_DATA___props === void 0 ? void 0 : (_self___NEXT_DATA___props_pageProps = _self___NEXT_DATA___props.pageProps) === null || _self___NEXT_DATA___props_pageProps === void 0 ? void 0 : _self___NEXT_DATA___props_pageProps.statusCode) === 500 && ((_props = props) === null || _props === void 0 ? void 0 : _props.pageProps)) {
if (options._h && pathname === "/_error" && ((_self___NEXT_DATA___props = self.__NEXT_DATA__.props) === null || _self___NEXT_DATA___props === void 0 ? void 0 : (_self___NEXT_DATA___props_pageProps = _self___NEXT_DATA___props.pageProps) === null || _self___NEXT_DATA___props_pageProps === void 0 ? void 0 : _self___NEXT_DATA___props_pageProps.statusCode) === 500 && (props === null || props === void 0 ? void 0 : props.pageProps)) {
// ensure statusCode is still correct for static 500 page
// when updating query information
props.pageProps.statusCode = 500;
Expand Down
70 changes: 35 additions & 35 deletions crates/swc/tests/tsc-references/callChain.1.normal.js
Original file line number Diff line number Diff line change
@@ -1,86 +1,86 @@
//// [callChain.ts]
var _o2, _o21, _o22, _o23, _o3_b, _o3_b1, _o3_b2, _o3_b3, _o3_b4, _o3_b5;
var _o1, _o11, _o12, _o13, _o24, _o25, _o26, _o27, _o28, _o29, _o210, _o211, _o3_b6, _o3, _o3_b7, _o31, _o3_b8, _o32, _o3_b9, _o33, _o3_b10, _o34, _o3_b11, _o35, _o3_b12, _o36, _o3_b13, _o37, _o3_b14, _o38, _o3_b15, _o39, _o3_b16, _o310, _o3_b17, _o311, _o4, _o5, // GH#36031
_o212, _o213;
(_o1 = o1) === null || _o1 === void 0 ? void 0 : _o1();
(_o11 = o1) === null || _o11 === void 0 ? void 0 : _o11(1);
(_o12 = o1) === null || _o12 === void 0 ? void 0 : _o12.apply(void 0, [
var _o3_b6, _o3_b7, _o3_b8, _o3_b9, _o3_b10, _o3_b11, _o3_b12, _o3_b13, _o3_b14, _o3_b15, _o3_b16, _o3_b17, _o5;
o1 === null || o1 === void 0 ? void 0 : o1();
o1 === null || o1 === void 0 ? void 0 : o1(1);
o1 === null || o1 === void 0 ? void 0 : o1.apply(void 0, [
1,
2
]);
(_o13 = o1) === null || _o13 === void 0 ? void 0 : _o13.apply(void 0, [
o1 === null || o1 === void 0 ? void 0 : o1.apply(void 0, [
1,
2,
3,
4
]);
(_o24 = o2) === null || _o24 === void 0 ? void 0 : _o24.b();
(_o25 = o2) === null || _o25 === void 0 ? void 0 : _o25.b(1);
(_o26 = o2) === null || _o26 === void 0 ? void 0 : (_o2 = _o26).b.apply(_o2, [
o2 === null || o2 === void 0 ? void 0 : o2.b();
o2 === null || o2 === void 0 ? void 0 : o2.b(1);
o2 === null || o2 === void 0 ? void 0 : (_o2 = o2).b.apply(_o2, [
1,
2
]);
(_o27 = o2) === null || _o27 === void 0 ? void 0 : (_o21 = _o27).b.apply(_o21, [
o2 === null || o2 === void 0 ? void 0 : (_o21 = o2).b.apply(_o21, [
1,
2,
3,
4
]);
(_o28 = o2) === null || _o28 === void 0 ? void 0 : _o28["b"]();
(_o29 = o2) === null || _o29 === void 0 ? void 0 : _o29["b"](1);
(_o210 = o2) === null || _o210 === void 0 ? void 0 : (_o22 = _o210)["b"].apply(_o22, [
o2 === null || o2 === void 0 ? void 0 : o2["b"]();
o2 === null || o2 === void 0 ? void 0 : o2["b"](1);
o2 === null || o2 === void 0 ? void 0 : (_o22 = o2)["b"].apply(_o22, [
1,
2
]);
(_o211 = o2) === null || _o211 === void 0 ? void 0 : (_o23 = _o211)["b"].apply(_o23, [
o2 === null || o2 === void 0 ? void 0 : (_o23 = o2)["b"].apply(_o23, [
1,
2,
3,
4
]);
(_o3_b6 = (_o3 = o3).b) === null || _o3_b6 === void 0 ? void 0 : _o3_b6.call(_o3).c;
(_o3_b7 = (_o31 = o3).b) === null || _o3_b7 === void 0 ? void 0 : _o3_b7.call(_o31, 1).c;
(_o3_b8 = (_o32 = o3).b) === null || _o3_b8 === void 0 ? void 0 : (_o3_b = _o3_b8).call.apply(_o3_b, [
_o32,
(_o3_b6 = o3.b) === null || _o3_b6 === void 0 ? void 0 : _o3_b6.call(o3).c;
(_o3_b7 = o3.b) === null || _o3_b7 === void 0 ? void 0 : _o3_b7.call(o3, 1).c;
(_o3_b8 = o3.b) === null || _o3_b8 === void 0 ? void 0 : (_o3_b = _o3_b8).call.apply(_o3_b, [
o3,
1,
2
]).c;
(_o3_b9 = (_o33 = o3).b) === null || _o3_b9 === void 0 ? void 0 : (_o3_b1 = _o3_b9).call.apply(_o3_b1, [
_o33,
(_o3_b9 = o3.b) === null || _o3_b9 === void 0 ? void 0 : (_o3_b1 = _o3_b9).call.apply(_o3_b1, [
o3,
1,
2,
3,
4
]).c;
(_o3_b10 = (_o34 = o3).b) === null || _o3_b10 === void 0 ? void 0 : _o3_b10.call(_o34)["c"];
(_o3_b11 = (_o35 = o3).b) === null || _o3_b11 === void 0 ? void 0 : _o3_b11.call(_o35, 1)["c"];
(_o3_b12 = (_o36 = o3).b) === null || _o3_b12 === void 0 ? void 0 : (_o3_b2 = _o3_b12).call.apply(_o3_b2, [
_o36,
(_o3_b10 = o3.b) === null || _o3_b10 === void 0 ? void 0 : _o3_b10.call(o3)["c"];
(_o3_b11 = o3.b) === null || _o3_b11 === void 0 ? void 0 : _o3_b11.call(o3, 1)["c"];
(_o3_b12 = o3.b) === null || _o3_b12 === void 0 ? void 0 : (_o3_b2 = _o3_b12).call.apply(_o3_b2, [
o3,
1,
2
])["c"];
(_o3_b13 = (_o37 = o3).b) === null || _o3_b13 === void 0 ? void 0 : (_o3_b3 = _o3_b13).call.apply(_o3_b3, [
_o37,
(_o3_b13 = o3.b) === null || _o3_b13 === void 0 ? void 0 : (_o3_b3 = _o3_b13).call.apply(_o3_b3, [
o3,
1,
2,
3,
4
])["c"];
(_o3_b14 = (_o38 = o3)["b"]) === null || _o3_b14 === void 0 ? void 0 : _o3_b14.call(_o38).c;
(_o3_b15 = (_o39 = o3)["b"]) === null || _o3_b15 === void 0 ? void 0 : _o3_b15.call(_o39, 1).c;
(_o3_b16 = (_o310 = o3)["b"]) === null || _o3_b16 === void 0 ? void 0 : (_o3_b4 = _o3_b16).call.apply(_o3_b4, [
_o310,
(_o3_b14 = o3["b"]) === null || _o3_b14 === void 0 ? void 0 : _o3_b14.call(o3).c;
(_o3_b15 = o3["b"]) === null || _o3_b15 === void 0 ? void 0 : _o3_b15.call(o3, 1).c;
(_o3_b16 = o3["b"]) === null || _o3_b16 === void 0 ? void 0 : (_o3_b4 = _o3_b16).call.apply(_o3_b4, [
o3,
1,
2
]).c;
(_o3_b17 = (_o311 = o3)["b"]) === null || _o3_b17 === void 0 ? void 0 : (_o3_b5 = _o3_b17).call.apply(_o3_b5, [
_o311,
(_o3_b17 = o3["b"]) === null || _o3_b17 === void 0 ? void 0 : (_o3_b5 = _o3_b17).call.apply(_o3_b5, [
o3,
1,
2,
3,
4
]).c;
var v = (_o4 = o4) === null || _o4 === void 0 ? void 0 : _o4(incr);
var v = o4 === null || o4 === void 0 ? void 0 : o4(incr);
(_o5 = o5()) === null || _o5 === void 0 ? void 0 : _o5();
(_o212 = o2) === null || _o212 === void 0 ? void 0 : _o212.b().toString;
(_o213 = o2) === null || _o213 === void 0 ? void 0 : _o213.b().toString;
// GH#36031
o2 === null || o2 === void 0 ? void 0 : o2.b().toString;
o2 === null || o2 === void 0 ? void 0 : o2.b().toString;
8 changes: 4 additions & 4 deletions crates/swc/tests/tsc-references/callChain.2.1.normal.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//// [callChain.2.ts]
var _o1, _o2, _o3_b, _o3;
(_o1 = o1) === null || _o1 === void 0 ? void 0 : _o1();
(_o2 = o2) === null || _o2 === void 0 ? void 0 : _o2.b();
(_o3_b = (_o3 = o3).b) === null || _o3_b === void 0 ? void 0 : _o3_b.call(_o3).c;
var _o3_b;
o1 === null || o1 === void 0 ? void 0 : o1();
o2 === null || o2 === void 0 ? void 0 : o2.b();
(_o3_b = o3.b) === null || _o3_b === void 0 ? void 0 : _o3_b.call(o3).c;
4 changes: 2 additions & 2 deletions crates/swc/tests/tsc-references/callChain.2.2.minified.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
//// [callChain.2.ts]
var _o1, _o2, _o3_b, _o3;
null === (_o1 = o1) || void 0 === _o1 || _o1(), null === (_o2 = o2) || void 0 === _o2 || _o2.b(), null === (_o3_b = (_o3 = o3).b) || void 0 === _o3_b || _o3_b.call(_o3).c;
var _o3_b;
null == o1 || o1(), null == o2 || o2.b(), null === (_o3_b = o3.b) || void 0 === _o3_b || _o3_b.call(o3).c;
Loading

1 comment on commit c091c5e

@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: c091c5e Previous: dac8888 Ratio
es/full/bugs-1 291260 ns/iter (± 10710) 284563 ns/iter (± 6196) 1.02
es/full/minify/libraries/antd 1320654787 ns/iter (± 20544963) 1321433453 ns/iter (± 16038374) 1.00
es/full/minify/libraries/d3 281712552 ns/iter (± 2822952) 275433814 ns/iter (± 1571355) 1.02
es/full/minify/libraries/echarts 1070592353 ns/iter (± 15166582) 1090302749 ns/iter (± 28888648) 0.98
es/full/minify/libraries/jquery 84044240 ns/iter (± 250481) 83971135 ns/iter (± 355752) 1.00
es/full/minify/libraries/lodash 97789168 ns/iter (± 387728) 97073701 ns/iter (± 365208) 1.01
es/full/minify/libraries/moment 49864456 ns/iter (± 118356) 49675669 ns/iter (± 108243) 1.00
es/full/minify/libraries/react 18129929 ns/iter (± 353691) 17949922 ns/iter (± 48406) 1.01
es/full/minify/libraries/terser 221075920 ns/iter (± 2030738) 216833107 ns/iter (± 628205) 1.02
es/full/minify/libraries/three 389892714 ns/iter (± 1880904) 391691049 ns/iter (± 4649111) 1.00
es/full/minify/libraries/typescript 2656574087 ns/iter (± 22006159) 2619933916 ns/iter (± 13596617) 1.01
es/full/minify/libraries/victory 586629926 ns/iter (± 10071057) 568641217 ns/iter (± 6600986) 1.03
es/full/minify/libraries/vue 121919915 ns/iter (± 921186) 119762119 ns/iter (± 238145) 1.02
es/full/codegen/es3 34448 ns/iter (± 112) 34926 ns/iter (± 63) 0.99
es/full/codegen/es5 34417 ns/iter (± 227) 34951 ns/iter (± 75) 0.98
es/full/codegen/es2015 34347 ns/iter (± 106) 34920 ns/iter (± 70) 0.98
es/full/codegen/es2016 34424 ns/iter (± 119) 35027 ns/iter (± 54) 0.98
es/full/codegen/es2017 34408 ns/iter (± 95) 35092 ns/iter (± 86) 0.98
es/full/codegen/es2018 34487 ns/iter (± 105) 34896 ns/iter (± 54) 0.99
es/full/codegen/es2019 34432 ns/iter (± 93) 34871 ns/iter (± 48) 0.99
es/full/codegen/es2020 34296 ns/iter (± 92) 34952 ns/iter (± 100) 0.98
es/full/all/es3 169180392 ns/iter (± 1481756) 168832910 ns/iter (± 1028229) 1.00
es/full/all/es5 161592563 ns/iter (± 1333993) 160473267 ns/iter (± 960197) 1.01
es/full/all/es2015 120611832 ns/iter (± 244069) 119338123 ns/iter (± 691420) 1.01
es/full/all/es2016 120477770 ns/iter (± 527826) 118504908 ns/iter (± 621556) 1.02
es/full/all/es2017 119120316 ns/iter (± 849241) 118704960 ns/iter (± 571699) 1.00
es/full/all/es2018 118054850 ns/iter (± 910272) 115616968 ns/iter (± 476944) 1.02
es/full/all/es2019 116711692 ns/iter (± 906387) 115433152 ns/iter (± 564978) 1.01
es/full/all/es2020 112732993 ns/iter (± 714002) 110262119 ns/iter (± 819539) 1.02
es/full/parser 501057 ns/iter (± 6161) 487067 ns/iter (± 4907) 1.03
es/full/base/fixer 18887 ns/iter (± 81) 18496 ns/iter (± 306) 1.02
es/full/base/resolver_and_hygiene 81187 ns/iter (± 431) 79844 ns/iter (± 131) 1.02
serialization of serde 292 ns/iter (± 0) 309 ns/iter (± 2) 0.94
css/minify/libraries/bootstrap 29825337 ns/iter (± 212277) 29422831 ns/iter (± 205774) 1.01
css/visitor/compare/clone 1650725 ns/iter (± 8506) 1677547 ns/iter (± 5073) 0.98
css/visitor/compare/visit_mut_span 1797638 ns/iter (± 8246) 1794128 ns/iter (± 4906) 1.00
css/visitor/compare/visit_mut_span_panic 1853308 ns/iter (± 6511) 1872905 ns/iter (± 5279) 0.99
css/visitor/compare/fold_span 2567952 ns/iter (± 8297) 2582273 ns/iter (± 10678) 0.99
css/visitor/compare/fold_span_panic 2748744 ns/iter (± 9868) 2785806 ns/iter (± 6114) 0.99
css/lexer/bootstrap_5_1_3 4441579 ns/iter (± 3011) 4574244 ns/iter (± 2509) 0.97
css/lexer/foundation_6_7_4 3748847 ns/iter (± 3479) 3819100 ns/iter (± 1883) 0.98
css/lexer/tailwind_3_1_1 715321 ns/iter (± 1404) 733384 ns/iter (± 393) 0.98
css/parser/bootstrap_5_1_3 19228569 ns/iter (± 64378) 19546368 ns/iter (± 23278) 0.98
css/parser/foundation_6_7_4 15106325 ns/iter (± 16485) 15687091 ns/iter (± 33623) 0.96
css/parser/tailwind_3_1_1 2927976 ns/iter (± 3957) 3037635 ns/iter (± 3280) 0.96
es/codegen/colors 749588 ns/iter (± 399820) 727734 ns/iter (± 396495) 1.03
es/codegen/large 3166176 ns/iter (± 1665920) 3148661 ns/iter (± 1666137) 1.01
es/codegen/with-parser/colors 45963 ns/iter (± 168) 45153 ns/iter (± 562) 1.02
es/codegen/with-parser/large 495816 ns/iter (± 772) 490346 ns/iter (± 1055) 1.01
es/minify/libraries/antd 1155535931 ns/iter (± 21107441) 1146212548 ns/iter (± 21637876) 1.01
es/minify/libraries/d3 242292276 ns/iter (± 2309965) 240130106 ns/iter (± 2758734) 1.01
es/minify/libraries/echarts 929826906 ns/iter (± 9623914) 904201103 ns/iter (± 5995332) 1.03
es/minify/libraries/jquery 72774254 ns/iter (± 279454) 72839403 ns/iter (± 165564) 1.00
es/minify/libraries/lodash 87465843 ns/iter (± 652750) 86889616 ns/iter (± 235742) 1.01
es/minify/libraries/moment 43239742 ns/iter (± 249991) 43256812 ns/iter (± 89475) 1.00
es/minify/libraries/react 15955951 ns/iter (± 42235) 15960334 ns/iter (± 63919) 1.00
es/minify/libraries/terser 188306081 ns/iter (± 2699799) 185595395 ns/iter (± 726083) 1.01
es/minify/libraries/three 336224227 ns/iter (± 4778158) 319244024 ns/iter (± 1050891) 1.05
es/minify/libraries/typescript 2294786623 ns/iter (± 25467254) 2230664453 ns/iter (± 18244392) 1.03
es/minify/libraries/victory 499783924 ns/iter (± 8031548) 477659514 ns/iter (± 5979536) 1.05
es/minify/libraries/vue 106283537 ns/iter (± 856473) 105530233 ns/iter (± 301429) 1.01
es/visitor/compare/clone 1951881 ns/iter (± 6921) 1950934 ns/iter (± 6253) 1.00
es/visitor/compare/visit_mut_span 2280314 ns/iter (± 5447) 2282054 ns/iter (± 3671) 1.00
es/visitor/compare/visit_mut_span_panic 2341246 ns/iter (± 7329) 2313877 ns/iter (± 987) 1.01
es/visitor/compare/fold_span 3387220 ns/iter (± 6438) 3385236 ns/iter (± 7058) 1.00
es/visitor/compare/fold_span_panic 3558443 ns/iter (± 50863) 3498076 ns/iter (± 7137) 1.02
es/lexer/colors 13310 ns/iter (± 25) 13117 ns/iter (± 38) 1.01
es/lexer/angular 6028899 ns/iter (± 4022) 6097119 ns/iter (± 12078) 0.99
es/lexer/backbone 774278 ns/iter (± 1526) 777599 ns/iter (± 971) 1.00
es/lexer/jquery 4478194 ns/iter (± 8600) 4471044 ns/iter (± 18043) 1.00
es/lexer/jquery mobile 6774506 ns/iter (± 4769) 6846033 ns/iter (± 17274) 0.99
es/lexer/mootools 3527849 ns/iter (± 16856) 3507615 ns/iter (± 4433) 1.01
es/lexer/underscore 663958 ns/iter (± 6828) 653085 ns/iter (± 870) 1.02
es/lexer/three 21086341 ns/iter (± 13258) 21223351 ns/iter (± 50330) 0.99
es/lexer/yui 3773578 ns/iter (± 1867) 3781741 ns/iter (± 4903) 1.00
es/parser/colors 27153 ns/iter (± 102) 27085 ns/iter (± 46) 1.00
es/parser/angular 13445023 ns/iter (± 46175) 13520460 ns/iter (± 56389) 0.99
es/parser/backbone 1980216 ns/iter (± 9914) 1976574 ns/iter (± 6846) 1.00
es/parser/jquery 10863205 ns/iter (± 50671) 10805757 ns/iter (± 34777) 1.01
es/parser/jquery mobile 16609171 ns/iter (± 53001) 16523597 ns/iter (± 35587) 1.01
es/parser/mootools 8353700 ns/iter (± 27136) 8305104 ns/iter (± 17917) 1.01
es/parser/underscore 1706317 ns/iter (± 9665) 1706100 ns/iter (± 9137) 1.00
es/parser/three 48025118 ns/iter (± 630952) 46851132 ns/iter (± 234358) 1.03
es/parser/yui 8269808 ns/iter (± 43690) 8212478 ns/iter (± 33845) 1.01
es/preset-env/usage/builtin_type 139707 ns/iter (± 32661) 137918 ns/iter (± 32149) 1.01
es/preset-env/usage/property 16905 ns/iter (± 85) 17111 ns/iter (± 62) 0.99
es/resolver/typescript 89866780 ns/iter (± 1378168) 90341622 ns/iter (± 1329631) 0.99
es/fixer/typescript 63389921 ns/iter (± 694478) 62618990 ns/iter (± 560104) 1.01
es/hygiene/typescript 128596859 ns/iter (± 549626) 128768249 ns/iter (± 947869) 1.00
es/resolver_with_hygiene/typescript 239907178 ns/iter (± 1194540) 244817326 ns/iter (± 1842010) 0.98
es/visitor/base-perf/module_clone 59136 ns/iter (± 296) 59436 ns/iter (± 379) 0.99
es/visitor/base-perf/fold_empty 62727 ns/iter (± 231) 63398 ns/iter (± 373) 0.99
es/visitor/base-perf/fold_noop_impl_all 63450 ns/iter (± 312) 63921 ns/iter (± 534) 0.99
es/visitor/base-perf/fold_noop_impl_vec 63048 ns/iter (± 224) 64257 ns/iter (± 358) 0.98
es/visitor/base-perf/boxing_boxed_clone 56 ns/iter (± 0) 57 ns/iter (± 0) 0.98
es/visitor/base-perf/boxing_unboxed_clone 40 ns/iter (± 0) 39 ns/iter (± 0) 1.03
es/visitor/base-perf/boxing_boxed 105 ns/iter (± 0) 111 ns/iter (± 0) 0.95
es/visitor/base-perf/boxing_unboxed 75 ns/iter (± 0) 92 ns/iter (± 0) 0.82
es/visitor/base-perf/visit_empty 0 ns/iter (± 0) 0 ns/iter (± 0) NaN
es/visitor/base-perf/visit_contains_this 2522 ns/iter (± 9) 3200 ns/iter (± 36) 0.79
es/base/parallel/resolver/typescript 3667474078 ns/iter (± 278861349) 4483788948 ns/iter (± 276518977) 0.82
es/base/parallel/hygiene/typescript 1417454446 ns/iter (± 14869958) 1400518561 ns/iter (± 13361695) 1.01
misc/visitors/time-complexity/time 5 138 ns/iter (± 0) 134 ns/iter (± 2) 1.03
misc/visitors/time-complexity/time 10 356 ns/iter (± 0) 368 ns/iter (± 4) 0.97
misc/visitors/time-complexity/time 15 796 ns/iter (± 3) 672 ns/iter (± 3) 1.18
misc/visitors/time-complexity/time 20 1308 ns/iter (± 2) 1109 ns/iter (± 3) 1.18
misc/visitors/time-complexity/time 40 4383 ns/iter (± 27) 3579 ns/iter (± 9) 1.22
misc/visitors/time-complexity/time 60 9078 ns/iter (± 17) 7371 ns/iter (± 45) 1.23
es/full-target/es2016 231668 ns/iter (± 1215) 233245 ns/iter (± 748) 0.99
es/full-target/es2017 222701 ns/iter (± 1328) 221635 ns/iter (± 606) 1.00
es/full-target/es2018 213151 ns/iter (± 1187) 209917 ns/iter (± 929) 1.02
es2020_nullish_coalescing 71450 ns/iter (± 555) 70959 ns/iter (± 589) 1.01
es2020_optional_chaining 80301 ns/iter (± 249) 80395 ns/iter (± 378) 1.00
es2022_class_properties 116854 ns/iter (± 393) 117391 ns/iter (± 377) 1.00
es2018_object_rest_spread 75828 ns/iter (± 488) 76615 ns/iter (± 232) 0.99
es2019_optional_catch_binding 65835 ns/iter (± 175) 65951 ns/iter (± 354) 1.00
es2017_async_to_generator 64428 ns/iter (± 260) 64871 ns/iter (± 228) 0.99
es2016_exponentiation 66040 ns/iter (± 241) 69871 ns/iter (± 199) 0.95
es2015_arrow 72094 ns/iter (± 371) 73254 ns/iter (± 126) 0.98
es2015_block_scoped_fn 68726 ns/iter (± 273) 69440 ns/iter (± 234) 0.99
es2015_block_scoping 125861 ns/iter (± 569) 125628 ns/iter (± 259) 1.00

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

Please sign in to comment.