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

Unified Diff: src/ast.cc

Issue 22982005: Fix overwriting order of object literal properties for MATERIALIZED_LITERALs (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: add crankshaft testcase Created 7 years, 4 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 | « no previous file | test/mjsunit/object-literal-overwrite.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.cc
diff --git a/src/ast.cc b/src/ast.cc
index 2077f87d74153ba31e6fc94250a89508c3aeddda..23b680d47f4805dbb2b18a7a4cf3f8c82c6bb485 100644
--- a/src/ast.cc
+++ b/src/ast.cc
@@ -273,7 +273,8 @@ void ObjectLiteral::CalculateEmitStore(Zone* zone) {
uint32_t hash = literal->Hash();
// If the key of a computed property is in the table, do not emit
// a store for the property later.
- if (property->kind() == ObjectLiteral::Property::COMPUTED &&
+ if ((property->kind() == ObjectLiteral::Property::MATERIALIZED_LITERAL ||
+ property->kind() == ObjectLiteral::Property::COMPUTED) &&
table.Lookup(literal, hash, false, allocator) != NULL) {
property->set_emit_store(false);
} else {
« no previous file with comments | « no previous file | test/mjsunit/object-literal-overwrite.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698