Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mod(es/base): Stable context for unresolved and global
- Loading branch information
Showing
205 changed files
with
1,049 additions
and
1,046 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
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
8 changes: 4 additions & 4 deletions
8
crates/swc_ecma_transforms_base/tests/resolver/babel/issue/973/output.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 @@ | ||
let arr__1 = []; | ||
for(let i__2 = 0; i__2 < 10; i__2++){ | ||
for(let i__4 = 0; i__4 < 10; i__4++){ | ||
arr__1.push(()=>i__4); | ||
let arr__2 = []; | ||
for(let i__3 = 0; i__3 < 10; i__3++){ | ||
for(let i__5 = 0; i__5 < 10; i__5++){ | ||
arr__2.push(()=>i__5); | ||
} | ||
} |
8 changes: 4 additions & 4 deletions
8
crates/swc_ecma_transforms_base/tests/resolver/basic/1/output.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,8 +1,8 @@ | ||
{ | ||
var foo__1 = 1; | ||
var foo__2 = 1; | ||
{ | ||
let foo__3 = 2; | ||
use(foo__3); | ||
let foo__4 = 2; | ||
use(foo__4); | ||
} | ||
use(foo__1); | ||
use(foo__2); | ||
} |
4 changes: 2 additions & 2 deletions
4
crates/swc_ecma_transforms_base/tests/resolver/basic/no-usage/output.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 @@ | ||
let foo__1; | ||
let foo__2; | ||
{ | ||
let foo__2; | ||
let foo__3; | ||
} |
10 changes: 5 additions & 5 deletions
10
crates/swc_ecma_transforms_base/tests/resolver/block/scope/class/output.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,9 +1,9 @@ | ||
const g__1 = 20; | ||
function baz__1() { | ||
const g__2 = 20; | ||
function baz__2() { | ||
{ | ||
class g__3 { | ||
class g__4 { | ||
} | ||
console.log(g__3); | ||
console.log(g__4); | ||
} | ||
return g__1; | ||
return g__2; | ||
} |
8 changes: 4 additions & 4 deletions
8
crates/swc_ecma_transforms_base/tests/resolver/class/block/1/output.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,5 @@ | ||
var Foo__1 = function(_Bar__2) { | ||
_inherits(Foo__2, _Bar__2); | ||
function Foo__2() {} | ||
return Foo__2; | ||
var Foo__2 = function(_Bar__3) { | ||
_inherits(Foo__3, _Bar__3); | ||
function Foo__3() {} | ||
return Foo__3; | ||
}(Bar); |
8 changes: 4 additions & 4 deletions
8
crates/swc_ecma_transforms_base/tests/resolver/class/block/2/output.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,5 @@ | ||
var Foo__1 = function(_Bar__2) { | ||
_inherits(Foo__2, _Bar__2); | ||
function Foo__2() {} | ||
return Foo__2; | ||
var Foo__2 = function(_Bar__3) { | ||
_inherits(Foo__3, _Bar__3); | ||
function Foo__3() {} | ||
return Foo__3; | ||
}(Bar); |
4 changes: 2 additions & 2 deletions
4
crates/swc_ecma_transforms_base/tests/resolver/class/expr/scope/output.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,7 @@ | ||
let Test__1 = 2; | ||
let Test__2 = 2; | ||
test(class Test__3 { | ||
hi() { | ||
console.log(Test__3); | ||
} | ||
}); | ||
Test__1 = 4; | ||
Test__2 = 4; |
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_ecma_transforms_base/tests/resolver/class/nested/var/output.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
18 changes: 9 additions & 9 deletions
18
crates/swc_ecma_transforms_base/tests/resolver/class/singleton/output.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,14 +1,14 @@ | ||
var singleton__1; | ||
var Sub__1 = function(_Foo__2) { | ||
_inherits(Sub__2, _Foo__2); | ||
function Sub__2() { | ||
var singleton__2; | ||
var Sub__2 = function(_Foo__3) { | ||
_inherits(Sub__3, _Foo__3); | ||
function Sub__3() { | ||
var _this__4; | ||
_classCallCheck(this, Sub__2); | ||
if (singleton__1) { | ||
return _possibleConstructorReturn(_this__4, singleton__1); | ||
_classCallCheck(this, Sub__3); | ||
if (singleton__2) { | ||
return _possibleConstructorReturn(_this__4, singleton__2); | ||
} | ||
singleton__1 = _this__4 = _possibleConstructorReturn(this, _getPrototypeOf(Sub__2).call(this)); | ||
singleton__2 = _this__4 = _possibleConstructorReturn(this, _getPrototypeOf(Sub__3).call(this)); | ||
return _possibleConstructorReturn(_this__4); | ||
} | ||
return Sub__2; | ||
return Sub__3; | ||
}(Foo); |
10 changes: 5 additions & 5 deletions
10
crates/swc_ecma_transforms_base/tests/resolver/class/super/output.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,8 +1,8 @@ | ||
function foo__1() { | ||
const sym__2 = "dasdas"; | ||
return class Bar__3 extends Foo { | ||
[sym__2]() { | ||
return super[sym__2]() + super.sym(); | ||
function foo__2() { | ||
const sym__3 = "dasdas"; | ||
return class Bar__4 extends Foo { | ||
[sym__3]() { | ||
return super[sym__3]() + super.sym(); | ||
} | ||
}; | ||
} |
12 changes: 6 additions & 6 deletions
12
crates/swc_ecma_transforms_base/tests/resolver/class/var/1/output.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,10 +1,10 @@ | ||
var Foo__1 = function(_Bar__2) { | ||
_inherits(Foo__2, _Bar__2); | ||
function Foo__2() { | ||
var Foo__2 = function(_Bar__3) { | ||
_inherits(Foo__3, _Bar__3); | ||
function Foo__3() { | ||
var _this__4; | ||
_classCallCheck(this, Foo__2); | ||
Foo__2[_assertThisInitialized(_this__4)]; | ||
_classCallCheck(this, Foo__3); | ||
Foo__3[_assertThisInitialized(_this__4)]; | ||
return _possibleConstructorReturn(_this__4); | ||
} | ||
return Foo__2; | ||
return Foo__3; | ||
}(Bar); |
2 changes: 1 addition & 1 deletion
2
crates/swc_ecma_transforms_base/tests/resolver/class/var/constructor-only/output.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 +1 @@ | ||
var Foo__1 = function Foo__2() {}; | ||
var Foo__2 = function Foo__3() {}; |
10 changes: 5 additions & 5 deletions
10
crates/swc_ecma_transforms_base/tests/resolver/deno/8620/1/output.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,7 @@ | ||
const b__1 = 1; | ||
const b1__1 = 2; | ||
const b__2 = 1; | ||
const b1__2 = 2; | ||
{ | ||
const b__2 = 3; | ||
const b1__2 = 4; | ||
const b2__2 = 5; | ||
const b__3 = 3; | ||
const b1__3 = 4; | ||
const b2__3 = 5; | ||
} |
10 changes: 5 additions & 5 deletions
10
crates/swc_ecma_transforms_base/tests/resolver/deno/9121/1/output.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,12 +1,12 @@ | ||
var ___1 = 1; | ||
function wt__1(e__2, n__2, t__2, r__2) { | ||
var l__2 = e__2.updateQueue; | ||
var ___2 = 1; | ||
function wt__2(e__3, n__3, t__3, r__3) { | ||
var l__3 = e__3.updateQueue; | ||
if (u !== null) { | ||
if (y !== null) { | ||
var ___2 = y.lastBaseUpdate; | ||
var ___3 = y.lastBaseUpdate; | ||
} | ||
} | ||
if (i !== null) { | ||
___2 = l__2.baseState, o = 0, y = d = s = null; | ||
___3 = l__3.baseState, o = 0, y = d = s = null; | ||
} | ||
} |
8 changes: 4 additions & 4 deletions
8
crates/swc_ecma_transforms_base/tests/resolver/deno/9121/2/output.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,11 +1,11 @@ | ||
var ___1 = 1; | ||
function wt__1() { | ||
var ___2 = 1; | ||
function wt__2() { | ||
if (u !== null) { | ||
if (y !== null) { | ||
var ___2 = 2; | ||
var ___3 = 2; | ||
} | ||
} | ||
if (i !== null) { | ||
___2 = 3; | ||
___3 = 3; | ||
} | ||
} |
8 changes: 4 additions & 4 deletions
8
crates/swc_ecma_transforms_base/tests/resolver/export/default/class/decl/scope/output.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,7 @@ | ||
export default class Test__1 { | ||
export default class Test__2 { | ||
hi() { | ||
let Test__2 = 2; | ||
console.log(Test__2); | ||
let Test__3 = 2; | ||
console.log(Test__3); | ||
} | ||
} | ||
Test__1 = 2; | ||
Test__2 = 2; |
10 changes: 5 additions & 5 deletions
10
crates/swc_ecma_transforms_base/tests/resolver/export/default/fn_decl/scope/output.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,7 @@ | ||
export default function foo__1() { | ||
foo__1 = function foo__3(x__4) { | ||
return x__4 === 0 ? 1 : 1 + foo__3(x__4 - 1); | ||
export default function foo__2() { | ||
foo__2 = function foo__4(x__5) { | ||
return x__5 === 0 ? 1 : 1 + foo__4(x__5 - 1); | ||
}; | ||
return foo__1(10); | ||
return foo__2(10); | ||
} | ||
foo__1 = 2; | ||
foo__2 = 2; |
8 changes: 4 additions & 4 deletions
8
crates/swc_ecma_transforms_base/tests/resolver/fn_expr/scope/output.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 @@ | ||
test(function foo__2() { | ||
foo__2 = function foo__4(x__5) { | ||
return x__5 === 0 ? 1 : 1 + foo__4(x__5 - 1); | ||
test(function foo__3() { | ||
foo__3 = function foo__5(x__6) { | ||
return x__6 === 0 ? 1 : 1 + foo__5(x__6 - 1); | ||
}; | ||
return foo__2(10); | ||
return foo__3(10); | ||
}); |
10 changes: 5 additions & 5 deletions
10
crates/swc_ecma_transforms_base/tests/resolver/for_of_hoisting/output.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,11 +1,11 @@ | ||
var k__1, v__1; | ||
var map__1 = new Map([ | ||
var k__2, v__2; | ||
var map__2 = new Map([ | ||
[ | ||
"", | ||
true | ||
] | ||
]); | ||
for ([k__1, ...[v__1]] of map__1){ | ||
k__1; | ||
v__1; | ||
for ([k__2, ...[v__2]] of map__2){ | ||
k__2; | ||
v__2; | ||
} |
8 changes: 4 additions & 4 deletions
8
crates/swc_ecma_transforms_base/tests/resolver/function/body/output.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,5 @@ | ||
let a__1 = "foo"; | ||
function foo__1() { | ||
let a__2 = "bar"; | ||
use(a__2); | ||
let a__2 = "foo"; | ||
function foo__2() { | ||
let a__3 = "bar"; | ||
use(a__3); | ||
} |
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_ecma_transforms_base/tests/resolver/function/param/output.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 @@ | ||
let a__1 = "foo"; | ||
function foo__1(a__2) { | ||
use(a__2); | ||
let a__2 = "foo"; | ||
function foo__2(a__3) { | ||
use(a__3); | ||
} |
10 changes: 5 additions & 5 deletions
10
crates/swc_ecma_transforms_base/tests/resolver/general/assignment/patterns/output.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
4 changes: 2 additions & 2 deletions
4
crates/swc_ecma_transforms_base/tests/resolver/general/function/output.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 @@ | ||
function test__1() { | ||
let foo__2 = "bar"; | ||
function test__2() { | ||
let foo__3 = "bar"; | ||
} |
4 changes: 2 additions & 2 deletions
4
crates/swc_ecma_transforms_base/tests/resolver/global/object/output.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 @@ | ||
function foo__1(Object__2) { | ||
Object__2.defineProperty(); | ||
function foo__2(Object__3) { | ||
Object__3.defineProperty(); | ||
} |
Oops, something went wrong.