Index: src/arm/stub-cache-arm.cc |
diff --git a/src/arm/stub-cache-arm.cc b/src/arm/stub-cache-arm.cc |
index a163c530471c42f3ee4ff30f69fe77ec67fb29f9..984c7d5686f6d8be75abc04ae3b7c64dd666e290 100644 |
--- a/src/arm/stub-cache-arm.cc |
+++ b/src/arm/stub-cache-arm.cc |
@@ -3054,18 +3054,26 @@ Handle<Code> BaseLoadStoreStubCompiler::CompilePolymorphicIC( |
GenerateNameCheck(name, this->name(), &miss); |
} |
- __ JumpIfSmi(receiver(), &miss); |
+ Label number_case; |
+ Label* smi_target = HasHeapNumberMap(receiver_maps) ? &number_case : &miss; |
+ __ JumpIfSmi(receiver(), smi_target); |
+ |
Register map_reg = scratch1(); |
int receiver_count = receiver_maps->length(); |
int number_of_handled_maps = 0; |
__ ldr(map_reg, FieldMemOperand(receiver(), HeapObject::kMapOffset)); |
+ Handle<Map> heap_number_map = isolate()->factory()->heap_number_map(); |
for (int current = 0; current < receiver_count; ++current) { |
Handle<Map> map = receiver_maps->at(current); |
if (!map->is_deprecated()) { |
number_of_handled_maps++; |
__ mov(ip, Operand(receiver_maps->at(current))); |
__ cmp(map_reg, ip); |
+ if (map.is_identical_to(heap_number_map)) { |
+ ASSERT(!number_case.is_unused()); |
+ __ bind(&number_case); |
+ } |
__ Jump(handlers->at(current), RelocInfo::CODE_TARGET, eq); |
} |
} |