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

Side by Side Diff: src/ic/arm64/ic-compiler-arm64.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/arm64/access-compiler-arm64.cc ('k') | src/ic/call-optimization.h » ('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_ARM64 7 #if V8_TARGET_ARCH_ARM64
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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 ExternalReference ref = ExternalReference( 199 ExternalReference ref = ExternalReference(
199 &fun, ExternalReference::DIRECT_API_CALL, masm->isolate()); 200 &fun, ExternalReference::DIRECT_API_CALL, masm->isolate());
200 __ Mov(api_function_address, ref); 201 __ Mov(api_function_address, ref);
201 202
202 // Jump to stub. 203 // Jump to stub.
203 CallApiFunctionStub stub(isolate, is_store, call_data_undefined, argc); 204 CallApiFunctionStub stub(isolate, is_store, call_data_undefined, argc);
204 __ TailCallStub(&stub); 205 __ TailCallStub(&stub);
205 } 206 }
206 207
207 208
208 void PropertyAccessCompiler::GenerateTailCall(MacroAssembler* masm,
209 Handle<Code> code) {
210 __ Jump(code, RelocInfo::CODE_TARGET);
211 }
212
213
214 #undef __ 209 #undef __
215 #define __ ACCESS_MASM(masm()) 210 #define __ ACCESS_MASM(masm())
216 211
217 212
218 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, 213 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label,
219 Handle<Name> name) { 214 Handle<Name> name) {
220 if (!label->is_unused()) { 215 if (!label->is_unused()) {
221 __ Bind(label); 216 __ Bind(label);
222 __ Mov(this->name(), Operand(name)); 217 __ Mov(this->name(), Operand(name));
223 } 218 }
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 // Do tail-call to the runtime system. 751 // Do tail-call to the runtime system.
757 ExternalReference store_ic_property = ExternalReference( 752 ExternalReference store_ic_property = ExternalReference(
758 IC_Utility(IC::kStorePropertyWithInterceptor), isolate()); 753 IC_Utility(IC::kStorePropertyWithInterceptor), isolate());
759 __ TailCallExternalReference(store_ic_property, 3, 1); 754 __ TailCallExternalReference(store_ic_property, 3, 1);
760 755
761 // Return the generated code. 756 // Return the generated code.
762 return GetCode(kind(), Code::FAST, name); 757 return GetCode(kind(), Code::FAST, name);
763 } 758 }
764 759
765 760
766 // TODO(all): The so-called scratch registers are significant in some cases. For
767 // example, PropertyAccessCompiler::keyed_store_calling_convention()[3] (x3) is
768 // actually
769 // used for KeyedStoreCompiler::transition_map(). We should verify which
770 // registers are actually scratch registers, and which are important. For now,
771 // we use the same assignments as ARM to remain on the safe side.
772
773 Register* PropertyAccessCompiler::load_calling_convention() {
774 // receiver, name, scratch1, scratch2, scratch3, scratch4.
775 Register receiver = LoadIC::ReceiverRegister();
776 Register name = LoadIC::NameRegister();
777 static Register registers[] = {receiver, name, x3, x0, x4, x5};
778 return registers;
779 }
780
781
782 Register* PropertyAccessCompiler::store_calling_convention() {
783 // receiver, value, scratch1, scratch2, scratch3.
784 Register receiver = StoreIC::ReceiverRegister();
785 Register name = StoreIC::NameRegister();
786 DCHECK(x3.is(KeyedStoreIC::MapRegister()));
787 static Register registers[] = {receiver, name, x3, x4, x5};
788 return registers;
789 }
790
791
792 Register NamedStoreHandlerCompiler::value() { return StoreIC::ValueRegister(); } 761 Register NamedStoreHandlerCompiler::value() { return StoreIC::ValueRegister(); }
793 762
794 763
795 #undef __ 764 #undef __
796 #define __ ACCESS_MASM(masm) 765 #define __ ACCESS_MASM(masm)
797 766
798 void NamedLoadHandlerCompiler::GenerateLoadViaGetter( 767 void NamedLoadHandlerCompiler::GenerateLoadViaGetter(
799 MacroAssembler* masm, Handle<HeapType> type, Register receiver, 768 MacroAssembler* masm, Handle<HeapType> type, Register receiver,
800 Handle<JSFunction> getter) { 769 Handle<JSFunction> getter) {
801 { 770 {
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 // Do tail-call to runtime routine. 957 // Do tail-call to runtime routine.
989 __ TailCallRuntime(Runtime::kSetProperty, 4, 1); 958 __ TailCallRuntime(Runtime::kSetProperty, 4, 1);
990 } 959 }
991 960
992 961
993 #undef __ 962 #undef __
994 } 963 }
995 } // namespace v8::internal 964 } // namespace v8::internal
996 965
997 #endif // V8_TARGET_ARCH_ARM64 966 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/ic/arm64/access-compiler-arm64.cc ('k') | src/ic/call-optimization.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698