Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(390)

Unified Diff: test/mjsunit/regress/regress-crbug-627828.js

Issue 2619773002: [turbofan] Use feedback from StoreDataPropertyInLiteral. (Closed)
Patch Set: Fix DCHECKs. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/verifier.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-crbug-627828.js
diff --git a/test/mjsunit/regress/regress-crbug-627828.js b/test/mjsunit/regress/regress-crbug-627828.js
index 75ff77cb648c0efca4b2e14ec340a137fe58a30c..12c59a37c6e8a31c901044da7dff8db40aa9c424 100644
--- a/test/mjsunit/regress/regress-crbug-627828.js
+++ b/test/mjsunit/regress/regress-crbug-627828.js
@@ -4,7 +4,7 @@
// Flags: --allow-natives-syntax
-(function TestDeoptFromCopmputedNameInObjectLiteral() {
+(function TestDeoptFromComputedNameInObjectLiteral() {
function f() {
var o = {
toString: function() {
@@ -20,7 +20,38 @@
assertEquals(23, f().x());
})();
-(function TestDeoptFromCopmputedNameInClassLiteral() {
+(function TestDeoptFromComputedNameInObjectLiteralWithModifiedPrototype() {
+ // The prototype chain should not be used if the definition
+ // happens in the object literal.
+
+ Object.defineProperty(Object.prototype, 'x_proto', {
+ get: function () {
+ return 21;
+ },
+ set: function () {
+ }
+ });
+
+
+ function f() {
+ var o = {
+ toString: function() {
+ %DeoptimizeFunction(f);
+ return "x_proto";
+ }
+ };
+ return { [o]() { return 23 } };
+ }
+ assertEquals(23, f().x_proto());
+ assertEquals(23, f().x_proto());
+ %OptimizeFunctionOnNextCall(f);
+ assertEquals(23, f().x_proto());
+
+ delete Object.prototype.c;
+
+})();
+
+(function TestDeoptFromComputedNameInClassLiteral() {
function g() {
var o = {
toString: function() {
« no previous file with comments | « src/compiler/verifier.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698