Index: src/arm/macro-assembler-arm.cc |
=================================================================== |
--- src/arm/macro-assembler-arm.cc (revision 11774) |
+++ src/arm/macro-assembler-arm.cc (working copy) |
@@ -2000,7 +2000,15 @@ |
Label* early_success, |
CompareMapMode mode) { |
ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); |
- cmp(scratch, Operand(map)); |
+ CompareMap(scratch, map, early_success, mode); |
+} |
+ |
+ |
+void MacroAssembler::CompareMap(Register obj_map, |
+ Handle<Map> map, |
+ Label* early_success, |
+ CompareMapMode mode) { |
+ cmp(obj_map, Operand(map)); |
if (mode == ALLOW_ELEMENT_TRANSITION_MAPS) { |
ElementsKind kind = map->elements_kind(); |
if (IsFastElementsKind(kind)) { |
@@ -2011,7 +2019,7 @@ |
current_map = current_map->LookupElementsTransitionMap(kind); |
if (!current_map) break; |
b(eq, early_success); |
- cmp(scratch, Operand(Handle<Map>(current_map))); |
+ cmp(obj_map, Operand(Handle<Map>(current_map))); |
} |
} |
} |