Index: src/full-codegen/mips64/full-codegen-mips64.cc |
diff --git a/src/full-codegen/mips64/full-codegen-mips64.cc b/src/full-codegen/mips64/full-codegen-mips64.cc |
index b14c63452d3257b6c6255963dcf3b803885b096e..d6d672c1ed9ad89264f122bf690b51d859bc4380 100644 |
--- a/src/full-codegen/mips64/full-codegen-mips64.cc |
+++ b/src/full-codegen/mips64/full-codegen-mips64.cc |
@@ -1989,6 +1989,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 = a1; |
if (property->is_static()) { |
__ ld(scratch, MemOperand(sp, kPointerSize)); // constructor |
@@ -2030,8 +2043,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; |
} |
} |
} |