| Index: src/mips/macro-assembler-mips.cc
|
| diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc
|
| index 8d85aed0ba226b708948bf61e13e9495e7d30594..dcc528f7e3eb90cd34bfa881788c8f492a74feb0 100644
|
| --- a/src/mips/macro-assembler-mips.cc
|
| +++ b/src/mips/macro-assembler-mips.cc
|
| @@ -5554,11 +5554,17 @@ void MacroAssembler::CheckEnumCache(Register null_value, Label* call_runtime) {
|
|
|
| bind(&start);
|
|
|
| - // Check that there are no elements. Register r2 contains the current JS
|
| + // Check that there are no elements. Register a2 contains the current JS
|
| // object we've reached through the prototype chain.
|
| + Label no_elements;
|
| lw(a2, FieldMemOperand(a2, JSObject::kElementsOffset));
|
| - Branch(call_runtime, ne, a2, Operand(empty_fixed_array_value));
|
| + Branch(&no_elements, eq, a2, Operand(empty_fixed_array_value));
|
|
|
| + // Second chance, the object may be using the empty slow element dictionary.
|
| + LoadRoot(at, Heap::kEmptySlowElementDictionaryRootIndex);
|
| + Branch(call_runtime, ne, a2, Operand(at));
|
| +
|
| + bind(&no_elements);
|
| lw(a2, FieldMemOperand(a1, Map::kPrototypeOffset));
|
| Branch(&next, ne, a2, Operand(null_value));
|
| }
|
|
|