MIPS: Also support smi in load-ICs.

Port r17756 (12e5896)

BUG=
R=plind44@gmail.com

Review URL: https://codereview.chromium.org/72603006

Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17767 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
plind44@gmail.com 2013-11-14 21:12:22 +00:00
parent 9d440ac4c0
commit f923ff3cab

View File

@ -3065,16 +3065,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();
int receiver_count = receiver_maps->length();
int number_of_handled_maps = 0;
__ lw(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++;
if (map.is_identical_to(heap_number_map)) {
ASSERT(!number_case.is_unused());
__ bind(&number_case);
}
__ Jump(handlers->at(current), RelocInfo::CODE_TARGET,
eq, map_reg, Operand(receiver_maps->at(current)));
}