Index: src/ia32/full-codegen-ia32.cc |
diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc |
index fb0758faf5cdd5b9263f31c600b66eaf4522d5f7..29dfbe73cbf1628ab6f4fe6370761cf488cfa37e 100644 |
--- a/src/ia32/full-codegen-ia32.cc |
+++ b/src/ia32/full-codegen-ia32.cc |
@@ -1601,8 +1601,6 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
} |
break; |
} |
- // Fall through. |
- case ObjectLiteral::Property::PROTOTYPE: |
__ push(Operand(esp, 0)); // Duplicate receiver. |
VisitForStackValue(key); |
VisitForStackValue(value); |
@@ -1613,6 +1611,15 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
__ Drop(3); |
} |
break; |
+ case ObjectLiteral::Property::PROTOTYPE: |
+ __ push(Operand(esp, 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; |