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

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

Issue 685123007: Restore special interceptor stub for keyed loads. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | « src/ic/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 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 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 __ SmiToInteger64(rcx, rcx); 829 __ SmiToInteger64(rcx, rcx);
830 __ leap(rdx, Operand(rdx, rcx, times_pointer_size, 830 __ leap(rdx, Operand(rdx, rcx, times_pointer_size,
831 StandardFrameConstants::kCallerSPOffset)); 831 StandardFrameConstants::kCallerSPOffset));
832 __ movp(args.GetArgumentOperand(1), rdx); 832 __ movp(args.GetArgumentOperand(1), rdx);
833 833
834 __ bind(&runtime); 834 __ bind(&runtime);
835 __ TailCallRuntime(Runtime::kNewSloppyArguments, 3, 1); 835 __ TailCallRuntime(Runtime::kNewSloppyArguments, 3, 1);
836 } 836 }
837 837
838 838
839 void LoadIndexedInterceptorStub::Generate(MacroAssembler* masm) {
840 // Return address is on the stack.
841 Label slow;
842
843 Register receiver = LoadDescriptor::ReceiverRegister();
844 Register key = LoadDescriptor::NameRegister();
845 Register scratch = rax;
846 DCHECK(!scratch.is(receiver) && !scratch.is(key));
847
848 // Check that the key is an array index, that is Uint32.
849 STATIC_ASSERT(kSmiValueSize <= 32);
850 __ JumpUnlessNonNegativeSmi(key, &slow);
851
852 // Everything is fine, call runtime.
853 __ PopReturnAddressTo(scratch);
854 __ Push(receiver); // receiver
855 __ Push(key); // key
856 __ PushReturnAddressFrom(scratch);
857
858 // Perform tail call to the entry.
859 __ TailCallExternalReference(
860 ExternalReference(IC_Utility(IC::kLoadElementWithInterceptor),
861 masm->isolate()),
862 2, 1);
863
864 __ bind(&slow);
865 PropertyAccessCompiler::TailCallBuiltin(
866 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC));
867 }
868
869
870 void LoadIndexedStringStub::Generate(MacroAssembler* masm) { 839 void LoadIndexedStringStub::Generate(MacroAssembler* masm) {
871 // Return address is on the stack. 840 // Return address is on the stack.
872 Label miss; 841 Label miss;
873 842
874 Register receiver = LoadDescriptor::ReceiverRegister(); 843 Register receiver = LoadDescriptor::ReceiverRegister();
875 Register index = LoadDescriptor::NameRegister(); 844 Register index = LoadDescriptor::NameRegister();
876 Register scratch = rbx; 845 Register scratch = rbx;
877 Register result = rax; 846 Register result = rax;
878 DCHECK(!scratch.is(receiver) && !scratch.is(index)); 847 DCHECK(!scratch.is(receiver) && !scratch.is(index));
879 848
(...skipping 3827 matching lines...) Expand 10 before | Expand all | Expand 10 after
4707 return_value_operand, 4676 return_value_operand,
4708 NULL); 4677 NULL);
4709 } 4678 }
4710 4679
4711 4680
4712 #undef __ 4681 #undef __
4713 4682
4714 } } // namespace v8::internal 4683 } } // namespace v8::internal
4715 4684
4716 #endif // V8_TARGET_ARCH_X64 4685 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ic/x64/ic-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698