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

Side by Side Diff: src/x64/code-stubs-x64.cc

Issue 11973008: Replace special IC builtins and stubs in the map's cache by codestubs. (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
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 14 matching lines...) Expand all
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #include "v8.h" 28 #include "v8.h"
29 29
30 #if defined(V8_TARGET_ARCH_X64) 30 #if defined(V8_TARGET_ARCH_X64)
31 31
32 #include "bootstrapper.h" 32 #include "bootstrapper.h"
33 #include "code-stubs.h" 33 #include "code-stubs.h"
34 #include "regexp-macro-assembler.h" 34 #include "regexp-macro-assembler.h"
35 #include "stub-cache.h"
35 36
36 namespace v8 { 37 namespace v8 {
37 namespace internal { 38 namespace internal {
38 39
39 40
40 void KeyedLoadFastElementStub::InitializeInterfaceDescriptor( 41 void KeyedLoadFastElementStub::InitializeInterfaceDescriptor(
41 Isolate* isolate, 42 Isolate* isolate,
42 CodeStubInterfaceDescriptor* descriptor) { 43 CodeStubInterfaceDescriptor* descriptor) {
43 static Register registers[] = { rdx, rax }; 44 static Register registers[] = { rdx, rax };
44 descriptor->register_param_count_ = 2; 45 descriptor->register_param_count_ = 2;
(...skipping 2307 matching lines...) Expand 10 before | Expand all | Expand 10 after
2352 // Restore context register. 2353 // Restore context register.
2353 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); 2354 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset));
2354 2355
2355 __ bind(&done); 2356 __ bind(&done);
2356 __ IncrementCounter(counters->math_pow(), 1); 2357 __ IncrementCounter(counters->math_pow(), 1);
2357 __ ret(0); 2358 __ ret(0);
2358 } 2359 }
2359 } 2360 }
2360 2361
2361 2362
2363 void StringLengthStub::Generate(MacroAssembler* masm) {
2364 Label miss;
2365 Register receiver;
2366 if (kind_ == Code::KEYED_LOAD_IC) {
2367 // ----------- S t a t e -------------
2368 // -- rax : key
2369 // -- rdx : receiver
2370 // -- rsp[0] : return address
2371 // -----------------------------------
2372 __ Cmp(rax, masm->isolate()->factory()->length_symbol());
2373 receiver = rdx;
2374 } else {
2375 // ----------- S t a t e -------------
2376 // -- rax : receiver
2377 // -- rcx : name
2378 // -- rsp[0] : return address
2379 // -----------------------------------
2380 receiver = rax;
2381 }
2382
2383 StubCompiler::GenerateLoadStringLength(masm, receiver, r8, r9, &miss,
2384 support_wrapper_);
2385 __ bind(&miss);
2386 StubCompiler::GenerateLoadMiss(masm, kind_);
2387 }
2388
2389
2362 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { 2390 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
2363 // The key is in rdx and the parameter count is in rax. 2391 // The key is in rdx and the parameter count is in rax.
2364 2392
2365 // The displacement is used for skipping the frame pointer on the 2393 // The displacement is used for skipping the frame pointer on the
2366 // stack. It is the offset of the last parameter (if any) relative 2394 // stack. It is the offset of the last parameter (if any) relative
2367 // to the frame pointer. 2395 // to the frame pointer.
2368 static const int kDisplacement = 1 * kPointerSize; 2396 static const int kDisplacement = 1 * kPointerSize;
2369 2397
2370 // Check that the key is a smi. 2398 // Check that the key is a smi.
2371 Label slow; 2399 Label slow;
(...skipping 4167 matching lines...) Expand 10 before | Expand all | Expand 10 after
6539 #endif 6567 #endif
6540 6568
6541 __ Ret(); 6569 __ Ret();
6542 } 6570 }
6543 6571
6544 #undef __ 6572 #undef __
6545 6573
6546 } } // namespace v8::internal 6574 } } // namespace v8::internal
6547 6575
6548 #endif // V8_TARGET_ARCH_X64 6576 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/code-stubs.h ('K') | « src/type-info.cc ('k') | src/x64/ic-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698