| Index: src/full-codegen/arm/full-codegen-arm.cc
|
| diff --git a/src/full-codegen/arm/full-codegen-arm.cc b/src/full-codegen/arm/full-codegen-arm.cc
|
| index 198aa3c107aad47ee0d736223f03aa5bea4083eb..00a92c83be09b163b4d7b9c1a81838c8468a5c22 100644
|
| --- a/src/full-codegen/arm/full-codegen-arm.cc
|
| +++ b/src/full-codegen/arm/full-codegen-arm.cc
|
| @@ -1986,6 +1986,19 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
|
| ClassLiteral::Property* property = lit->properties()->at(i);
|
| Expression* value = property->value();
|
|
|
| + if (property->kind() == ClassLiteral::Property::FIELD &&
|
| + !property->is_static()) {
|
| + // This just does the ToName call on the field name and stores it in a
|
| + // variable (a proxy for which is the value() of this property)
|
| + DCHECK(property->value()->IsVariableProxy());
|
| + Variable* variable = property->value()->AsVariableProxy()->var();
|
| + VisitForStackValue(property->key());
|
| + EmitVariableAssignment(variable, Token::INIT,
|
| + FeedbackVectorSlot::Invalid());
|
| + DropOperands(1);
|
| + continue;
|
| + }
|
| +
|
| Register scratch = r1;
|
| if (property->is_static()) {
|
| __ ldr(scratch, MemOperand(sp, kPointerSize)); // constructor
|
| @@ -2027,8 +2040,11 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
|
| break;
|
|
|
| case ClassLiteral::Property::FIELD:
|
| - default:
|
| - UNREACHABLE();
|
| + DCHECK(property->is_static());
|
| + PushOperand(Smi::FromInt(DONT_ENUM));
|
| + PushOperand(Smi::FromInt(property->NeedsSetFunctionName()));
|
| + CallRuntimeWithOperands(Runtime::kDefineDataPropertyInLiteral);
|
| + break;
|
| }
|
| }
|
| }
|
|
|