Commit f923ff3c authored by plind44@gmail.com's avatar plind44@gmail.com

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
parent 9d440ac4
......@@ -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)));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment