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

Side by Side Diff: src/ic/x64/ic-compiler-x64.cc

Issue 480413008: Move PropertyAccessCompiler and CallOptimization to their own files (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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/ic/x64/access-compiler-x64.cc ('k') | tools/gyp/v8.gyp » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/ic/call-optimization.h"
9 #include "src/ic/ic-compiler.h" 10 #include "src/ic/ic-compiler.h"
10 11
11 namespace v8 { 12 namespace v8 {
12 namespace internal { 13 namespace internal {
13 14
14 #define __ ACCESS_MASM(masm) 15 #define __ ACCESS_MASM(masm)
15 16
16 17
17 void PropertyHandlerCompiler::GenerateDictionaryNegativeLookup( 18 void PropertyHandlerCompiler::GenerateDictionaryNegativeLookup(
18 MacroAssembler* masm, Label* miss_label, Register receiver, 19 MacroAssembler* masm, Label* miss_label, Register receiver,
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 Register scratch, Label* miss) { 192 Register scratch, Label* miss) {
192 Handle<PropertyCell> cell = JSGlobalObject::EnsurePropertyCell(global, name); 193 Handle<PropertyCell> cell = JSGlobalObject::EnsurePropertyCell(global, name);
193 DCHECK(cell->value()->IsTheHole()); 194 DCHECK(cell->value()->IsTheHole());
194 __ Move(scratch, cell); 195 __ Move(scratch, cell);
195 __ Cmp(FieldOperand(scratch, Cell::kValueOffset), 196 __ Cmp(FieldOperand(scratch, Cell::kValueOffset),
196 masm->isolate()->factory()->the_hole_value()); 197 masm->isolate()->factory()->the_hole_value());
197 __ j(not_equal, miss); 198 __ j(not_equal, miss);
198 } 199 }
199 200
200 201
201 void PropertyAccessCompiler::GenerateTailCall(MacroAssembler* masm,
202 Handle<Code> code) {
203 __ jmp(code, RelocInfo::CODE_TARGET);
204 }
205
206
207 #undef __ 202 #undef __
208 #define __ ACCESS_MASM((masm())) 203 #define __ ACCESS_MASM((masm()))
209 204
210 205
211 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, 206 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label,
212 Handle<Name> name) { 207 Handle<Name> name) {
213 if (!label->is_unused()) { 208 if (!label->is_unused()) {
214 __ bind(label); 209 __ bind(label);
215 __ Move(this->name(), name); 210 __ Move(this->name(), name);
216 } 211 }
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 756
762 __ bind(&miss); 757 __ bind(&miss);
763 758
764 TailCallBuiltin(masm(), MissBuiltin(kind())); 759 TailCallBuiltin(masm(), MissBuiltin(kind()));
765 760
766 // Return the generated code. 761 // Return the generated code.
767 return GetCode(kind(), Code::NORMAL, factory()->empty_string(), POLYMORPHIC); 762 return GetCode(kind(), Code::NORMAL, factory()->empty_string(), POLYMORPHIC);
768 } 763 }
769 764
770 765
771 Register* PropertyAccessCompiler::load_calling_convention() {
772 // receiver, name, scratch1, scratch2, scratch3, scratch4.
773 Register receiver = LoadIC::ReceiverRegister();
774 Register name = LoadIC::NameRegister();
775 static Register registers[] = {receiver, name, rax, rbx, rdi, r8};
776 return registers;
777 }
778
779
780 Register* PropertyAccessCompiler::store_calling_convention() {
781 // receiver, name, scratch1, scratch2, scratch3.
782 Register receiver = KeyedStoreIC::ReceiverRegister();
783 Register name = KeyedStoreIC::NameRegister();
784 DCHECK(rbx.is(KeyedStoreIC::MapRegister()));
785 static Register registers[] = {receiver, name, rbx, rdi, r8};
786 return registers;
787 }
788
789
790 Register NamedStoreHandlerCompiler::value() { return StoreIC::ValueRegister(); } 766 Register NamedStoreHandlerCompiler::value() { return StoreIC::ValueRegister(); }
791 767
792 768
793 #undef __ 769 #undef __
794 #define __ ACCESS_MASM(masm) 770 #define __ ACCESS_MASM(masm)
795 771
796 772
797 void NamedLoadHandlerCompiler::GenerateLoadViaGetter( 773 void NamedLoadHandlerCompiler::GenerateLoadViaGetter(
798 MacroAssembler* masm, Handle<HeapType> type, Register receiver, 774 MacroAssembler* masm, Handle<HeapType> type, Register receiver,
799 Handle<JSFunction> getter) { 775 Handle<JSFunction> getter) {
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 // Do tail-call to runtime routine. 960 // Do tail-call to runtime routine.
985 __ TailCallRuntime(Runtime::kSetProperty, 4, 1); 961 __ TailCallRuntime(Runtime::kSetProperty, 4, 1);
986 } 962 }
987 963
988 964
989 #undef __ 965 #undef __
990 } 966 }
991 } // namespace v8::internal 967 } // namespace v8::internal
992 968
993 #endif // V8_TARGET_ARCH_X64 969 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ic/x64/access-compiler-x64.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698