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

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

Issue 575373004: Convert KeyedLoad indexed interceptor case to a Handler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE and ports. Created 6 years, 3 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/mips/code-stubs-mips.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 __ SmiToInteger64(rcx, rcx); 827 __ SmiToInteger64(rcx, rcx);
828 __ leap(rdx, Operand(rdx, rcx, times_pointer_size, 828 __ leap(rdx, Operand(rdx, rcx, times_pointer_size,
829 StandardFrameConstants::kCallerSPOffset)); 829 StandardFrameConstants::kCallerSPOffset));
830 __ movp(args.GetArgumentOperand(1), rdx); 830 __ movp(args.GetArgumentOperand(1), rdx);
831 831
832 __ bind(&runtime); 832 __ bind(&runtime);
833 __ TailCallRuntime(Runtime::kNewSloppyArguments, 3, 1); 833 __ TailCallRuntime(Runtime::kNewSloppyArguments, 3, 1);
834 } 834 }
835 835
836 836
837 void LoadIndexedInterceptorStub::Generate(MacroAssembler* masm) {
838 // Return address is on the stack.
839 Label slow;
840
841 Register receiver = LoadDescriptor::ReceiverRegister();
842 Register key = LoadDescriptor::NameRegister();
843 Register scratch = rax;
844 DCHECK(!scratch.is(receiver) && !scratch.is(key));
845
846 // Check that the key is an array index, that is Uint32.
847 STATIC_ASSERT(kSmiValueSize <= 32);
848 __ JumpUnlessNonNegativeSmi(key, &slow);
849
850 // Everything is fine, call runtime.
851 __ PopReturnAddressTo(scratch);
852 __ Push(receiver); // receiver
853 __ Push(key); // key
854 __ PushReturnAddressFrom(scratch);
855
856 // Perform tail call to the entry.
857 __ TailCallExternalReference(
858 ExternalReference(IC_Utility(IC::kLoadElementWithInterceptor),
859 masm->isolate()),
860 2, 1);
861
862 __ bind(&slow);
863 PropertyAccessCompiler::TailCallBuiltin(
864 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC));
865 }
866
867
837 void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) { 868 void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) {
838 // rsp[0] : return address 869 // rsp[0] : return address
839 // rsp[8] : number of parameters 870 // rsp[8] : number of parameters
840 // rsp[16] : receiver displacement 871 // rsp[16] : receiver displacement
841 // rsp[24] : function 872 // rsp[24] : function
842 873
843 // Check if the calling frame is an arguments adaptor frame. 874 // Check if the calling frame is an arguments adaptor frame.
844 Label adaptor_frame, try_allocate, runtime; 875 Label adaptor_frame, try_allocate, runtime;
845 __ movp(rdx, Operand(rbp, StandardFrameConstants::kCallerFPOffset)); 876 __ movp(rdx, Operand(rbp, StandardFrameConstants::kCallerFPOffset));
846 __ movp(rcx, Operand(rdx, StandardFrameConstants::kContextOffset)); 877 __ movp(rcx, Operand(rdx, StandardFrameConstants::kContextOffset));
(...skipping 3788 matching lines...) Expand 10 before | Expand all | Expand 10 after
4635 return_value_operand, 4666 return_value_operand,
4636 NULL); 4667 NULL);
4637 } 4668 }
4638 4669
4639 4670
4640 #undef __ 4671 #undef __
4641 4672
4642 } } // namespace v8::internal 4673 } } // namespace v8::internal
4643 4674
4644 #endif // V8_TARGET_ARCH_X64 4675 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698