Index: src/arm/macro-assembler-arm.cc |
diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc |
index 7089a6213de8b2e0494dc085f5fe8ff4411b5312..d51197b374b841796bdf3e3a9a02a1ab3dfe8d98 100644 |
--- a/src/arm/macro-assembler-arm.cc |
+++ b/src/arm/macro-assembler-arm.cc |
@@ -3679,15 +3679,16 @@ void MacroAssembler::ClampDoubleToUint8(Register result_reg, |
void MacroAssembler::LoadInstanceDescriptors(Register map, |
Register descriptors, |
Register scratch) { |
- ldr(descriptors, |
- FieldMemOperand(map, Map::kInstanceDescriptorsOrBackPointerOffset)); |
+ Register temp = descriptors; |
+ ldr(temp, FieldMemOperand(map, Map::kTransitionsOrBackPointerOffset)); |
Label ok, fail; |
- CheckMap(descriptors, |
+ CheckMap(temp, |
scratch, |
isolate()->factory()->fixed_array_map(), |
&fail, |
DONT_DO_SMI_CHECK); |
+ ldr(descriptors, FieldMemOperand(temp, TransitionArray::kDescriptorsOffset)); |
jmp(&ok); |
bind(&fail); |
mov(descriptors, Operand(FACTORY->empty_descriptor_array())); |
@@ -3700,9 +3701,6 @@ void MacroAssembler::CheckEnumCache(Register null_value, Label* call_runtime) { |
// Preload a couple of values used in the loop. |
Register empty_fixed_array_value = r6; |
LoadRoot(empty_fixed_array_value, Heap::kEmptyFixedArrayRootIndex); |
- Register empty_descriptor_array_value = r7; |
- LoadRoot(empty_descriptor_array_value, |
- Heap::kEmptyDescriptorArrayRootIndex); |
mov(r1, r0); |
bind(&next); |
@@ -3716,7 +3714,7 @@ void MacroAssembler::CheckEnumCache(Register null_value, Label* call_runtime) { |
// check for an enum cache. Leave the map in r2 for the subsequent |
// prototype load. |
ldr(r2, FieldMemOperand(r1, HeapObject::kMapOffset)); |
- ldr(r3, FieldMemOperand(r2, Map::kInstanceDescriptorsOrBackPointerOffset)); |
+ ldr(r3, FieldMemOperand(r2, Map::kTransitionsOrBackPointerOffset)); |
CheckMap(r3, |
r7, |
@@ -3724,6 +3722,11 @@ void MacroAssembler::CheckEnumCache(Register null_value, Label* call_runtime) { |
call_runtime, |
DONT_DO_SMI_CHECK); |
+ LoadRoot(r7, Heap::kEmptyDescriptorArrayRootIndex); |
+ ldr(r3, FieldMemOperand(r3, TransitionArray::kDescriptorsOffset)); |
+ cmp(r3, r7); |
+ b(eq, call_runtime); |
+ |
// Check that there is an enum cache in the non-empty instance |
// descriptors (r3). This is the case if the next enumeration |
// index field does not contain a smi. |