| Index: src/arm/full-codegen-arm.cc
|
| diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc
|
| index 24ccf09ce5dd49ac80bda33e04385a60a9078842..3dc54203b17c5de74f7a6ac5a4b2d58fb31c7ee6 100644
|
| --- a/src/arm/full-codegen-arm.cc
|
| +++ b/src/arm/full-codegen-arm.cc
|
| @@ -1686,13 +1686,11 @@
|
| expr->CalculateEmitStore(zone());
|
|
|
| AccessorTable accessor_table(zone());
|
| - int property_index = 0;
|
| - for (; property_index < expr->properties()->length(); property_index++) {
|
| - ObjectLiteral::Property* property = expr->properties()->at(property_index);
|
| - if (property->is_computed_name()) break;
|
| + for (int i = 0; i < expr->properties()->length(); i++) {
|
| + ObjectLiteral::Property* property = expr->properties()->at(i);
|
| if (property->IsCompileTimeValue()) continue;
|
|
|
| - Literal* key = property->key()->AsLiteral();
|
| + Literal* key = property->key();
|
| Expression* value = property->value();
|
| if (!result_saved) {
|
| __ push(r0); // Save result on stack
|
| @@ -1778,67 +1776,6 @@
|
| __ mov(r0, Operand(Smi::FromInt(NONE)));
|
| __ push(r0);
|
| __ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked, 5);
|
| - }
|
| -
|
| - // Object literals have two parts. The "static" part on the left contains no
|
| - // computed property names, and so we can compute its map ahead of time; see
|
| - // runtime.cc::CreateObjectLiteralBoilerplate. The second "dynamic" part
|
| - // starts with the first computed property name, and continues with all
|
| - // properties to its right. All the code from above initializes the static
|
| - // component of the object literal, and arranges for the map of the result to
|
| - // reflect the static order in which the keys appear. For the dynamic
|
| - // properties, we compile them into a series of "SetOwnProperty" runtime
|
| - // calls. This will preserve insertion order.
|
| - for (; property_index < expr->properties()->length(); property_index++) {
|
| - ObjectLiteral::Property* property = expr->properties()->at(property_index);
|
| -
|
| - Expression* value = property->value();
|
| - if (!result_saved) {
|
| - __ push(r0); // Save result on the stack
|
| - result_saved = true;
|
| - }
|
| -
|
| - __ ldr(r0, MemOperand(sp)); // Duplicate receiver.
|
| - __ push(r0);
|
| -
|
| - if (property->kind() == ObjectLiteral::Property::PROTOTYPE) {
|
| - DCHECK(!property->is_computed_name());
|
| - VisitForStackValue(value);
|
| - if (property->emit_store()) {
|
| - __ CallRuntime(Runtime::kInternalSetPrototype, 2);
|
| - } else {
|
| - __ Drop(2);
|
| - }
|
| - } else {
|
| - EmitPropertyKey(property);
|
| - VisitForStackValue(value);
|
| -
|
| - switch (property->kind()) {
|
| - case ObjectLiteral::Property::CONSTANT:
|
| - case ObjectLiteral::Property::MATERIALIZED_LITERAL:
|
| - case ObjectLiteral::Property::COMPUTED:
|
| - if (property->emit_store()) {
|
| - __ mov(r0, Operand(Smi::FromInt(NONE)));
|
| - __ push(r0);
|
| - __ CallRuntime(Runtime::kDefineDataPropertyUnchecked, 4);
|
| - } else {
|
| - __ Drop(3);
|
| - }
|
| - break;
|
| -
|
| - case ObjectLiteral::Property::PROTOTYPE:
|
| - UNREACHABLE();
|
| - break;
|
| -
|
| - case ObjectLiteral::Property::GETTER:
|
| - __ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 3);
|
| - break;
|
| -
|
| - case ObjectLiteral::Property::SETTER:
|
| - __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 3);
|
| - break;
|
| - }
|
| - }
|
| }
|
|
|
| if (expr->has_function()) {
|
| @@ -2541,7 +2478,9 @@
|
|
|
| for (int i = 0; i < lit->properties()->length(); i++) {
|
| ObjectLiteral::Property* property = lit->properties()->at(i);
|
| + Literal* key = property->key()->AsLiteral();
|
| Expression* value = property->value();
|
| + DCHECK(key != NULL);
|
|
|
| if (property->is_static()) {
|
| __ ldr(scratch, MemOperand(sp, kPointerSize)); // constructor
|
| @@ -2549,7 +2488,7 @@
|
| __ ldr(scratch, MemOperand(sp, 0)); // prototype
|
| }
|
| __ push(scratch);
|
| - EmitPropertyKey(property);
|
| + VisitForStackValue(key);
|
| VisitForStackValue(value);
|
| EmitSetHomeObjectIfNeeded(value, 2);
|
|
|
| @@ -2562,11 +2501,11 @@
|
| break;
|
|
|
| case ObjectLiteral::Property::GETTER:
|
| - __ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 3);
|
| + __ CallRuntime(Runtime::kDefineClassGetter, 3);
|
| break;
|
|
|
| case ObjectLiteral::Property::SETTER:
|
| - __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 3);
|
| + __ CallRuntime(Runtime::kDefineClassSetter, 3);
|
| break;
|
|
|
| default:
|
|
|