Index: src/full-codegen/ia32/full-codegen-ia32.cc |
diff --git a/src/full-codegen/ia32/full-codegen-ia32.cc b/src/full-codegen/ia32/full-codegen-ia32.cc |
index 81a952c788603f2446e5fe3714f9b51ba04c6cb2..f067d9630bd71c90e386ea7d937ea686783d5fba 100644 |
--- a/src/full-codegen/ia32/full-codegen-ia32.cc |
+++ b/src/full-codegen/ia32/full-codegen-ia32.cc |
@@ -1897,6 +1897,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; |
+ } |
+ |
if (property->is_static()) { |
PushOperand(Operand(esp, kPointerSize)); // constructor |
} else { |
@@ -1936,7 +1949,10 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) { |
break; |
case ClassLiteral::Property::FIELD: |
- UNREACHABLE(); |
+ DCHECK(property->is_static()); |
+ PushOperand(Smi::FromInt(DONT_ENUM)); |
+ PushOperand(Smi::FromInt(property->NeedsSetFunctionName())); |
+ CallRuntimeWithOperands(Runtime::kDefineDataPropertyInLiteral); |
break; |
} |
} |