Index: src/ia32/macro-assembler-ia32.cc |
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc |
index 6b5c8dabf67351cb50364bf9dd1100d2866b4816..1f7b77ff520d43e12651642ab3d9b0ea392114dd 100644 |
--- a/src/ia32/macro-assembler-ia32.cc |
+++ b/src/ia32/macro-assembler-ia32.cc |
@@ -2519,14 +2519,15 @@ void MacroAssembler::Abort(const char* msg) { |
void MacroAssembler::LoadInstanceDescriptors(Register map, |
Register descriptors) { |
- mov(descriptors, FieldOperand(map, |
- Map::kInstanceDescriptorsOrBackPointerOffset)); |
+ Register temp = descriptors; |
+ mov(temp, FieldOperand(map, Map::kTransitionsOrBackPointerOffset)); |
Label ok, fail; |
- CheckMap(descriptors, |
+ CheckMap(temp, |
isolate()->factory()->fixed_array_map(), |
&fail, |
DONT_DO_SMI_CHECK); |
+ mov(descriptors, FieldOperand(temp, TransitionArray::kDescriptorsOffset)); |
jmp(&ok); |
bind(&fail); |
mov(descriptors, isolate()->factory()->empty_descriptor_array()); |
@@ -2893,12 +2894,16 @@ void MacroAssembler::CheckEnumCache(Label* call_runtime) { |
// check for an enum cache. Leave the map in ebx for the subsequent |
// prototype load. |
mov(ebx, FieldOperand(ecx, HeapObject::kMapOffset)); |
- mov(edx, FieldOperand(ebx, Map::kInstanceDescriptorsOrBackPointerOffset)); |
+ mov(edx, FieldOperand(ebx, Map::kTransitionsOrBackPointerOffset)); |
CheckMap(edx, |
isolate()->factory()->fixed_array_map(), |
call_runtime, |
DONT_DO_SMI_CHECK); |
+ mov(edx, FieldOperand(edx, TransitionArray::kDescriptorsOffset)); |
+ cmp(edx, isolate()->factory()->empty_descriptor_array()); |
+ j(equal, call_runtime); |
+ |
// Check that there is an enum cache in the non-empty instance |
// descriptors (edx). This is the case if the next enumeration |
// index field does not contain a smi. |