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

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

Issue 11941016: Migrate FunctionPrototype (Keyed|Named)LoadIC to CodeStub (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 11 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/x64/ic-x64.cc ('k') | no next file » | 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 3110 matching lines...) Expand 10 before | Expand all | Expand 10 after
3121 name, &miss); 3121 name, &miss);
3122 __ bind(&miss); 3122 __ bind(&miss);
3123 __ DecrementCounter(counters->keyed_load_interceptor(), 1); 3123 __ DecrementCounter(counters->keyed_load_interceptor(), 1);
3124 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); 3124 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
3125 3125
3126 // Return the generated code. 3126 // Return the generated code.
3127 return GetCode(Code::INTERCEPTOR, name); 3127 return GetCode(Code::INTERCEPTOR, name);
3128 } 3128 }
3129 3129
3130 3130
3131 Handle<Code> KeyedLoadStubCompiler::CompileLoadFunctionPrototype(
3132 Handle<String> name) {
3133 // ----------- S t a t e -------------
3134 // -- rax : key
3135 // -- rdx : receiver
3136 // -- rsp[0] : return address
3137 // -----------------------------------
3138 Label miss;
3139
3140 Counters* counters = isolate()->counters();
3141 __ IncrementCounter(counters->keyed_load_function_prototype(), 1);
3142
3143 // Check that the name has not changed.
3144 __ Cmp(rax, name);
3145 __ j(not_equal, &miss);
3146
3147 GenerateLoadFunctionPrototype(masm(), rdx, rcx, rbx, &miss);
3148 __ bind(&miss);
3149 __ DecrementCounter(counters->keyed_load_function_prototype(), 1);
3150 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
3151
3152 // Return the generated code.
3153 return GetCode(Code::CALLBACKS, name);
3154 }
3155
3156
3157 Handle<Code> KeyedLoadStubCompiler::CompileLoadElement( 3131 Handle<Code> KeyedLoadStubCompiler::CompileLoadElement(
3158 Handle<Map> receiver_map) { 3132 Handle<Map> receiver_map) {
3159 // ----------- S t a t e ------------- 3133 // ----------- S t a t e -------------
3160 // -- rax : key 3134 // -- rax : key
3161 // -- rdx : receiver 3135 // -- rdx : receiver
3162 // -- rsp[0] : return address 3136 // -- rsp[0] : return address
3163 // ----------------------------------- 3137 // -----------------------------------
3164 ElementsKind elements_kind = receiver_map->elements_kind(); 3138 ElementsKind elements_kind = receiver_map->elements_kind();
3165 if (receiver_map->has_fast_elements() || 3139 if (receiver_map->has_fast_elements() ||
3166 receiver_map->has_external_array_elements()) { 3140 receiver_map->has_external_array_elements()) {
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
3880 __ jmp(ic_slow, RelocInfo::CODE_TARGET); 3854 __ jmp(ic_slow, RelocInfo::CODE_TARGET);
3881 } 3855 }
3882 } 3856 }
3883 3857
3884 3858
3885 #undef __ 3859 #undef __
3886 3860
3887 } } // namespace v8::internal 3861 } } // namespace v8::internal
3888 3862
3889 #endif // V8_TARGET_ARCH_X64 3863 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/ic-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698