OLD | NEW |
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_ARM | 7 #if V8_TARGET_ARCH_ARM |
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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL; | 203 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL; |
203 ExternalReference ref = ExternalReference(&fun, type, masm->isolate()); | 204 ExternalReference ref = ExternalReference(&fun, type, masm->isolate()); |
204 __ mov(api_function_address, Operand(ref)); | 205 __ mov(api_function_address, Operand(ref)); |
205 | 206 |
206 // Jump to stub. | 207 // Jump to stub. |
207 CallApiFunctionStub stub(isolate, is_store, call_data_undefined, argc); | 208 CallApiFunctionStub stub(isolate, is_store, call_data_undefined, argc); |
208 __ TailCallStub(&stub); | 209 __ TailCallStub(&stub); |
209 } | 210 } |
210 | 211 |
211 | 212 |
212 void PropertyAccessCompiler::GenerateTailCall(MacroAssembler* masm, | |
213 Handle<Code> code) { | |
214 __ Jump(code, RelocInfo::CODE_TARGET); | |
215 } | |
216 | |
217 | |
218 #undef __ | 213 #undef __ |
219 #define __ ACCESS_MASM(masm()) | 214 #define __ ACCESS_MASM(masm()) |
220 | 215 |
221 | 216 |
222 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, | 217 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, |
223 Handle<Name> name) { | 218 Handle<Name> name) { |
224 if (!label->is_unused()) { | 219 if (!label->is_unused()) { |
225 __ bind(label); | 220 __ bind(label); |
226 __ mov(this->name(), Operand(name)); | 221 __ mov(this->name(), Operand(name)); |
227 } | 222 } |
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 // Do tail-call to the runtime system. | 739 // Do tail-call to the runtime system. |
745 ExternalReference store_ic_property = ExternalReference( | 740 ExternalReference store_ic_property = ExternalReference( |
746 IC_Utility(IC::kStorePropertyWithInterceptor), isolate()); | 741 IC_Utility(IC::kStorePropertyWithInterceptor), isolate()); |
747 __ TailCallExternalReference(store_ic_property, 3, 1); | 742 __ TailCallExternalReference(store_ic_property, 3, 1); |
748 | 743 |
749 // Return the generated code. | 744 // Return the generated code. |
750 return GetCode(kind(), Code::FAST, name); | 745 return GetCode(kind(), Code::FAST, name); |
751 } | 746 } |
752 | 747 |
753 | 748 |
754 Register* PropertyAccessCompiler::load_calling_convention() { | |
755 // receiver, name, scratch1, scratch2, scratch3, scratch4. | |
756 Register receiver = LoadIC::ReceiverRegister(); | |
757 Register name = LoadIC::NameRegister(); | |
758 static Register registers[] = {receiver, name, r3, r0, r4, r5}; | |
759 return registers; | |
760 } | |
761 | |
762 | |
763 Register* PropertyAccessCompiler::store_calling_convention() { | |
764 // receiver, name, scratch1, scratch2, scratch3. | |
765 Register receiver = StoreIC::ReceiverRegister(); | |
766 Register name = StoreIC::NameRegister(); | |
767 DCHECK(r3.is(KeyedStoreIC::MapRegister())); | |
768 static Register registers[] = {receiver, name, r3, r4, r5}; | |
769 return registers; | |
770 } | |
771 | |
772 | |
773 Register NamedStoreHandlerCompiler::value() { return StoreIC::ValueRegister(); } | 749 Register NamedStoreHandlerCompiler::value() { return StoreIC::ValueRegister(); } |
774 | 750 |
775 | 751 |
776 #undef __ | 752 #undef __ |
777 #define __ ACCESS_MASM(masm) | 753 #define __ ACCESS_MASM(masm) |
778 | 754 |
779 | 755 |
780 void NamedLoadHandlerCompiler::GenerateLoadViaGetter( | 756 void NamedLoadHandlerCompiler::GenerateLoadViaGetter( |
781 MacroAssembler* masm, Handle<HeapType> type, Register receiver, | 757 MacroAssembler* masm, Handle<HeapType> type, Register receiver, |
782 Handle<JSFunction> getter) { | 758 Handle<JSFunction> getter) { |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
975 // Do tail-call to runtime routine. | 951 // Do tail-call to runtime routine. |
976 __ TailCallRuntime(Runtime::kSetProperty, 4, 1); | 952 __ TailCallRuntime(Runtime::kSetProperty, 4, 1); |
977 } | 953 } |
978 | 954 |
979 | 955 |
980 #undef __ | 956 #undef __ |
981 } | 957 } |
982 } // namespace v8::internal | 958 } // namespace v8::internal |
983 | 959 |
984 #endif // V8_TARGET_ARCH_ARM | 960 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |