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

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

Issue 338963003: KeyedLoadIC should have same register spec as LoadIC. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Last comment response. Created 6 years, 5 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/builtins-x64.cc ('k') | src/x64/debug-x64.cc » ('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 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 762 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 773
774 __ bind(&done); 774 __ bind(&done);
775 __ IncrementCounter(counters->math_pow(), 1); 775 __ IncrementCounter(counters->math_pow(), 1);
776 __ ret(0); 776 __ ret(0);
777 } 777 }
778 } 778 }
779 779
780 780
781 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { 781 void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
782 Label miss; 782 Label miss;
783 Register receiver; 783 Register receiver = LoadIC::ReceiverRegister();
784 Register name = LoadIC::NameRegister();
785
786 ASSERT(kind() == Code::LOAD_IC ||
787 kind() == Code::KEYED_LOAD_IC);
788
784 if (kind() == Code::KEYED_LOAD_IC) { 789 if (kind() == Code::KEYED_LOAD_IC) {
785 // ----------- S t a t e ------------- 790 __ Cmp(name, isolate()->factory()->prototype_string());
786 // -- rax : key
787 // -- rdx : receiver
788 // -- rsp[0] : return address
789 // -----------------------------------
790 __ Cmp(rax, isolate()->factory()->prototype_string());
791 __ j(not_equal, &miss); 791 __ j(not_equal, &miss);
792 receiver = rdx;
793 } else {
794 ASSERT(kind() == Code::LOAD_IC);
795 // ----------- S t a t e -------------
796 // -- rax : receiver
797 // -- rcx : name
798 // -- rsp[0] : return address
799 // -----------------------------------
800 receiver = rax;
801 } 792 }
802 793
803 StubCompiler::GenerateLoadFunctionPrototype(masm, receiver, r8, r9, &miss); 794 StubCompiler::GenerateLoadFunctionPrototype(masm, receiver, r8, r9, &miss);
804 __ bind(&miss); 795 __ bind(&miss);
805 StubCompiler::TailCallBuiltin( 796 StubCompiler::TailCallBuiltin(
806 masm, BaseLoadStoreStubCompiler::MissBuiltin(kind())); 797 masm, BaseLoadStoreStubCompiler::MissBuiltin(kind()));
807 } 798 }
808 799
809 800
810 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { 801 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
(...skipping 4139 matching lines...) Expand 10 before | Expand all | Expand 10 after
4950 return_value_operand, 4941 return_value_operand,
4951 NULL); 4942 NULL);
4952 } 4943 }
4953 4944
4954 4945
4955 #undef __ 4946 #undef __
4956 4947
4957 } } // namespace v8::internal 4948 } } // namespace v8::internal
4958 4949
4959 #endif // V8_TARGET_ARCH_X64 4950 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/builtins-x64.cc ('k') | src/x64/debug-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698