Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(es/minifier): Mark more expressions as pure (#6204)
- Loading branch information
Showing
58 changed files
with
47 additions
and
106 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
2 changes: 1 addition & 1 deletion
2
crates/swc/tests/tsc-references/commaOperatorWithSecondOperandAnyType.2.minified.js
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
//// [commaOperatorWithSecondOperandAnyType.ts] | ||
var NUMBER, x; | ||
++NUMBER, "string".charAt(0), x("any"), x.doSomeThing(), ++NUMBER, "string".charAt(0), x("any"), x.doSomeThing(); | ||
++NUMBER, x("any"), x.doSomeThing(), ++NUMBER, x("any"), x.doSomeThing(); |
5 changes: 0 additions & 5 deletions
5
crates/swc/tests/tsc-references/computedPropertyNames12_ES5.2.minified.js
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 |
---|---|---|
@@ -1,7 +1,2 @@ | ||
//// [computedPropertyNames12_ES5.ts] | ||
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs"; | ||
var n, a, _ref = (void 0) + n; | ||
(function C() { | ||
"use strict"; | ||
_class_call_check(this, C), this[n] = n, this[_ref] = 2, this["hello bye"] = 0; | ||
})["hello ".concat(a, " bye")] = 0; |
2 changes: 0 additions & 2 deletions
2
crates/swc/tests/tsc-references/computedPropertyNames13_ES5.2.minified.js
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 |
---|---|---|
@@ -1,4 +1,2 @@ | ||
//// [computedPropertyNames13_ES5.ts] | ||
var a; | ||
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs"; | ||
"hello ".concat(a, " bye"); |
2 changes: 0 additions & 2 deletions
2
crates/swc/tests/tsc-references/computedPropertyNames16_ES5.2.minified.js
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
//// [computedPropertyNames16_ES5.ts] | ||
var a; | ||
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs"; | ||
import _create_class from "@swc/helpers/src/_create_class.mjs"; | ||
"hello ".concat(a, " bye"); |
2 changes: 1 addition & 1 deletion
2
crates/swc/tests/tsc-references/emitExponentiationOperatorInTempalteString4.2.minified.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
crates/swc/tests/tsc-references/emitExponentiationOperatorInTemplateString1.2.minified.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
crates/swc/tests/tsc-references/emitExponentiationOperatorInTemplateString2.2.minified.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
crates/swc/tests/tsc-references/emitExponentiationOperatorInTemplateString3.2.minified.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
...es/swc/tests/tsc-references/exponentiationOperatorWithTemplateStringInvalid.2.minified.js
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
//// [exponentiationOperatorWithTemplateStringInvalid.ts] | ||
"".concat(3), "2".concat(3), "".concat(3, "4"), "2".concat(3, "4"), "".concat(3), "2".concat(3), "".concat(3, "4"), "2".concat(3, "4"); | ||
var k = 10; | ||
k = Math.pow(k, "".concat(3)), k = Math.pow(k, "2".concat(3)), k = Math.pow(k, "2".concat(3, "4")), k = Math.pow(k, "2".concat(3, "4")); |
2 changes: 1 addition & 1 deletion
2
crates/swc/tests/tsc-references/stringPropertyAccess.2.minified.js
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
//// [stringPropertyAccess.ts] | ||
"".charAt(0), "".hasOwnProperty("charAt"), "".charAt(0), "".hasOwnProperty("toFixed"); | ||
"".hasOwnProperty("charAt"), "".hasOwnProperty("toFixed"); |
1 change: 0 additions & 1 deletion
1
crates/swc/tests/tsc-references/stringPropertyAccessWithError.2.minified.js
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
//// [stringPropertyAccessWithError.ts] | ||
"".charAt("invalid"); |
2 changes: 1 addition & 1 deletion
2
crates/swc/tests/tsc-references/templateLiteralTypes2.2.minified.js
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
//// [templateLiteralTypes2.ts] | ||
takesLiteral("foo.bar.baz"), takesLiteral("foo.bar.baz"), takesLiteral("foo.bar.".concat(someString)), takesLiteral("foo.bar.".concat(someString)), takesLiteral("foo.bar.".concat(someUnion)), "".concat(22, "px"), "rotate(".concat(12, "dig)"); | ||
takesLiteral("foo.bar.baz"), takesLiteral("foo.bar.baz"), takesLiteral("foo.bar.".concat(someString)), takesLiteral("foo.bar.".concat(someString)), takesLiteral("foo.bar.".concat(someUnion)); |
2 changes: 1 addition & 1 deletion
2
crates/swc/tests/tsc-references/templateLiteralTypes3.2.minified.js
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
1 change: 0 additions & 1 deletion
1
crates/swc/tests/tsc-references/templateStringBinaryOperations.2.minified.js
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
//// [templateStringBinaryOperations.ts] | ||
"".concat(3), "2".concat(3), "".concat(3, "4"), "2".concat(3, "4"), "".concat(3), "2".concat(3), "".concat(3, "4"), "2".concat(3, "4"), "".concat(3), "2".concat(3), "".concat(3, "4"), "2".concat(3, "4"), "".concat(-1), "2".concat(-1), "".concat(-1, "5"), "2".concat(-1, "5"), "".concat(-1), "2".concat(-1), "".concat(-1, "5"), "2".concat(-1, "5"), "".concat(-1), "2".concat(-1), "".concat(-1, "5"), "2".concat(-1, "5"), "".concat(12), "2".concat(12), "".concat(12, "5"), "2".concat(12, "5"), "".concat(12), "2".concat(12), "".concat(12, "5"), "2".concat(12, "5"), "".concat(12), "2".concat(12), "".concat(12, "5"), "2".concat(12, "5"), "".concat(0), "2".concat(0), "".concat(0, "5"), "2".concat(0, "5"), "".concat(0), "2".concat(0), "".concat(0, "5"), "2".concat(0, "5"), "".concat(0), "2".concat(0), "".concat(0, "5"), "2".concat(0, "5"); |
1 change: 0 additions & 1 deletion
1
crates/swc/tests/tsc-references/templateStringBinaryOperationsInvalid.2.minified.js
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
//// [templateStringBinaryOperationsInvalid.ts] | ||
"".concat(3), "2".concat(3), "".concat(3, "4"), "2".concat(3, "4"), "".concat(3), "2".concat(3), "".concat(3, "4"), "2".concat(3, "4"), "".concat(3), "2".concat(3), "".concat(3, "4"), "2".concat(3, "4"), "".concat(3), "2".concat(3), "".concat(3, "4"), "2".concat(3, "4"), "".concat(3), "2".concat(3), "".concat(3, "4"), "2".concat(3, "4"), "".concat(3), "2".concat(3), "".concat(3, "4"), "2".concat(3, "4"), "".concat(-1), "2".concat(-1), "".concat(-1, "5"), "2".concat(-1, "5"), "".concat(-1), "2".concat(-1), "".concat(-1, "5"), "2".concat(-1, "5"), "".concat(12), "2".concat(12), "".concat(12, "5"), "2".concat(12, "5"), "".concat(12), "2".concat(12), "".concat(12, "5"), "2".concat(12, "5"), "".concat(0), "2".concat(0), "".concat(0, "5"), "2".concat(0, "5"), "".concat(0), "2".concat(0), "".concat(0, "5"), "2".concat(0, "5"), "".concat(-1), "2".concat(-1), "".concat(-1, "5"), "2".concat(-1, "5"), "".concat(-1), "2".concat(-1), "".concat(-1, "5"), "2".concat(-1, "5"), "".concat(12), "2".concat(12), "".concat(12, "5"), "2".concat(12, "5"), "".concat(12), "2".concat(12), "".concat(12, "5"), "2".concat(12, "5"), "".concat(0), "2".concat(0), "".concat(0, "5"), "2".concat(0, "5"), "".concat(0), "2".concat(0), "".concat(0, "5"), "2".concat(0, "5"), "".concat(-1), "2".concat(-1), "".concat(-1, "5"), "2".concat(-1, "5"), "".concat(-1), "2".concat(-1), "".concat(-1, "5"), "2".concat(-1, "5"), "".concat(12), "2".concat(12), "".concat(12, "5"), "2".concat(12, "5"), "".concat(12), "2".concat(12), "".concat(12, "5"), "2".concat(12, "5"), "".concat(0), "2".concat(0), "".concat(0, "5"), "2".concat(0, "5"), "".concat(0), "2".concat(0), "".concat(0, "5"), "2".concat(0, "5"); |
1 change: 0 additions & 1 deletion
1
crates/swc/tests/tsc-references/templateStringInArray.2.minified.js
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
//// [templateStringInArray.ts] | ||
"abc".concat(123, "def"); |
1 change: 0 additions & 1 deletion
1
crates/swc/tests/tsc-references/templateStringInDivision.2.minified.js
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
//// [templateStringInDivision.ts] | ||
"abc".concat(1, "def"); |
1 change: 0 additions & 1 deletion
1
crates/swc/tests/tsc-references/templateStringInEqualityChecks.2.minified.js
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
//// [templateStringInEqualityChecks.ts] | ||
"abc" === "abc".concat(0, "abc") || "abc" !== "abc".concat(0, "abc") && "abc0abc" == "abc".concat(0, "abc") && "abc".concat(0, "abc"); |
1 change: 0 additions & 1 deletion
1
crates/swc/tests/tsc-references/templateStringInModulo.2.minified.js
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
//// [templateStringInModulo.ts] | ||
"abc".concat(1, "def"); |
1 change: 0 additions & 1 deletion
1
crates/swc/tests/tsc-references/templateStringInMultiplication.2.minified.js
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
//// [templateStringInMultiplication.ts] | ||
"abc".concat(1, "def"); |
1 change: 0 additions & 1 deletion
1
crates/swc/tests/tsc-references/templateStringInParentheses.2.minified.js
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
//// [templateStringInParentheses.ts] | ||
"abc".concat(0, "abc"); |
1 change: 0 additions & 1 deletion
1
crates/swc/tests/tsc-references/templateStringInPropertyAssignment.2.minified.js
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
//// [templateStringInPropertyAssignment.ts] | ||
"abc".concat(123, "def", 456, "ghi"); |
6 changes: 0 additions & 6 deletions
6
crates/swc/tests/tsc-references/templateStringInSwitchAndCase.2.minified.js
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 |
---|---|---|
@@ -1,7 +1 @@ | ||
//// [templateStringInSwitchAndCase.ts] | ||
switch("abc".concat(0, "abc")){ | ||
case "abc": | ||
case "123": | ||
case "abc".concat(0, "abc"): | ||
"def".concat(1, "def"); | ||
} |
1 change: 0 additions & 1 deletion
1
crates/swc/tests/tsc-references/templateStringInTypeAssertion.2.minified.js
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
//// [templateStringInTypeAssertion.ts] | ||
"abc".concat(123, "def"); |
1 change: 0 additions & 1 deletion
1
crates/swc/tests/tsc-references/templateStringInUnaryPlus.2.minified.js
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
//// [templateStringInUnaryPlus.ts] | ||
"abc".concat(123, "def"); |
2 changes: 1 addition & 1 deletion
2
crates/swc/tests/tsc-references/templateStringInWhile.2.minified.js
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
//// [templateStringInWhile.ts] | ||
for(; "abc".concat(0, "abc");)"def".concat(1, "def"); | ||
for(; "abc".concat(0, "abc");); |
1 change: 0 additions & 1 deletion
1
crates/swc/tests/tsc-references/templateStringWithEmbeddedAddition.2.minified.js
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
//// [templateStringWithEmbeddedAddition.ts] | ||
"abc".concat(20, "def"); |
5 changes: 0 additions & 5 deletions
5
crates/swc/tests/tsc-references/templateStringWithEmbeddedArray.2.minified.js
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 |
---|---|---|
@@ -1,6 +1 @@ | ||
//// [templateStringWithEmbeddedArray.ts] | ||
"abc".concat([ | ||
1, | ||
2, | ||
3 | ||
], "def"); |
3 changes: 0 additions & 3 deletions
3
crates/swc/tests/tsc-references/templateStringWithEmbeddedArrowFunction.2.minified.js
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 |
---|---|---|
@@ -1,4 +1 @@ | ||
//// [templateStringWithEmbeddedArrowFunction.ts] | ||
"abc".concat(function(x) { | ||
return x; | ||
}, "def"); |
1 change: 0 additions & 1 deletion
1
crates/swc/tests/tsc-references/templateStringWithEmbeddedComments.2.minified.js
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
//// [templateStringWithEmbeddedComments.ts] | ||
"head".concat(10, "\nmiddle", 20, "\ntail"); |
1 change: 0 additions & 1 deletion
1
crates/swc/tests/tsc-references/templateStringWithEmbeddedConditional.2.minified.js
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
//// [templateStringWithEmbeddedConditional.ts] | ||
"abc".concat(!1, "def"); |
1 change: 0 additions & 1 deletion
1
crates/swc/tests/tsc-references/templateStringWithEmbeddedDivision.2.minified.js
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
//// [templateStringWithEmbeddedDivision.ts] | ||
"abc".concat(1, "def"); |
3 changes: 0 additions & 3 deletions
3
crates/swc/tests/tsc-references/templateStringWithEmbeddedFunctionExpression.2.minified.js
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 |
---|---|---|
@@ -1,4 +1 @@ | ||
//// [templateStringWithEmbeddedFunctionExpression.ts] | ||
"abc".concat(function y() { | ||
return y; | ||
}, "def"); |
4 changes: 0 additions & 4 deletions
4
crates/swc/tests/tsc-references/templateStringWithEmbeddedInOperator.2.minified.js
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 |
---|---|---|
@@ -1,5 +1 @@ | ||
//// [templateStringWithEmbeddedInOperator.ts] | ||
"abc".concat("hi" in { | ||
hi: 10, | ||
hello: 20 | ||
}, "def"); |
2 changes: 1 addition & 1 deletion
2
crates/swc/tests/tsc-references/templateStringWithEmbeddedInstanceOf.2.minified.js
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
//// [templateStringWithEmbeddedInstanceOf.ts] | ||
import _instanceof from "@swc/helpers/src/_instanceof.mjs"; | ||
"abc".concat(_instanceof("hello", String), "def"); | ||
_instanceof("hello", String); |
1 change: 0 additions & 1 deletion
1
crates/swc/tests/tsc-references/templateStringWithEmbeddedModulo.2.minified.js
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
//// [templateStringWithEmbeddedModulo.ts] | ||
"abc".concat(0, "def"); |
1 change: 0 additions & 1 deletion
1
crates/swc/tests/tsc-references/templateStringWithEmbeddedMultiplication.2.minified.js
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
//// [templateStringWithEmbeddedMultiplication.ts] | ||
"abc".concat(42, "def"); |
1 change: 0 additions & 1 deletion
1
crates/swc/tests/tsc-references/templateStringWithEmbeddedNewOperator.2.minified.js
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
//// [templateStringWithEmbeddedNewOperator.ts] | ||
"abc".concat(new String("Hi"), "def"); |
1 change: 0 additions & 1 deletion
1
crates/swc/tests/tsc-references/templateStringWithEmbeddedNewOperatorES6.2.minified.js
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
//// [templateStringWithEmbeddedNewOperatorES6.ts] | ||
new String("Hi"); |
4 changes: 0 additions & 4 deletions
4
crates/swc/tests/tsc-references/templateStringWithEmbeddedObjectLiteral.2.minified.js
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 |
---|---|---|
@@ -1,5 +1 @@ | ||
//// [templateStringWithEmbeddedObjectLiteral.ts] | ||
"abc".concat({ | ||
x: 10, | ||
y: 20 | ||
}, "def"); |
1 change: 0 additions & 1 deletion
1
.../swc/tests/tsc-references/templateStringWithEmbeddedTypeAssertionOnAddition.2.minified.js
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
//// [templateStringWithEmbeddedTypeAssertionOnAddition.ts] | ||
"abc".concat(20, "def"); |
2 changes: 1 addition & 1 deletion
2
crates/swc/tests/tsc-references/templateStringWithEmbeddedTypeOfOperator.2.minified.js
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
//// [templateStringWithEmbeddedTypeOfOperator.ts] | ||
import _type_of from "@swc/helpers/src/_type_of.mjs"; | ||
"abc".concat(_type_of("hi"), "def"); | ||
_type_of("hi"); |
1 change: 0 additions & 1 deletion
1
crates/swc/tests/tsc-references/templateStringWithEmbeddedUnaryPlus.2.minified.js
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
//// [templateStringWithEmbeddedUnaryPlus.ts] | ||
"abc".concat(Infinity, "def"); |
1 change: 0 additions & 1 deletion
1
crates/swc/tests/tsc-references/templateStringWithEmptyLiteralPortions.2.minified.js
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
//// [templateStringWithEmptyLiteralPortions.ts] | ||
"".concat(0), "1".concat(0), "".concat(0, "2"), "1".concat(0, "2"), "".concat(0, 0), "1".concat(0, 0), "".concat(0, "2", 0), "1".concat(0, "2", 0), "".concat(0, 0, "3"), "1".concat(0, 0, "3"), "".concat(0, "2", 0, "3"), "1".concat(0, "2", 0, "3"); |
1 change: 0 additions & 1 deletion
1
crates/swc/tests/tsc-references/templateStringWithOpenCommentInStringPortion.2.minified.js
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
//// [templateStringWithOpenCommentInStringPortion.ts] | ||
" /**head ".concat(10, " // still middle ", 20, " /* still tail "); |
1 change: 0 additions & 1 deletion
1
crates/swc/tests/tsc-references/templateStringWithPropertyAccessES6.2.minified.js
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
//// [templateStringWithPropertyAccessES6.ts] | ||
"abc0abc".indexOf("abc"); |
1 change: 0 additions & 1 deletion
1
...s/templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.2.minified.js
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
//// [templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.ts] | ||
"".concat(function(x) {}); |
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 |
---|---|---|
@@ -1 +0,0 @@ | ||
"".concat(100, "testing"); | ||
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.
cc848db
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
361341
ns/iter (± 37986
)436307
ns/iter (± 32385
)0.83
es/full/minify/libraries/antd
1970925365
ns/iter (± 97019830
)2126277437
ns/iter (± 66544545
)0.93
es/full/minify/libraries/d3
469844760
ns/iter (± 35278960
)429381788
ns/iter (± 11305454
)1.09
es/full/minify/libraries/echarts
1723843083
ns/iter (± 155929745
)1812696108
ns/iter (± 70089579
)0.95
es/full/minify/libraries/jquery
116960351
ns/iter (± 9732582
)173313745
ns/iter (± 101346846
)0.67
es/full/minify/libraries/lodash
132184701
ns/iter (± 4100701
)143424466
ns/iter (± 4605003
)0.92
es/full/minify/libraries/moment
80288984
ns/iter (± 17742530
)71211711
ns/iter (± 5020616
)1.13
es/full/minify/libraries/react
26810802
ns/iter (± 3088453
)25783015
ns/iter (± 2638855
)1.04
es/full/minify/libraries/terser
386230068
ns/iter (± 59321492
)346419831
ns/iter (± 23592199
)1.11
es/full/minify/libraries/three
732739609
ns/iter (± 47152743
)625352795
ns/iter (± 40312972
)1.17
es/full/minify/libraries/typescript
4424121904
ns/iter (± 265980401
)4148999821
ns/iter (± 117806755
)1.07
es/full/minify/libraries/victory
1036680382
ns/iter (± 110054270
)917375856
ns/iter (± 31948624
)1.13
es/full/minify/libraries/vue
459858033
ns/iter (± 106735268
)187323170
ns/iter (± 22261199
)2.45
es/full/codegen/es3
39031
ns/iter (± 7039
)42938
ns/iter (± 1727
)0.91
es/full/codegen/es5
40508
ns/iter (± 6356
)42750
ns/iter (± 5070
)0.95
es/full/codegen/es2015
40911
ns/iter (± 12898
)42222
ns/iter (± 2050
)0.97
es/full/codegen/es2016
43661
ns/iter (± 10816
)42368
ns/iter (± 3179
)1.03
es/full/codegen/es2017
44226
ns/iter (± 9747
)42892
ns/iter (± 2919
)1.03
es/full/codegen/es2018
41469
ns/iter (± 13014
)43464
ns/iter (± 7032
)0.95
es/full/codegen/es2019
41094
ns/iter (± 8278
)42526
ns/iter (± 1851
)0.97
es/full/codegen/es2020
38558
ns/iter (± 5932
)43033
ns/iter (± 2202
)0.90
es/full/all/es3
232301760
ns/iter (± 61228780
)242975838
ns/iter (± 23480303
)0.96
es/full/all/es5
241090816
ns/iter (± 83246084
)230817583
ns/iter (± 16504197
)1.04
es/full/all/es2015
165743067
ns/iter (± 19607532
)181934898
ns/iter (± 14632648
)0.91
es/full/all/es2016
173814183
ns/iter (± 27493236
)181028295
ns/iter (± 15751721
)0.96
es/full/all/es2017
161714159
ns/iter (± 21427994
)182751339
ns/iter (± 9941067
)0.88
es/full/all/es2018
188642783
ns/iter (± 29828753
)181901217
ns/iter (± 14655668
)1.04
es/full/all/es2019
179093990
ns/iter (± 21437731
)178134235
ns/iter (± 18258760
)1.01
es/full/all/es2020
150752978
ns/iter (± 20152963
)174217115
ns/iter (± 17574202
)0.87
es/full/parser
774222
ns/iter (± 108428
)932897
ns/iter (± 133091
)0.83
es/full/base/fixer
27997
ns/iter (± 3767
)32752
ns/iter (± 860
)0.85
es/full/base/resolver_and_hygiene
100277
ns/iter (± 8106
)118428
ns/iter (± 4266
)0.85
serialization of ast node
220
ns/iter (± 27
)263
ns/iter (± 24
)0.84
serialization of serde
262
ns/iter (± 34
)272
ns/iter (± 29
)0.96
This comment was automatically generated by workflow using github-action-benchmark.
cc848db
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.
Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold
2
.es/full/minify/libraries/vue
459858033
ns/iter (± 106735268
)187323170
ns/iter (± 22261199
)2.45
This comment was automatically generated by workflow using github-action-benchmark.
CC: @kdy1