-
-
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.
workaround for various object literal mutation bugs (#3266)
* Workaround for various object literal mutation bugs. Some necessary minor regressions related to previously unsafe object literal optimizations. fixes #2345 fixes #2473 fixes #3027 fixes #3093 fixes #3192 fixes #3264 * Remove special logic to handle deoptimizing properties, always deopt `this` by default
- Loading branch information
1 parent
c753a7f
commit 3e0aa46
Showing
31 changed files
with
256 additions
and
324 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
10 changes: 10 additions & 0 deletions
10
test/form/samples/builtin-prototypes/object-expression/_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 |
---|---|---|
@@ -1 +1,11 @@ | ||
const object = {}; | ||
const propertyIsEnumerable1 = object.propertyIsEnumerable( 'toString' ); | ||
const propertyIsEnumerable2 = {}.propertyIsEnumerable( 'toString' ); | ||
const propertyIsEnumerable3 = {}.propertyIsEnumerable( 'toString' ).valueOf(); | ||
|
||
const _hasOwnProperty = {}.hasOwnProperty( 'toString' ).valueOf(); | ||
const _isPrototypeOf = {}.isPrototypeOf( {} ).valueOf(); | ||
const _propertyIsEnumerable = {}.propertyIsEnumerable( 'toString' ).valueOf(); | ||
const _toLocaleString = {}.toLocaleString().trim(); | ||
const _toString = {}.toString().trim(); | ||
const _valueOf = {}.valueOf(); |
11 changes: 11 additions & 0 deletions
11
test/form/samples/conditional-expression-paths/_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
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
42 changes: 0 additions & 42 deletions
42
test/form/samples/getter-return-values/_expected/system.js
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
20 changes: 20 additions & 0 deletions
20
test/form/samples/object-literal-property-overwrites/_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
11 changes: 10 additions & 1 deletion
11
test/form/samples/property-setters-and-getters/early-access-getter-return/_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 |
---|---|---|
@@ -1,7 +1,16 @@ | ||
function getReturnExpressionBeforeInit() { | ||
{ | ||
const bar = { | ||
[foo.value()]: true | ||
}; | ||
if (bar.baz) { | ||
console.log('retained'); | ||
} | ||
} | ||
|
||
const foo = { | ||
get value() { | ||
return () => 'baz'; | ||
} | ||
}; | ||
|
||
getReturnExpressionBeforeInit(); |
Oops, something went wrong.