-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(es/minifier): Fix the order of match arms to inline correctly (#1…
- Loading branch information
Showing
39 changed files
with
2,618 additions
and
2,683 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
swc_core: patch | ||
swc_ecma_minifier: patch | ||
--- | ||
|
||
fix(es/minifier): Try inline value ignored assign |
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
6 changes: 3 additions & 3 deletions
6
crates/swc/tests/tsc-references/computedPropertyNames1_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,6 +1,6 @@ | ||
//// [computedPropertyNames1_ES5.ts] | ||
import { _ as _define_enumerable_properties } from "@swc/helpers/_/_define_enumerable_properties"; | ||
var _obj, _mutatorMap = {}; | ||
_obj = {}, _mutatorMap[1] = _mutatorMap[1] || {}, _mutatorMap[1].get = function() { | ||
var _mutatorMap = {}; | ||
_mutatorMap[1] = _mutatorMap[1] || {}, _mutatorMap[1].get = function() { | ||
return 0; | ||
}, _mutatorMap[1] = _mutatorMap[1] || {}, _mutatorMap[1].set = function(v) {}, _define_enumerable_properties(_obj, _mutatorMap); | ||
}, _mutatorMap[1] = _mutatorMap[1] || {}, _mutatorMap[1].set = function(v) {}, _define_enumerable_properties({}, _mutatorMap); |
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
4 changes: 2 additions & 2 deletions
4
crates/swc/tests/tsc-references/parserES5ComputedPropertyName4.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,4 @@ | ||
//// [parserES5ComputedPropertyName4.ts] | ||
import { _ as _define_enumerable_properties } from "@swc/helpers/_/_define_enumerable_properties"; | ||
var _obj, _mutatorMap = {}; | ||
_obj = {}, _mutatorMap[e] = _mutatorMap[e] || {}, _mutatorMap[e].get = function() {}, _define_enumerable_properties(_obj, _mutatorMap); | ||
var _mutatorMap = {}; | ||
_mutatorMap[e] = _mutatorMap[e] || {}, _mutatorMap[e].get = function() {}, _define_enumerable_properties({}, _mutatorMap); |
8 changes: 3 additions & 5 deletions
8
...es/swc/tests/tsc-references/privateNameComputedPropertyName2(target=es2015).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,16 +1,14 @@ | ||
//// [privateNameComputedPropertyName2.ts] | ||
let getX; | ||
import { _ as _class_private_field_get } from "@swc/helpers/_/_class_private_field_get"; | ||
import { _ as _class_private_field_init } from "@swc/helpers/_/_class_private_field_init"; | ||
import { _ as _class_private_field_set } from "@swc/helpers/_/_class_private_field_set"; | ||
var _x = /*#__PURE__*/ new WeakMap(); | ||
let _tmp = (getX = (a)=>_class_private_field_get(a, _x), "_"); | ||
console.log(getX(new class { | ||
[_tmp]() {} | ||
console.log(_class_private_field_get(new class { | ||
_() {} | ||
constructor(){ | ||
_class_private_field_init(this, _x, { | ||
writable: !0, | ||
value: void 0 | ||
}), _class_private_field_set(this, _x, 100); | ||
} | ||
})); | ||
}, _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
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.