Index: src/x64/macro-assembler-x64.cc |
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc |
index 9e6c4c978e83246ad351ce4e5d3d1ffc9f018d5b..598e778fdc12eba14e485ce843992f1b123a6496 100644 |
--- a/src/x64/macro-assembler-x64.cc |
+++ b/src/x64/macro-assembler-x64.cc |
@@ -2852,14 +2852,15 @@ void MacroAssembler::ClampDoubleToUint8(XMMRegister input_reg, |
void MacroAssembler::LoadInstanceDescriptors(Register map, |
Register descriptors) { |
- movq(descriptors, FieldOperand(map, |
- Map::kInstanceDescriptorsOrBackPointerOffset)); |
+ Register temp = descriptors; |
+ movq(temp, FieldOperand(map, Map::kTransitionsOrBackPointerOffset)); |
Label ok, fail; |
- CheckMap(descriptors, |
+ CheckMap(temp, |
isolate()->factory()->fixed_array_map(), |
&fail, |
DONT_DO_SMI_CHECK); |
+ movq(descriptors, FieldOperand(temp, TransitionArray::kDescriptorsOffset)); |
jmp(&ok); |
bind(&fail); |
Move(descriptors, isolate()->factory()->empty_descriptor_array()); |
@@ -4463,13 +4464,17 @@ void MacroAssembler::CheckEnumCache(Register null_value, Label* call_runtime) { |
// check for an enum cache. Leave the map in rbx for the subsequent |
// prototype load. |
movq(rbx, FieldOperand(rcx, HeapObject::kMapOffset)); |
- movq(rdx, FieldOperand(rbx, Map::kInstanceDescriptorsOrBackPointerOffset)); |
+ movq(rdx, FieldOperand(rbx, Map::kTransitionsOrBackPointerOffset)); |
CheckMap(rdx, |
isolate()->factory()->fixed_array_map(), |
call_runtime, |
DONT_DO_SMI_CHECK); |
+ movq(rdx, FieldOperand(rdx, TransitionArray::kDescriptorsOffset)); |
+ cmpq(rdx, empty_descriptor_array_value); |
+ j(equal, call_runtime); |
+ |
// Check that there is an enum cache in the non-empty instance |
// descriptors (rdx). This is the case if the next enumeration |
// index field does not contain a smi. |