Index: src/ast.cc |
diff --git a/src/ast.cc b/src/ast.cc |
index 7369e75ea1558c7d5b5d2a692b97d2f263ecd5c7..4280a983649608aae812c1b9d260f83ca4581d49 100644 |
--- a/src/ast.cc |
+++ b/src/ast.cc |
@@ -239,7 +239,6 @@ void ObjectLiteral::CalculateEmitStore(Zone* zone) { |
ZoneHashMap table(Literal::Match, ZoneHashMap::kDefaultHashMapCapacity, |
allocator); |
- bool seen_prototype = false; |
for (int i = properties()->length() - 1; i >= 0; i--) { |
ObjectLiteral::Property* property = properties()->at(i); |
if (property->is_computed_name()) continue; |
@@ -252,13 +251,7 @@ void ObjectLiteral::CalculateEmitStore(Zone* zone) { |
property->kind() == ObjectLiteral::Property::COMPUTED) && |
table.Lookup(literal, hash, false, allocator) != NULL) { |
property->set_emit_store(false); |
- } else if (property->kind() == ObjectLiteral::Property::PROTOTYPE) { |
- // Only emit a store for the last prototype property. Make sure we do not |
- // clobber the "__proto__" name for instance properties (using method or |
- // literal shorthand syntax). |
- property->set_emit_store(!seen_prototype); |
- seen_prototype = true; |
- } else { |
+ } else if (property->kind() != ObjectLiteral::Property::PROTOTYPE) { |
// Add key to the table. |
table.Lookup(literal, hash, true, allocator); |
} |