Index: src/arm/macro-assembler-arm.cc |
diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc |
index 2a677be525855425b814bb88c8add2440b2ba363..d2663102657a5f6eb04d189435b1582fc7a9d3fa 100644 |
--- a/src/arm/macro-assembler-arm.cc |
+++ b/src/arm/macro-assembler-arm.cc |
@@ -3703,20 +3703,37 @@ void MacroAssembler::LoadInstanceDescriptors(Register map, |
Register temp = descriptors; |
ldr(temp, FieldMemOperand(map, Map::kTransitionsOrBackPointerOffset)); |
- Label ok, fail; |
+ Label ok, fail, load_from_back_pointer; |
CheckMap(temp, |
scratch, |
isolate()->factory()->fixed_array_map(), |
&fail, |
DONT_DO_SMI_CHECK); |
- ldr(descriptors, FieldMemOperand(temp, TransitionArray::kDescriptorsOffset)); |
+ ldr(temp, FieldMemOperand(temp, TransitionArray::kDescriptorsPointerOffset)); |
+ ldr(descriptors, FieldMemOperand(temp, JSGlobalPropertyCell::kValueOffset)); |
jmp(&ok); |
+ |
bind(&fail); |
+ CompareRoot(temp, Heap::kUndefinedValueRootIndex); |
+ b(ne, &load_from_back_pointer); |
mov(descriptors, Operand(FACTORY->empty_descriptor_array())); |
+ jmp(&ok); |
+ |
+ bind(&load_from_back_pointer); |
+ ldr(temp, FieldMemOperand(temp, Map::kTransitionsOrBackPointerOffset)); |
+ ldr(temp, FieldMemOperand(temp, TransitionArray::kDescriptorsPointerOffset)); |
+ ldr(descriptors, FieldMemOperand(temp, JSGlobalPropertyCell::kValueOffset)); |
+ |
bind(&ok); |
} |
+void MacroAssembler::NumberOfOwnDescriptors(Register dst, Register map) { |
+ ldr(dst, FieldMemOperand(map, Map::kBitFieldOffset)); |
+ DecodeField<Map::NumberOfOwnDescriptorsBits>(dst); |
+} |
+ |
+ |
void MacroAssembler::EnumLength(Register dst, Register map) { |
STATIC_ASSERT(Map::EnumLengthBits::kShift == 0); |
ldr(dst, FieldMemOperand(map, Map::kBitField3Offset)); |