Index: src/ia32/macro-assembler-ia32.cc |
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc |
index 9c5f31e2cf4c5d00af038c08f8852ffb0dceba4d..c71fa005cea1660ce10a490422f29b752e1f29df 100644 |
--- a/src/ia32/macro-assembler-ia32.cc |
+++ b/src/ia32/macro-assembler-ia32.cc |
@@ -2576,19 +2576,36 @@ void MacroAssembler::LoadInstanceDescriptors(Register map, |
Register temp = descriptors; |
mov(temp, FieldOperand(map, Map::kTransitionsOrBackPointerOffset)); |
- Label ok, fail; |
+ Label ok, fail, load_from_back_pointer; |
CheckMap(temp, |
isolate()->factory()->fixed_array_map(), |
&fail, |
DONT_DO_SMI_CHECK); |
- mov(descriptors, FieldOperand(temp, TransitionArray::kDescriptorsOffset)); |
+ mov(temp, FieldOperand(temp, TransitionArray::kDescriptorsPointerOffset)); |
+ mov(descriptors, FieldOperand(temp, JSGlobalPropertyCell::kValueOffset)); |
jmp(&ok); |
+ |
bind(&fail); |
+ cmp(temp, isolate()->factory()->undefined_value()); |
+ j(not_equal, &load_from_back_pointer, Label::kNear); |
mov(descriptors, isolate()->factory()->empty_descriptor_array()); |
+ jmp(&ok); |
+ |
+ bind(&load_from_back_pointer); |
+ mov(temp, FieldOperand(temp, Map::kTransitionsOrBackPointerOffset)); |
+ mov(temp, FieldOperand(temp, TransitionArray::kDescriptorsPointerOffset)); |
+ mov(descriptors, FieldOperand(temp, JSGlobalPropertyCell::kValueOffset)); |
+ |
bind(&ok); |
} |
+void MacroAssembler::NumberOfOwnDescriptors(Register dst, Register map) { |
+ mov(dst, FieldOperand(map, Map::kBitField3Offset)); |
+ DecodeField<Map::NumberOfOwnDescriptorsBits>(dst); |
+} |
+ |
+ |
void MacroAssembler::LoadPowerOf2(XMMRegister dst, |
Register scratch, |
int power) { |