-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent crash for recursive "this" deoptimization (#4091)
* Switch to using ESLint only * Fix commit hook * Fix tests * Adapt VSCode config * Fix changelog * Fix prototypes * Prevent crash for recursive "this" deoptimization
- Loading branch information
1 parent
32d1b60
commit 90d2e62
Showing
4 changed files
with
38 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
description: 'handles recursive "this" deoptimizations (#4089)' | ||
}; |
11 changes: 11 additions & 0 deletions
11
test/form/samples/recursive-this-deoptimization/_expected.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,11 @@ | ||
getObj().getThis().method(); | ||
getObj().getThis().getThis().method(); | ||
|
||
function getObj() { | ||
return { | ||
getThis() { | ||
return this; | ||
}, | ||
method() {}, | ||
}; | ||
} |
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,11 @@ | ||
getObj().getThis().method(); | ||
getObj().getThis().getThis().method(); | ||
|
||
function getObj() { | ||
return { | ||
getThis() { | ||
return this; | ||
}, | ||
method() {}, | ||
}; | ||
} |