Index: src/full-codegen/s390/full-codegen-s390.cc |
diff --git a/src/full-codegen/s390/full-codegen-s390.cc b/src/full-codegen/s390/full-codegen-s390.cc |
index 016508e6c4faf3c063b53f07d46249093fa7dcc2..b24113f1ed37a74621fd780373c59697bd5b92d1 100644 |
--- a/src/full-codegen/s390/full-codegen-s390.cc |
+++ b/src/full-codegen/s390/full-codegen-s390.cc |
@@ -1949,6 +1949,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 = r3; |
if (property->is_static()) { |
__ LoadP(scratch, MemOperand(sp, kPointerSize)); // constructor |
@@ -1990,8 +2003,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; |
} |
} |
} |