Index: src/mips64/full-codegen-mips64.cc |
diff --git a/src/mips64/full-codegen-mips64.cc b/src/mips64/full-codegen-mips64.cc |
index 4fb5629af34a8b98ac7ea44fa5a0305423c0ed0d..06a944187410b9aa4ade6860bbf20a9aed8e3117 100644 |
--- a/src/mips64/full-codegen-mips64.cc |
+++ b/src/mips64/full-codegen-mips64.cc |
@@ -1325,6 +1325,19 @@ void FullCodeGenerator::EmitLoadHomeObject(SuperReference* expr) { |
} |
+void FullCodeGenerator::EmitSetHomeObjectIfNeeded(Expression* initializer, |
+ int offset) { |
+ if (NeedsHomeObject(initializer)) { |
+ __ ld(StoreDescriptor::ReceiverRegister(), MemOperand(sp)); |
+ __ li(StoreDescriptor::NameRegister(), |
+ Operand(isolate()->factory()->home_object_symbol())); |
+ __ ld(StoreDescriptor::ValueRegister(), |
+ MemOperand(sp, offset * kPointerSize)); |
+ CallStoreIC(); |
+ } |
+} |
+ |
+ |
void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy, |
TypeofState typeof_state, |
Label* slow) { |
@@ -1683,6 +1696,14 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
__ ld(StoreDescriptor::ReceiverRegister(), MemOperand(sp)); |
CallStoreIC(key->LiteralFeedbackId()); |
PrepareForBailoutForId(key->id(), NO_REGISTERS); |
+ |
+ if (NeedsHomeObject(value)) { |
+ __ Move(StoreDescriptor::ReceiverRegister(), v0); |
+ __ li(StoreDescriptor::NameRegister(), |
+ Operand(isolate()->factory()->home_object_symbol())); |
+ __ ld(StoreDescriptor::ValueRegister(), MemOperand(sp)); |
+ CallStoreIC(); |
+ } |
} else { |
VisitForEffect(value); |
} |
@@ -1694,6 +1715,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
VisitForStackValue(key); |
VisitForStackValue(value); |
if (property->emit_store()) { |
+ EmitSetHomeObjectIfNeeded(value, 2); |
__ li(a0, Operand(Smi::FromInt(SLOPPY))); // PropertyAttributes. |
__ push(a0); |
__ CallRuntime(Runtime::kSetProperty, 4); |
@@ -1730,7 +1752,9 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
__ push(a0); |
VisitForStackValue(it->first); |
EmitAccessor(it->second->getter); |
+ EmitSetHomeObjectIfNeeded(it->second->getter, 2); |
EmitAccessor(it->second->setter); |
+ EmitSetHomeObjectIfNeeded(it->second->setter, 3); |
__ li(a0, Operand(Smi::FromInt(NONE))); |
__ push(a0); |
__ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked, 5); |
@@ -2469,6 +2493,7 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) { |
__ push(scratch); |
VisitForStackValue(key); |
VisitForStackValue(value); |
+ EmitSetHomeObjectIfNeeded(value, 2); |
switch (property->kind()) { |
case ObjectLiteral::Property::CONSTANT: |