Index: src/ia32/stub-cache-ia32.cc |
diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc |
index 66edf2e48992f25e75ffd812d500b3f93cfaa30b..61639a992a73e44c286053237c94d62ec8375ef5 100644 |
--- a/src/ia32/stub-cache-ia32.cc |
+++ b/src/ia32/stub-cache-ia32.cc |
@@ -3163,16 +3163,24 @@ 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(); |
__ mov(map_reg, FieldOperand(receiver(), HeapObject::kMapOffset)); |
int receiver_count = receiver_maps->length(); |
int number_of_handled_maps = 0; |
+ 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++; |
__ cmp(map_reg, map); |
+ if (map.is_identical_to(heap_number_map)) { |
+ ASSERT(!number_case.is_unused()); |
+ __ bind(&number_case); |
+ } |
__ j(equal, handlers->at(current)); |
} |
} |