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
0725fbe
commit f6ea740
Showing
9 changed files
with
39 additions
and
15 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
3 changes: 3 additions & 0 deletions
3
test/function/samples/assignment-deoptimization/assignee-is-deoptimized/_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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
description: 'makes sure the assignee is deoptimized' | ||
}; |
5 changes: 5 additions & 0 deletions
5
test/function/samples/assignment-deoptimization/assignee-is-deoptimized/main.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const flags = { updated: false }; | ||
let toBeUpdated = {}; | ||
toBeUpdated = flags; | ||
toBeUpdated.updated = true; | ||
if (!flags.updated) throw new Error('Update was not tracked'); |
3 changes: 3 additions & 0 deletions
3
test/function/samples/assignment-deoptimization/assignment-target-is-deoptimized/_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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
description: 'makes sure the assignment target is deoptimized' | ||
}; |
3 changes: 3 additions & 0 deletions
3
test/function/samples/assignment-deoptimization/assignment-target-is-deoptimized/main.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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
let updated = false; | ||
updated = true; | ||
if (!updated) throw new Error('Update was not tracked'); |
3 changes: 3 additions & 0 deletions
3
test/function/samples/assignment-deoptimization/nested-assignment/_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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
description: 'tracks assigments nested in expressions that are included for other reasons' | ||
}; |
3 changes: 3 additions & 0 deletions
3
test/function/samples/assignment-deoptimization/nested-assignment/main.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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
let updated = false; | ||
assert.ok(!updated) || (updated = true); | ||
if (!updated) throw new Error('Update was not tracked'); |
3 changes: 3 additions & 0 deletions
3
test/function/samples/assignment-deoptimization/try-catch-inclusion/_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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
description: 'tracks assigments included via try-catch-deoptimization' | ||
}; |
6 changes: 6 additions & 0 deletions
6
test/function/samples/assignment-deoptimization/try-catch-inclusion/main.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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
let updated = false; | ||
try { | ||
updated = true; | ||
} catch (err) {} | ||
|
||
if (!updated) throw new Error('Update was not tracked'); |