From: palfia@homejinni.com Date: Tue, 19 Nov 2013 02:26:42 +0000 (+0000) Subject: MIPS: Convert PatchCache (and related methods) to use types rather than objects/maps. X-Git-Tag: upstream/4.7.83~11683 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ca5265d9c7f68d7655c7896cb83a7fdd152cfc5f;p=platform%2Fupstream%2Fv8.git MIPS: Convert PatchCache (and related methods) to use types rather than objects/maps. Port r17847 (67c371a4) BUG= R=plind44@gmail.com Review URL: https://codereview.chromium.org/75953002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17853 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/mips/stub-cache-mips.cc b/src/mips/stub-cache-mips.cc index 65f80c8..437d769 100644 --- a/src/mips/stub-cache-mips.cc +++ b/src/mips/stub-cache-mips.cc @@ -3062,7 +3062,7 @@ Handle LoadStubCompiler::CompileLoadGlobal( Handle BaseLoadStoreStubCompiler::CompilePolymorphicIC( - MapHandleList* receiver_maps, + TypeHandleList* types, CodeHandleList* handlers, Handle name, Code::StubType type, @@ -3074,25 +3074,25 @@ Handle BaseLoadStoreStubCompiler::CompilePolymorphicIC( } Label number_case; - Label* smi_target = HasHeapNumberMap(receiver_maps) ? &number_case : &miss; + Label* smi_target = IncludesNumberType(types) ? &number_case : &miss; __ JumpIfSmi(receiver(), smi_target); Register map_reg = scratch1(); - int receiver_count = receiver_maps->length(); + int receiver_count = types->length(); int number_of_handled_maps = 0; __ lw(map_reg, FieldMemOperand(receiver(), HeapObject::kMapOffset)); - Handle heap_number_map = isolate()->factory()->heap_number_map(); for (int current = 0; current < receiver_count; ++current) { - Handle map = receiver_maps->at(current); + Handle type = types->at(current); + Handle map = IC::TypeToMap(*type, isolate()); if (!map->is_deprecated()) { number_of_handled_maps++; - if (map.is_identical_to(heap_number_map)) { + if (type->Is(Type::Number())) { ASSERT(!number_case.is_unused()); __ bind(&number_case); } __ Jump(handlers->at(current), RelocInfo::CODE_TARGET, - eq, map_reg, Operand(receiver_maps->at(current))); + eq, map_reg, Operand(map)); } } ASSERT(number_of_handled_maps != 0);