Index: src/interpreter/bytecode-generator.cc |
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc |
index 6cf3216f8542caf9af4c8a6543b56b097de79037..097dcb4ff66d678f16c0fa887a7eaed1969ff96f 100644 |
--- a/src/interpreter/bytecode-generator.cc |
+++ b/src/interpreter/bytecode-generator.cc |
@@ -1756,6 +1756,8 @@ void BytecodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
break; |
} |
case ObjectLiteral::Property::PROTOTYPE: { |
+ // __proto__:null is handled by CreateObjectLiteral. |
+ if (property->IsNullPrototype()) break; |
DCHECK(property->emit_store()); |
RegisterList args = register_allocator()->NewRegisterList(2); |
builder()->MoveRegister(literal, args[0]); |
@@ -1805,7 +1807,9 @@ void BytecodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
ObjectLiteral::Property* property = expr->properties()->at(property_index); |
RegisterAllocationScope inner_register_scope(this); |
- if (property->kind() == ObjectLiteral::Property::PROTOTYPE) { |
+ if (property->IsPrototype()) { |
+ // __proto__:null is handled by CreateObjectLiteral. |
+ if (property->IsNullPrototype()) continue; |
DCHECK(property->emit_store()); |
RegisterList args = register_allocator()->NewRegisterList(2); |
builder()->MoveRegister(literal, args[0]); |