Index: src/mips/macro-assembler-mips.cc |
diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc |
index 7ded49499957b010b996229de161b0268dd45192..fe703daa19331c2f5db02456125c6ff9893efd73 100644 |
--- a/src/mips/macro-assembler-mips.cc |
+++ b/src/mips/macro-assembler-mips.cc |
@@ -5299,20 +5299,37 @@ void MacroAssembler::LoadInstanceDescriptors(Register map, |
Register temp = descriptors; |
lw(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); |
- lw(descriptors, FieldMemOperand(temp, TransitionArray::kDescriptorsOffset)); |
+ lw(temp, FieldMemOperand(temp, TransitionArray::kDescriptorsPointerOffset)); |
+ lw(descriptors, FieldMemOperand(temp, JSGlobalPropertyCell::kValueOffset)); |
jmp(&ok); |
+ |
bind(&fail); |
+ LoadRoot(scratch, Heap::kUndefinedValueRootIndex); |
+ Branch(&load_from_back_pointer, ne, temp, Operand(scratch)); |
LoadRoot(descriptors, Heap::kEmptyDescriptorArrayRootIndex); |
+ jmp(&ok); |
+ |
+ bind(&load_from_back_pointer); |
+ lw(temp, FieldMemOperand(temp, Map::kTransitionsOrBackPointerOffset)); |
+ lw(temp, FieldMemOperand(temp, TransitionArray::kDescriptorsPointerOffset)); |
+ lw(descriptors, FieldMemOperand(temp, JSGlobalPropertyCell::kValueOffset)); |
+ |
bind(&ok); |
} |
+void MacroAssembler::NumberOfOwnDescriptors(Register dst, Register map) { |
+ lw(dst, FieldMemOperand(map, Map::kBitField3Offset)); |
+ DecodeField<Map::NumberOfOwnDescriptorsBits>(dst); |
+} |
+ |
+ |
void MacroAssembler::EnumLength(Register dst, Register map) { |
STATIC_ASSERT(Map::EnumLengthBits::kShift == 0); |
lw(dst, FieldMemOperand(map, Map::kBitField3Offset)); |