Index: src/mips/macro-assembler-mips.cc |
diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc |
index 14b73082fc8038bb7ebd38920f5de0d41ce799d8..51b3a3823f6082cb41c8383dafb60afc73fb80b8 100644 |
--- a/src/mips/macro-assembler-mips.cc |
+++ b/src/mips/macro-assembler-mips.cc |
@@ -3473,6 +3473,16 @@ void MacroAssembler::CompareMapAndBranch(Register obj, |
Label* branch_to, |
CompareMapMode mode) { |
lw(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); |
+ CompareMapAndBranch(scratch, map, early_success, cond, branch_to, mode); |
+} |
+ |
+ |
+void MacroAssembler::CompareMapAndBranch(Register obj_map, |
+ Handle<Map> map, |
+ Label* early_success, |
+ Condition cond, |
+ Label* branch_to, |
+ CompareMapMode mode) { |
Operand right = Operand(map); |
if (mode == ALLOW_ELEMENT_TRANSITION_MAPS) { |
ElementsKind kind = map->elements_kind(); |
@@ -3483,13 +3493,13 @@ void MacroAssembler::CompareMapAndBranch(Register obj, |
kind = GetNextMoreGeneralFastElementsKind(kind, packed); |
current_map = current_map->LookupElementsTransitionMap(kind); |
if (!current_map) break; |
- Branch(early_success, eq, scratch, right); |
+ Branch(early_success, eq, obj_map, right); |
right = Operand(Handle<Map>(current_map)); |
} |
} |
} |
- Branch(branch_to, cond, scratch, right); |
+ Branch(branch_to, cond, obj_map, right); |
} |