Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
59b8673
commit 69cbd75
Showing
17 changed files
with
136 additions
and
18 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
description: 'handles binary expression side-effects' | ||
}; |
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,25 @@ | ||
if ((1 + 1).unknown) { | ||
console.log('retained'); | ||
} else { | ||
console.log('retained'); | ||
} | ||
console.log('retained 1'); | ||
console.log('retained 2'); | ||
console.log('retained 3'); | ||
console.log('retained 4'); | ||
console.log('retained 5'); | ||
console.log('retained 6'); | ||
console.log('retained 7'); | ||
console.log('retained 8'); | ||
console.log('retained 9'); | ||
console.log('retained 10'); | ||
console.log('retained 11'); | ||
console.log('retained 12'); | ||
console.log('retained 13'); | ||
console.log('retained 14'); | ||
console.log('retained 15'); | ||
console.log('retained 16'); | ||
console.log('retained 17'); | ||
if (1 in 2) console.log('retained 18'); | ||
if (1 instanceof 2) console.log('retained 19'); | ||
console.log('retained 20'); |
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,28 @@ | ||
if ((1 + 1).unknown) { | ||
console.log('retained'); | ||
} else { | ||
console.log('retained'); | ||
} | ||
|
||
if (1 != '1') console.log('removed'); | ||
if (1 !== 1) console.log('removed'); | ||
if (4 % 2 === 0) console.log('retained 1'); | ||
if ((6 & 3) === 2) console.log('retained 2'); | ||
if (2 * 3 === 6) console.log('retained 3'); | ||
if (2 ** 3 === 8) console.log('retained 4'); | ||
if (2 + 3 === 5) console.log('retained 5'); | ||
if (3 - 2 === 1) console.log('retained 6'); | ||
if (6 / 3 === 2) console.log('retained 7'); | ||
if (1 < 2 ) console.log('retained 8'); | ||
if (3 << 1 === 6) console.log('retained 9'); | ||
if (3 <= 4) console.log('retained 10'); | ||
if (1 == '1') console.log('retained 11'); | ||
if (1 === 1) console.log('retained 12'); | ||
if (3 > 2) console.log('retained 13'); | ||
if (3 >= 2) console.log('retained 14'); | ||
if (6 >> 1 === 3) console.log('retained 15'); | ||
if (-1 >>> 28 === 15) console.log('retained 16'); | ||
if (3 ^ 5 === 6) console.log('retained 17'); | ||
if (1 in 2) console.log('retained 18'); | ||
if (1 instanceof 2) console.log('retained 19'); | ||
if (2 | 4 === 6) console.log('retained 20'); |
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
3 changes: 1 addition & 2 deletions
3
test/form/samples/builtin-prototypes/array-expression/_config.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 @@ | ||
module.exports = { | ||
description: 'Tree-shake known array prototype functions', | ||
options: { output: { name: 'bundle' } } | ||
description: 'Tree-shake known array prototype functions' | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,3 +30,7 @@ switch ( globalThis.unknown ) { | |
effect(); | ||
} | ||
}()); | ||
|
||
switch ( globalThis.unknown ) { | ||
case effect(): | ||
} |
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 |
---|---|---|
|
@@ -44,3 +44,7 @@ switch ( globalThis.unknown ) { | |
default: | ||
} | ||
}()); | ||
|
||
switch ( globalThis.unknown ) { | ||
case effect(): | ||
} |
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,3 @@ | ||
module.exports = { | ||
description: 'handles unary expression side-effects' | ||
}; |
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,13 @@ | ||
if ((!true).unknown) { | ||
console.log('retained'); | ||
} else { | ||
console.log('retained'); | ||
} | ||
|
||
console.log('retained 1'); | ||
console.log('retained 2'); | ||
console.log('retained 3'); | ||
if (delete 1) console.log('retained 4'); | ||
console.log('retained 5'); | ||
console.log('retained 6'); | ||
console.log('retained 7'); |
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,13 @@ | ||
if ((!true).unknown) { | ||
console.log('retained'); | ||
} else { | ||
console.log('retained'); | ||
} | ||
|
||
if (!false) console.log('retained 1'); | ||
if (+'1' === 1) console.log('retained 2'); | ||
if (-1 + 2 === 1) console.log('retained 3'); | ||
if (delete 1) console.log('retained 4'); | ||
if (typeof 1 === 'number') console.log('retained 5'); | ||
if (void 1 === undefined) console.log('retained 6'); | ||
if (~1 === -2) console.log('retained 7'); |