| Index: src/mips/full-codegen-mips.cc
|
| diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc
|
| index e08860be2ade036b3b343b453531a1b6c03ab3f1..ca755fe2f631f97eb026e0d59b7de3861d067b7c 100644
|
| --- a/src/mips/full-codegen-mips.cc
|
| +++ b/src/mips/full-codegen-mips.cc
|
| @@ -2541,6 +2541,10 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
|
| FieldMemOperand(v0, JSFunction::kPrototypeOrInitialMapOffset));
|
| __ push(scratch);
|
|
|
| + // store_slot_index points to the vector ic slot for the next store ic used.
|
| + // ClassLiteral::ComputeFeedbackRequirements controls the allocation of slots
|
| + // and must be updated if the number of store ics emitted here changes.
|
| + int store_slot_index = 0;
|
| for (int i = 0; i < lit->properties()->length(); i++) {
|
| ObjectLiteral::Property* property = lit->properties()->at(i);
|
| Expression* value = property->value();
|
| @@ -2563,7 +2567,8 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
|
| }
|
|
|
| VisitForStackValue(value);
|
| - EmitSetHomeObjectIfNeeded(value, 2);
|
| + EmitSetHomeObjectIfNeeded(value, 2,
|
| + lit->SlotForHomeObject(value, &store_slot_index));
|
|
|
| switch (property->kind()) {
|
| case ObjectLiteral::Property::CONSTANT:
|
| @@ -2596,6 +2601,10 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
|
|
|
| // constructor
|
| __ CallRuntime(Runtime::kToFastProperties, 1);
|
| +
|
| + // Verify that compilation exactly consumed the number of store ic slots that
|
| + // the ClassLiteral node had to offer.
|
| + DCHECK(!FLAG_vector_stores || store_slot_index == lit->slot_count());
|
| }
|
|
|
|
|
|
|