Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Side by Side Diff: src/arm/stub-cache-arm.cc

Issue 75413002: Convert PatchCache (and related methods) to use types rather than objects/maps. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comment Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3033 matching lines...) Expand 10 before | Expand all | Expand 10 after
3044 __ IncrementCounter(counters->named_load_global_stub(), 1, r1, r3); 3044 __ IncrementCounter(counters->named_load_global_stub(), 1, r1, r3);
3045 __ mov(r0, r4); 3045 __ mov(r0, r4);
3046 __ Ret(); 3046 __ Ret();
3047 3047
3048 // Return the generated code. 3048 // Return the generated code.
3049 return GetCode(kind(), Code::NORMAL, name); 3049 return GetCode(kind(), Code::NORMAL, name);
3050 } 3050 }
3051 3051
3052 3052
3053 Handle<Code> BaseLoadStoreStubCompiler::CompilePolymorphicIC( 3053 Handle<Code> BaseLoadStoreStubCompiler::CompilePolymorphicIC(
3054 MapHandleList* receiver_maps, 3054 TypeHandleList* types,
3055 CodeHandleList* handlers, 3055 CodeHandleList* handlers,
3056 Handle<Name> name, 3056 Handle<Name> name,
3057 Code::StubType type, 3057 Code::StubType type,
3058 IcCheckType check) { 3058 IcCheckType check) {
3059 Label miss; 3059 Label miss;
3060 3060
3061 if (check == PROPERTY) { 3061 if (check == PROPERTY) {
3062 GenerateNameCheck(name, this->name(), &miss); 3062 GenerateNameCheck(name, this->name(), &miss);
3063 } 3063 }
3064 3064
3065 Label number_case; 3065 Label number_case;
3066 Label* smi_target = HasHeapNumberMap(receiver_maps) ? &number_case : &miss; 3066 Label* smi_target = IncludesNumberType(types) ? &number_case : &miss;
3067 __ JumpIfSmi(receiver(), smi_target); 3067 __ JumpIfSmi(receiver(), smi_target);
3068 3068
3069 Register map_reg = scratch1(); 3069 Register map_reg = scratch1();
3070 3070
3071 int receiver_count = receiver_maps->length(); 3071 int receiver_count = types->length();
3072 int number_of_handled_maps = 0; 3072 int number_of_handled_maps = 0;
3073 __ ldr(map_reg, FieldMemOperand(receiver(), HeapObject::kMapOffset)); 3073 __ ldr(map_reg, FieldMemOperand(receiver(), HeapObject::kMapOffset));
3074 Handle<Map> heap_number_map = isolate()->factory()->heap_number_map();
3075 for (int current = 0; current < receiver_count; ++current) { 3074 for (int current = 0; current < receiver_count; ++current) {
3076 Handle<Map> map = receiver_maps->at(current); 3075 Handle<Type> type = types->at(current);
3076 Handle<Map> map = IC::TypeToMap(*type, isolate());
3077 if (!map->is_deprecated()) { 3077 if (!map->is_deprecated()) {
3078 number_of_handled_maps++; 3078 number_of_handled_maps++;
3079 __ mov(ip, Operand(receiver_maps->at(current))); 3079 __ mov(ip, Operand(map));
3080 __ cmp(map_reg, ip); 3080 __ cmp(map_reg, ip);
3081 if (map.is_identical_to(heap_number_map)) { 3081 if (type->Is(Type::Number())) {
3082 ASSERT(!number_case.is_unused()); 3082 ASSERT(!number_case.is_unused());
3083 __ bind(&number_case); 3083 __ bind(&number_case);
3084 } 3084 }
3085 __ Jump(handlers->at(current), RelocInfo::CODE_TARGET, eq); 3085 __ Jump(handlers->at(current), RelocInfo::CODE_TARGET, eq);
3086 } 3086 }
3087 } 3087 }
3088 ASSERT(number_of_handled_maps != 0); 3088 ASSERT(number_of_handled_maps != 0);
3089 3089
3090 __ bind(&miss); 3090 __ bind(&miss);
3091 TailCallBuiltin(masm(), MissBuiltin(kind())); 3091 TailCallBuiltin(masm(), MissBuiltin(kind()));
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
3172 // ----------------------------------- 3172 // -----------------------------------
3173 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 3173 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
3174 } 3174 }
3175 3175
3176 3176
3177 #undef __ 3177 #undef __
3178 3178
3179 } } // namespace v8::internal 3179 } } // namespace v8::internal
3180 3180
3181 #endif // V8_TARGET_ARCH_ARM 3181 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698