Index: src/x64/full-codegen-x64.cc |
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc |
index 2ccd923f73be814c66aa714be28ced5bcd291d56..3132716d899371abc71f08112192bd26c14cf94c 100644 |
--- a/src/x64/full-codegen-x64.cc |
+++ b/src/x64/full-codegen-x64.cc |
@@ -1626,8 +1626,6 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
} |
break; |
} |
- // Fall through. |
- case ObjectLiteral::Property::PROTOTYPE: |
__ push(Operand(rsp, 0)); // Duplicate receiver. |
VisitForStackValue(key); |
VisitForStackValue(value); |
@@ -1638,6 +1636,15 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
__ Drop(3); |
} |
break; |
+ case ObjectLiteral::Property::PROTOTYPE: |
+ __ push(Operand(rsp, 0)); // Duplicate receiver. |
+ VisitForStackValue(value); |
+ if (property->emit_store()) { |
+ __ CallRuntime(Runtime::kSetPrototype, 2); |
+ } else { |
+ __ Drop(2); |
+ } |
+ break; |
case ObjectLiteral::Property::GETTER: |
accessor_table.lookup(key)->second->getter = value; |
break; |