| Index: src/mips/full-codegen-mips.cc
|
| diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc
|
| index d691a1230894e074a140a53f53d8d58453160a78..6a697bc4f5e1250e77b1f8f1755303c4d584a61e 100644
|
| --- a/src/mips/full-codegen-mips.cc
|
| +++ b/src/mips/full-codegen-mips.cc
|
| @@ -1141,25 +1141,32 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
|
| // modification check. Otherwise, we got a fixed array, and we have
|
| // to do a slow check.
|
| Label fixed_array;
|
| - __ mov(a2, v0);
|
| - __ lw(a1, FieldMemOperand(a2, HeapObject::kMapOffset));
|
| + __ lw(a2, FieldMemOperand(v0, HeapObject::kMapOffset));
|
| __ LoadRoot(at, Heap::kMetaMapRootIndex);
|
| - __ Branch(&fixed_array, ne, a1, Operand(at));
|
| + __ Branch(&fixed_array, ne, a2, Operand(at));
|
|
|
| // We got a map in register v0. Get the enumeration cache from it.
|
| + Label no_descriptors;
|
| __ bind(&use_cache);
|
| - __ LoadInstanceDescriptors(v0, a1, a2);
|
| - __ lw(a1, FieldMemOperand(a1, DescriptorArray::kEnumCacheOffset));
|
| - __ lw(a2, FieldMemOperand(a1, DescriptorArray::kEnumCacheBridgeCacheOffset));
|
| +
|
| + __ EnumLength(a1, v0);
|
| + __ Branch(&no_descriptors, eq, a1, Operand(Smi::FromInt(0)));
|
| +
|
| + __ LoadInstanceDescriptors(v0, a2, t0);
|
| + __ lw(a2, FieldMemOperand(a2, DescriptorArray::kEnumCacheOffset));
|
| + __ lw(a2, FieldMemOperand(a2, DescriptorArray::kEnumCacheBridgeCacheOffset));
|
|
|
| // Set up the four remaining stack slots.
|
| __ push(v0); // Map.
|
| - __ lw(a1, FieldMemOperand(a2, FixedArray::kLengthOffset));
|
| __ li(a0, Operand(Smi::FromInt(0)));
|
| // Push enumeration cache, enumeration cache length (as smi) and zero.
|
| __ Push(a2, a1, a0);
|
| __ jmp(&loop);
|
|
|
| + __ bind(&no_descriptors);
|
| + __ Drop(1);
|
| + __ jmp(&exit);
|
| +
|
| // We got a fixed array in register v0. Iterate through that.
|
| Label non_proxy;
|
| __ bind(&fixed_array);
|
|
|