| Index: src/a64/full-codegen-a64.cc
|
| diff --git a/src/a64/full-codegen-a64.cc b/src/a64/full-codegen-a64.cc
|
| index 41ee16e1a92be4aadaed95a3435e2722c9524890..fbefe049fcaeba4fca1a105e61cd8a8e3d766d96 100644
|
| --- a/src/a64/full-codegen-a64.cc
|
| +++ b/src/a64/full-codegen-a64.cc
|
| @@ -1690,30 +1690,29 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
|
| }
|
| break;
|
| }
|
| - // Duplicate receiver on stack.
|
| - __ Peek(x0, 0);
|
| - __ Push(x0);
|
| - VisitForStackValue(key);
|
| - VisitForStackValue(value);
|
| if (property->emit_store()) {
|
| + // Duplicate receiver on stack.
|
| + __ Peek(x0, 0);
|
| + __ Push(x0);
|
| + VisitForStackValue(key);
|
| + VisitForStackValue(value);
|
| __ Mov(x0, Operand(Smi::FromInt(NONE))); // PropertyAttributes
|
| __ Push(x0);
|
| __ CallRuntime(Runtime::kSetProperty, 4);
|
| } else {
|
| - __ Drop(3);
|
| + VisitForEffect(key);
|
| + VisitForEffect(value);
|
| }
|
| break;
|
| case ObjectLiteral::Property::PROTOTYPE:
|
| - // Duplicate receiver on stack.
|
| - __ Peek(x0, 0);
|
| - // TODO(jbramley): This push shouldn't be necessary if we don't call the
|
| - // runtime below. In that case, skip it.
|
| - __ Push(x0);
|
| - VisitForStackValue(value);
|
| if (property->emit_store()) {
|
| + // Duplicate receiver on stack.
|
| + __ Peek(x0, 0);
|
| + __ Push(x0);
|
| + VisitForStackValue(value);
|
| __ CallRuntime(Runtime::kSetPrototype, 2);
|
| } else {
|
| - __ Drop(2);
|
| + VisitForEffect(value);
|
| }
|
| break;
|
| case ObjectLiteral::Property::GETTER:
|
|
|