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" |
11 #include "src/globals.h" | 11 #include "src/globals.h" |
12 #include "src/macro-assembler.h" | 12 #include "src/macro-assembler.h" |
13 | 13 |
14 namespace v8 { | 14 namespace v8 { |
15 namespace internal { | 15 namespace internal { |
16 | 16 |
17 class PlatformInterfaceDescriptor; | 17 class PlatformInterfaceDescriptor; |
18 | 18 |
19 #define INTERFACE_DESCRIPTOR_LIST(V) \ | 19 #define INTERFACE_DESCRIPTOR_LIST(V) \ |
20 V(Void) \ | 20 V(Void) \ |
21 V(ContextOnly) \ | 21 V(ContextOnly) \ |
22 V(Load) \ | 22 V(Load) \ |
23 V(LoadWithVector) \ | 23 V(LoadWithVector) \ |
| 24 V(LoadField) \ |
24 V(LoadICProtoArray) \ | 25 V(LoadICProtoArray) \ |
25 V(LoadGlobal) \ | 26 V(LoadGlobal) \ |
26 V(LoadGlobalWithVector) \ | 27 V(LoadGlobalWithVector) \ |
27 V(Store) \ | 28 V(Store) \ |
28 V(StoreWithVector) \ | 29 V(StoreWithVector) \ |
29 V(StoreNamedTransition) \ | 30 V(StoreNamedTransition) \ |
30 V(StoreTransition) \ | 31 V(StoreTransition) \ |
31 V(VarArgFunction) \ | 32 V(VarArgFunction) \ |
32 V(FastNewClosure) \ | 33 V(FastNewClosure) \ |
33 V(FastNewFunctionContext) \ | 34 V(FastNewFunctionContext) \ |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 public: | 302 public: |
302 DEFINE_PARAMETERS(kReceiver, kName, kSlot) | 303 DEFINE_PARAMETERS(kReceiver, kName, kSlot) |
303 DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(LoadDescriptor, | 304 DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(LoadDescriptor, |
304 CallInterfaceDescriptor) | 305 CallInterfaceDescriptor) |
305 | 306 |
306 static const Register ReceiverRegister(); | 307 static const Register ReceiverRegister(); |
307 static const Register NameRegister(); | 308 static const Register NameRegister(); |
308 static const Register SlotRegister(); | 309 static const Register SlotRegister(); |
309 }; | 310 }; |
310 | 311 |
| 312 // LoadFieldDescriptor is used by the shared handler that loads a field from an |
| 313 // object based on the smi-encoded field description. |
| 314 class LoadFieldDescriptor : public CallInterfaceDescriptor { |
| 315 public: |
| 316 DEFINE_PARAMETERS(kReceiver, kSmiHandler) |
| 317 DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(LoadFieldDescriptor, |
| 318 CallInterfaceDescriptor) |
| 319 |
| 320 static const Register ReceiverRegister(); |
| 321 static const Register SmiHandlerRegister(); |
| 322 }; |
| 323 |
311 class LoadGlobalDescriptor : public CallInterfaceDescriptor { | 324 class LoadGlobalDescriptor : public CallInterfaceDescriptor { |
312 public: | 325 public: |
313 DEFINE_PARAMETERS(kName, kSlot) | 326 DEFINE_PARAMETERS(kName, kSlot) |
314 DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(LoadGlobalDescriptor, | 327 DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(LoadGlobalDescriptor, |
315 CallInterfaceDescriptor) | 328 CallInterfaceDescriptor) |
316 | 329 |
317 static const Register NameRegister() { | 330 static const Register NameRegister() { |
318 return LoadDescriptor::NameRegister(); | 331 return LoadDescriptor::NameRegister(); |
319 } | 332 } |
320 | 333 |
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
875 } // namespace v8 | 888 } // namespace v8 |
876 | 889 |
877 | 890 |
878 #if V8_TARGET_ARCH_ARM64 | 891 #if V8_TARGET_ARCH_ARM64 |
879 #include "src/arm64/interface-descriptors-arm64.h" | 892 #include "src/arm64/interface-descriptors-arm64.h" |
880 #elif V8_TARGET_ARCH_ARM | 893 #elif V8_TARGET_ARCH_ARM |
881 #include "src/arm/interface-descriptors-arm.h" | 894 #include "src/arm/interface-descriptors-arm.h" |
882 #endif | 895 #endif |
883 | 896 |
884 #endif // V8_CALL_INTERFACE_DESCRIPTOR_H_ | 897 #endif // V8_CALL_INTERFACE_DESCRIPTOR_H_ |
OLD | NEW |