Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not deoptimize entire super class when adding a property (#4489)
- Loading branch information
1 parent
19aef13
commit 47d8d5a
Showing
4 changed files
with
16 additions
and
1 deletion.
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: 'does not deoptimize the entire superclass when reassigning a property' | ||
}; |
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,2 @@ | ||
// Everything else should be removed | ||
console.log('retained'); |
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,10 @@ | ||
class Foo {} | ||
|
||
Foo.prototype.bar = {}; | ||
|
||
class Bar extends Foo {} | ||
|
||
Bar.baz = {}; | ||
|
||
// Everything else should be removed | ||
console.log('retained'); |