| 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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "src/assembler.h" | 10 #include "src/assembler.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 V(CallForwardVarargs) \ | 47 V(CallForwardVarargs) \ |
| 48 V(CallConstruct) \ | 48 V(CallConstruct) \ |
| 49 V(CallTrampoline) \ | 49 V(CallTrampoline) \ |
| 50 V(ConstructStub) \ | 50 V(ConstructStub) \ |
| 51 V(ConstructTrampoline) \ | 51 V(ConstructTrampoline) \ |
| 52 V(TransitionElementsKind) \ | 52 V(TransitionElementsKind) \ |
| 53 V(AllocateHeapNumber) \ | 53 V(AllocateHeapNumber) \ |
| 54 V(Builtin) \ | 54 V(Builtin) \ |
| 55 V(ArrayConstructor) \ | 55 V(ArrayConstructor) \ |
| 56 V(IteratingArrayBuiltin) \ | 56 V(IteratingArrayBuiltin) \ |
| 57 V(IteratingArrayBuiltinLoopContinuation) \ | |
| 58 V(ArrayNoArgumentConstructor) \ | 57 V(ArrayNoArgumentConstructor) \ |
| 59 V(ArraySingleArgumentConstructor) \ | 58 V(ArraySingleArgumentConstructor) \ |
| 60 V(ArrayNArgumentsConstructor) \ | 59 V(ArrayNArgumentsConstructor) \ |
| 61 V(Compare) \ | 60 V(Compare) \ |
| 62 V(BinaryOp) \ | 61 V(BinaryOp) \ |
| 63 V(BinaryOpWithAllocationSite) \ | 62 V(BinaryOpWithAllocationSite) \ |
| 64 V(BinaryOpWithVector) \ | 63 V(BinaryOpWithVector) \ |
| 65 V(CountOp) \ | 64 V(CountOp) \ |
| 66 V(StringAdd) \ | 65 V(StringAdd) \ |
| 67 V(StringCharAt) \ | 66 V(StringCharAt) \ |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 const CallInterfaceDescriptorData* data_; | 218 const CallInterfaceDescriptorData* data_; |
| 220 }; | 219 }; |
| 221 | 220 |
| 222 #define DECLARE_DESCRIPTOR_WITH_BASE(name, base) \ | 221 #define DECLARE_DESCRIPTOR_WITH_BASE(name, base) \ |
| 223 public: \ | 222 public: \ |
| 224 explicit name(Isolate* isolate) : base(isolate, key()) { \ | 223 explicit name(Isolate* isolate) : base(isolate, key()) { \ |
| 225 Initialize(isolate, key()); \ | 224 Initialize(isolate, key()); \ |
| 226 } \ | 225 } \ |
| 227 static inline CallDescriptors::Key key(); | 226 static inline CallDescriptors::Key key(); |
| 228 | 227 |
| 229 #define DECLARE_DEFAULT_DESCRIPTOR(name, base, parameter_count) \ | 228 static const int kMaxBuiltinRegisterParams = 5; |
| 230 DECLARE_DESCRIPTOR_WITH_BASE(name, base) \ | 229 |
| 231 protected: \ | 230 #define DECLARE_DEFAULT_DESCRIPTOR(name, base, parameter_count) \ |
| 232 void InitializePlatformSpecific(CallInterfaceDescriptorData* data) \ | 231 DECLARE_DESCRIPTOR_WITH_BASE(name, base) \ |
| 233 override { \ | 232 protected: \ |
| 234 DefaultInitializePlatformSpecific(data, parameter_count); \ | 233 static const int kRegisterParams = \ |
| 235 } \ | 234 parameter_count > kMaxBuiltinRegisterParams ? kMaxBuiltinRegisterParams \ |
| 236 name(Isolate* isolate, CallDescriptors::Key key) : base(isolate, key) {} \ | 235 : parameter_count; \ |
| 237 \ | 236 static const int kStackParams = parameter_count - kRegisterParams; \ |
| 237 void InitializePlatformSpecific(CallInterfaceDescriptorData* data) \ |
| 238 override { \ |
| 239 DefaultInitializePlatformSpecific(data, kRegisterParams); \ |
| 240 } \ |
| 241 void InitializePlatformIndependent(CallInterfaceDescriptorData* data) \ |
| 242 override { \ |
| 243 data->InitializePlatformIndependent(kRegisterParams, kStackParams, NULL); \ |
| 244 } \ |
| 245 name(Isolate* isolate, CallDescriptors::Key key) : base(isolate, key) {} \ |
| 246 \ |
| 238 public: | 247 public: |
| 239 | 248 |
| 240 #define DECLARE_DESCRIPTOR(name, base) \ | 249 #define DECLARE_DESCRIPTOR(name, base) \ |
| 241 DECLARE_DESCRIPTOR_WITH_BASE(name, base) \ | 250 DECLARE_DESCRIPTOR_WITH_BASE(name, base) \ |
| 242 protected: \ | 251 protected: \ |
| 243 void InitializePlatformSpecific(CallInterfaceDescriptorData* data) override; \ | 252 void InitializePlatformSpecific(CallInterfaceDescriptorData* data) override; \ |
| 244 name(Isolate* isolate, CallDescriptors::Key key) : base(isolate, key) {} \ | 253 name(Isolate* isolate, CallDescriptors::Key key) : base(isolate, key) {} \ |
| 245 \ | 254 \ |
| 246 public: | 255 public: |
| 247 | 256 |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 635 static const Register NewTargetRegister(); | 644 static const Register NewTargetRegister(); |
| 636 static const Register TargetRegister(); | 645 static const Register TargetRegister(); |
| 637 }; | 646 }; |
| 638 | 647 |
| 639 class IteratingArrayBuiltinDescriptor : public BuiltinDescriptor { | 648 class IteratingArrayBuiltinDescriptor : public BuiltinDescriptor { |
| 640 public: | 649 public: |
| 641 DEFINE_BUILTIN_PARAMETERS(kCallback, kThisArg) | 650 DEFINE_BUILTIN_PARAMETERS(kCallback, kThisArg) |
| 642 DECLARE_BUILTIN_DESCRIPTOR(IteratingArrayBuiltinDescriptor) | 651 DECLARE_BUILTIN_DESCRIPTOR(IteratingArrayBuiltinDescriptor) |
| 643 }; | 652 }; |
| 644 | 653 |
| 645 class IteratingArrayBuiltinLoopContinuationDescriptor | |
| 646 : public BuiltinDescriptor { | |
| 647 public: | |
| 648 DEFINE_BUILTIN_PARAMETERS(kCallback, kThisArg, kArray, kObject, kInitialK, | |
| 649 kLength, kTo) | |
| 650 DECLARE_BUILTIN_DESCRIPTOR(IteratingArrayBuiltinLoopContinuationDescriptor) | |
| 651 }; | |
| 652 | |
| 653 class ArrayConstructorDescriptor : public CallInterfaceDescriptor { | 654 class ArrayConstructorDescriptor : public CallInterfaceDescriptor { |
| 654 public: | 655 public: |
| 655 DEFINE_PARAMETERS(kTarget, kNewTarget, kActualArgumentsCount, kAllocationSite) | 656 DEFINE_PARAMETERS(kTarget, kNewTarget, kActualArgumentsCount, kAllocationSite) |
| 656 DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(ArrayConstructorDescriptor, | 657 DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(ArrayConstructorDescriptor, |
| 657 CallInterfaceDescriptor) | 658 CallInterfaceDescriptor) |
| 658 }; | 659 }; |
| 659 | 660 |
| 660 class ArrayNoArgumentConstructorDescriptor : public CallInterfaceDescriptor { | 661 class ArrayNoArgumentConstructorDescriptor : public CallInterfaceDescriptor { |
| 661 public: | 662 public: |
| 662 DEFINE_PARAMETERS(kFunction, kAllocationSite, kActualArgumentsCount, | 663 DEFINE_PARAMETERS(kFunction, kAllocationSite, kActualArgumentsCount, |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 900 } // namespace v8 | 901 } // namespace v8 |
| 901 | 902 |
| 902 | 903 |
| 903 #if V8_TARGET_ARCH_ARM64 | 904 #if V8_TARGET_ARCH_ARM64 |
| 904 #include "src/arm64/interface-descriptors-arm64.h" | 905 #include "src/arm64/interface-descriptors-arm64.h" |
| 905 #elif V8_TARGET_ARCH_ARM | 906 #elif V8_TARGET_ARCH_ARM |
| 906 #include "src/arm/interface-descriptors-arm.h" | 907 #include "src/arm/interface-descriptors-arm.h" |
| 907 #endif | 908 #endif |
| 908 | 909 |
| 909 #endif // V8_CALL_INTERFACE_DESCRIPTOR_H_ | 910 #endif // V8_CALL_INTERFACE_DESCRIPTOR_H_ |
| OLD | NEW |