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 #ifndef V8_CALL_INTERFACE_DESCRIPTOR_H_ | 5 #ifndef V8_CALL_INTERFACE_DESCRIPTOR_H_ |
6 #define V8_CALL_INTERFACE_DESCRIPTOR_H_ | 6 #define V8_CALL_INTERFACE_DESCRIPTOR_H_ |
7 | 7 |
8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
9 #include "src/macro-assembler.h" | 9 #include "src/macro-assembler.h" |
10 | 10 |
11 namespace v8 { | 11 namespace v8 { |
12 namespace internal { | 12 namespace internal { |
13 | 13 |
14 class PlatformInterfaceDescriptor; | 14 class PlatformInterfaceDescriptor; |
15 | 15 |
16 #define INTERFACE_DESCRIPTOR_LIST(V) \ | 16 #define INTERFACE_DESCRIPTOR_LIST(V) \ |
17 V(Void) \ | |
17 V(Load) \ | 18 V(Load) \ |
18 V(Store) \ | 19 V(Store) \ |
19 V(StoreTransition) \ | 20 V(StoreTransition) \ |
20 V(VectorStoreTransition) \ | 21 V(VectorStoreTransition) \ |
21 V(VectorStoreICTrampoline) \ | 22 V(VectorStoreICTrampoline) \ |
22 V(VectorStoreIC) \ | 23 V(VectorStoreIC) \ |
23 V(InstanceOf) \ | 24 V(InstanceOf) \ |
24 V(LoadWithVector) \ | 25 V(LoadWithVector) \ |
25 V(FastNewClosure) \ | 26 V(FastNewClosure) \ |
26 V(FastNewContext) \ | 27 V(FastNewContext) \ |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
66 V(ApiGetter) \ | 67 V(ApiGetter) \ |
67 V(ArgumentsAccessRead) \ | 68 V(ArgumentsAccessRead) \ |
68 V(ArgumentsAccessNew) \ | 69 V(ArgumentsAccessNew) \ |
69 V(StoreArrayLiteralElement) \ | 70 V(StoreArrayLiteralElement) \ |
70 V(LoadGlobalViaContext) \ | 71 V(LoadGlobalViaContext) \ |
71 V(StoreGlobalViaContext) \ | 72 V(StoreGlobalViaContext) \ |
72 V(MathPowTagged) \ | 73 V(MathPowTagged) \ |
73 V(MathPowInteger) \ | 74 V(MathPowInteger) \ |
74 V(ContextOnly) \ | 75 V(ContextOnly) \ |
75 V(GrowArrayElements) \ | 76 V(GrowArrayElements) \ |
76 V(MathRoundVariantCallFromUnoptimizedCode) \ | |
77 V(MathRoundVariantCallFromOptimizedCode) \ | |
78 V(InterpreterPushArgsAndCall) \ | 77 V(InterpreterPushArgsAndCall) \ |
79 V(InterpreterPushArgsAndConstruct) \ | 78 V(InterpreterPushArgsAndConstruct) \ |
80 V(InterpreterCEntry) | 79 V(InterpreterCEntry) |
81 | 80 |
82 | 81 |
83 class CallInterfaceDescriptorData { | 82 class CallInterfaceDescriptorData { |
84 public: | 83 public: |
85 CallInterfaceDescriptorData() | 84 CallInterfaceDescriptorData() |
86 : register_param_count_(-1), function_type_(nullptr) {} | 85 : register_param_count_(-1), function_type_(nullptr) {} |
87 | 86 |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
226 static inline CallDescriptors::Key key(); | 225 static inline CallDescriptors::Key key(); |
227 | 226 |
228 | 227 |
229 #define DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(name, base) \ | 228 #define DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(name, base) \ |
230 DECLARE_DESCRIPTOR(name, base) \ | 229 DECLARE_DESCRIPTOR(name, base) \ |
231 protected: \ | 230 protected: \ |
232 Type::FunctionType* BuildCallInterfaceDescriptorFunctionType( \ | 231 Type::FunctionType* BuildCallInterfaceDescriptorFunctionType( \ |
233 Isolate* isolate, int register_param_count) override; \ | 232 Isolate* isolate, int register_param_count) override; \ |
234 \ | 233 \ |
235 public: | 234 public: |
235 | |
236 | |
237 class VoidDescriptor : public CallInterfaceDescriptor { | |
238 public: | |
239 DECLARE_DESCRIPTOR(VoidDescriptor, CallInterfaceDescriptor) | |
240 }; | |
241 | |
Michael Starzinger
2015/12/01 18:06:53
nit: Two empty newlines between top-level declarat
danno
2015/12/02 07:00:19
Done.
| |
236 // LoadDescriptor is used by all stubs that implement Load/KeyedLoad ICs. | 242 // LoadDescriptor is used by all stubs that implement Load/KeyedLoad ICs. |
237 class LoadDescriptor : public CallInterfaceDescriptor { | 243 class LoadDescriptor : public CallInterfaceDescriptor { |
238 public: | 244 public: |
239 DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(LoadDescriptor, | 245 DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(LoadDescriptor, |
240 CallInterfaceDescriptor) | 246 CallInterfaceDescriptor) |
241 | 247 |
242 enum ParameterIndices { kReceiverIndex, kNameIndex, kSlotIndex }; | 248 enum ParameterIndices { kReceiverIndex, kNameIndex, kSlotIndex }; |
243 static const Register ReceiverRegister(); | 249 static const Register ReceiverRegister(); |
244 static const Register NameRegister(); | 250 static const Register NameRegister(); |
245 static const Register SlotRegister(); | 251 static const Register SlotRegister(); |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
712 | 718 |
713 | 719 |
714 class MathPowIntegerDescriptor : public CallInterfaceDescriptor { | 720 class MathPowIntegerDescriptor : public CallInterfaceDescriptor { |
715 public: | 721 public: |
716 DECLARE_DESCRIPTOR(MathPowIntegerDescriptor, CallInterfaceDescriptor) | 722 DECLARE_DESCRIPTOR(MathPowIntegerDescriptor, CallInterfaceDescriptor) |
717 | 723 |
718 static const Register exponent(); | 724 static const Register exponent(); |
719 }; | 725 }; |
720 | 726 |
721 | 727 |
722 class MathRoundVariantCallFromOptimizedCodeDescriptor | |
723 : public CallInterfaceDescriptor { | |
724 public: | |
725 DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE( | |
726 MathRoundVariantCallFromOptimizedCodeDescriptor, CallInterfaceDescriptor) | |
727 }; | |
728 | |
729 | |
730 class MathRoundVariantCallFromUnoptimizedCodeDescriptor | |
731 : public CallInterfaceDescriptor { | |
732 public: | |
733 DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE( | |
734 MathRoundVariantCallFromUnoptimizedCodeDescriptor, | |
735 CallInterfaceDescriptor) | |
736 }; | |
737 | |
738 | |
739 class ContextOnlyDescriptor : public CallInterfaceDescriptor { | 728 class ContextOnlyDescriptor : public CallInterfaceDescriptor { |
740 public: | 729 public: |
741 DECLARE_DESCRIPTOR(ContextOnlyDescriptor, CallInterfaceDescriptor) | 730 DECLARE_DESCRIPTOR(ContextOnlyDescriptor, CallInterfaceDescriptor) |
742 }; | 731 }; |
743 | 732 |
744 | 733 |
745 class GrowArrayElementsDescriptor : public CallInterfaceDescriptor { | 734 class GrowArrayElementsDescriptor : public CallInterfaceDescriptor { |
746 public: | 735 public: |
747 DECLARE_DESCRIPTOR(GrowArrayElementsDescriptor, CallInterfaceDescriptor) | 736 DECLARE_DESCRIPTOR(GrowArrayElementsDescriptor, CallInterfaceDescriptor) |
748 | 737 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
786 } // namespace v8 | 775 } // namespace v8 |
787 | 776 |
788 | 777 |
789 #if V8_TARGET_ARCH_ARM64 | 778 #if V8_TARGET_ARCH_ARM64 |
790 #include "src/arm64/interface-descriptors-arm64.h" | 779 #include "src/arm64/interface-descriptors-arm64.h" |
791 #elif V8_TARGET_ARCH_ARM | 780 #elif V8_TARGET_ARCH_ARM |
792 #include "src/arm/interface-descriptors-arm.h" | 781 #include "src/arm/interface-descriptors-arm.h" |
793 #endif | 782 #endif |
794 | 783 |
795 #endif // V8_CALL_INTERFACE_DESCRIPTOR_H_ | 784 #endif // V8_CALL_INTERFACE_DESCRIPTOR_H_ |
OLD | NEW |