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

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

Issue 12340112: Polymorphism support for load IC. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added ARM port, introduced GenerateTailCall Created 7 years, 9 months 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 | « src/log.h ('k') | src/objects.h » ('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 3079 matching lines...) Expand 10 before | Expand all | Expand 10 after
3090 } 3090 }
3091 3091
3092 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Miss(); 3092 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Miss();
3093 __ Jump(ic, RelocInfo::CODE_TARGET); 3093 __ Jump(ic, RelocInfo::CODE_TARGET);
3094 3094
3095 // Return the generated code. 3095 // Return the generated code.
3096 return GetCode(Code::NORMAL, factory()->empty_string()); 3096 return GetCode(Code::NORMAL, factory()->empty_string());
3097 } 3097 }
3098 3098
3099 3099
3100 Handle<Code> KeyedLoadStubCompiler::CompileLoadPolymorphic( 3100 Handle<Code> BaseLoadStubCompiler::CompilePolymorphicIC(
3101 MapHandleList* receiver_maps, 3101 MapHandleList* receiver_maps,
3102 CodeHandleList* handler_ics) { 3102 CodeHandleList* handlers) {
3103 // ----------- S t a t e ------------- 3103 // ----------- S t a t e -------------
3104 // -- ra : return address 3104 // -- ra : return address
3105 // -- a0 : key 3105 // -- a0 : key
3106 // -- a1 : receiver 3106 // -- a1 : receiver
3107 // ----------------------------------- 3107 // -----------------------------------
3108 Label miss; 3108 Label miss;
3109 __ JumpIfSmi(a1, &miss); 3109 __ JumpIfSmi(a1, &miss);
3110 3110
3111 int receiver_count = receiver_maps->length(); 3111 int receiver_count = receiver_maps->length();
3112 __ lw(a2, FieldMemOperand(a1, HeapObject::kMapOffset)); 3112 __ lw(a2, FieldMemOperand(a1, HeapObject::kMapOffset));
3113 for (int current = 0; current < receiver_count; ++current) { 3113 for (int current = 0; current < receiver_count; ++current) {
3114 __ Jump(handler_ics->at(current), RelocInfo::CODE_TARGET, 3114 __ Jump(handlers->at(current), RelocInfo::CODE_TARGET,
3115 eq, a2, Operand(receiver_maps->at(current))); 3115 eq, a2, Operand(receiver_maps->at(current)));
3116 } 3116 }
3117 3117
3118 __ bind(&miss); 3118 __ bind(&miss);
3119 Handle<Code> miss_ic = isolate()->builtins()->KeyedLoadIC_Miss(); 3119 GenerateLoadMiss(masm(), kind());
3120 __ Jump(miss_ic, RelocInfo::CODE_TARGET);
3121 3120
3122 // Return the generated code. 3121 // Return the generated code.
3123 return GetCode(Code::NORMAL, factory()->empty_string(), POLYMORPHIC); 3122 return GetCode(Code::NORMAL, factory()->empty_string(), POLYMORPHIC);
3124 } 3123 }
3125 3124
3126 3125
3127 Handle<Code> KeyedStoreStubCompiler::CompileStoreField(Handle<JSObject> object, 3126 Handle<Code> KeyedStoreStubCompiler::CompileStoreField(Handle<JSObject> object,
3128 int index, 3127 int index,
3129 Handle<Map> transition, 3128 Handle<Map> transition,
3130 Handle<String> name) { 3129 Handle<String> name) {
(...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after
4228 __ Jump(ic_slow, RelocInfo::CODE_TARGET); 4227 __ Jump(ic_slow, RelocInfo::CODE_TARGET);
4229 } 4228 }
4230 } 4229 }
4231 4230
4232 4231
4233 #undef __ 4232 #undef __
4234 4233
4235 } } // namespace v8::internal 4234 } } // namespace v8::internal
4236 4235
4237 #endif // V8_TARGET_ARCH_MIPS 4236 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/log.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698