Index: src/ic/arm64/ic-compiler-arm64.cc |
diff --git a/src/ic/arm64/ic-compiler-arm64.cc b/src/ic/arm64/ic-compiler-arm64.cc |
index ffc1069f231eea8ffc8a4e7ab75177658820a60f..f031657f14a5eb591fdfbc8a6570eee0c54c56e2 100644 |
--- a/src/ic/arm64/ic-compiler-arm64.cc |
+++ b/src/ic/arm64/ic-compiler-arm64.cc |
@@ -71,8 +71,9 @@ Handle<Code> PropertyICCompiler::CompilePolymorphic(TypeHandleList* types, |
Handle<Map> map = IC::TypeToMap(*type, isolate()); |
if (!map->is_deprecated()) { |
number_of_handled_maps++; |
+ Handle<WeakCell> cell = Map::WeakCellForMap(map); |
+ __ CmpWeakValue(map_reg, cell, scratch2()); |
Label try_next; |
- __ Cmp(map_reg, Operand(map)); |
__ B(ne, &try_next); |
if (type->Is(HeapType::Number())) { |
DCHECK(!number_case.is_unused()); |
@@ -104,16 +105,18 @@ Handle<Code> PropertyICCompiler::CompileKeyedStorePolymorphic( |
__ JumpIfSmi(receiver(), &miss); |
int receiver_count = receiver_maps->length(); |
- __ Ldr(scratch1(), FieldMemOperand(receiver(), HeapObject::kMapOffset)); |
+ Register map_reg = scratch1(); |
+ __ Ldr(map_reg, FieldMemOperand(receiver(), HeapObject::kMapOffset)); |
for (int i = 0; i < receiver_count; i++) { |
- __ Cmp(scratch1(), Operand(receiver_maps->at(i))); |
- |
+ Handle<WeakCell> cell = Map::WeakCellForMap(receiver_maps->at(i)); |
+ __ CmpWeakValue(map_reg, cell, scratch2()); |
Label skip; |
__ B(&skip, ne); |
if (!transitioned_maps->at(i).is_null()) { |
// This argument is used by the handler stub. For example, see |
// ElementsTransitionGenerator::GenerateMapChangeElementsTransition. |
- __ Mov(transition_map(), Operand(transitioned_maps->at(i))); |
+ Handle<WeakCell> cell = Map::WeakCellForMap(transitioned_maps->at(i)); |
+ __ LoadWeakValue(transition_map(), cell, &miss); |
} |
__ Jump(handler_stubs->at(i), RelocInfo::CODE_TARGET); |
__ Bind(&skip); |