Index: src/ic/mips64/ic-compiler-mips64.cc |
diff --git a/src/ic/mips64/ic-compiler-mips64.cc b/src/ic/mips64/ic-compiler-mips64.cc |
index 796ed87f7e53ee902a46d9ab6d7d35c24db12846..25588248abac3b5a59c9c68b13f984f4592b428b 100644 |
--- a/src/ic/mips64/ic-compiler-mips64.cc |
+++ b/src/ic/mips64/ic-compiler-mips64.cc |
@@ -57,7 +57,8 @@ Handle<Code> PropertyICCompiler::CompilePolymorphic(TypeHandleList* types, |
number_of_handled_maps++; |
// Check map and tail call if there's a match. |
// Separate compare from branch, to provide path for above JumpIfSmi(). |
- __ Dsubu(match, map_reg, Operand(map)); |
+ Handle<WeakCell> cell = Map::WeakCellForMap(map); |
+ __ CmpWeakValue(match, map_reg, cell); |
if (type->Is(HeapType::Number())) { |
DCHECK(!number_case.is_unused()); |
__ bind(&number_case); |
@@ -85,15 +86,20 @@ Handle<Code> PropertyICCompiler::CompileKeyedStorePolymorphic( |
__ JumpIfSmi(receiver(), &miss); |
int receiver_count = receiver_maps->length(); |
- __ ld(scratch1(), FieldMemOperand(receiver(), HeapObject::kMapOffset)); |
+ Register map_reg = scratch1(); |
+ Register match = scratch2(); |
+ __ ld(map_reg, FieldMemOperand(receiver(), HeapObject::kMapOffset)); |
for (int i = 0; i < receiver_count; ++i) { |
+ Handle<WeakCell> cell = Map::WeakCellForMap(receiver_maps->at(i)); |
+ __ CmpWeakValue(match, map_reg, cell); |
if (transitioned_maps->at(i).is_null()) { |
- __ Jump(handler_stubs->at(i), RelocInfo::CODE_TARGET, eq, scratch1(), |
- Operand(receiver_maps->at(i))); |
+ __ Jump(handler_stubs->at(i), RelocInfo::CODE_TARGET, eq, match, |
+ Operand(zero_reg)); |
} else { |
Label next_map; |
- __ Branch(&next_map, ne, scratch1(), Operand(receiver_maps->at(i))); |
- __ li(transition_map(), Operand(transitioned_maps->at(i))); |
+ __ Branch(&next_map, ne, match, Operand(zero_reg)); |
+ Handle<WeakCell> cell = Map::WeakCellForMap(transitioned_maps->at(i)); |
+ __ LoadWeakValue(transition_map(), cell, &miss); |
__ Jump(handler_stubs->at(i), RelocInfo::CODE_TARGET); |
__ bind(&next_map); |
} |