OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_CODE_STUBS_H_ | 5 #ifndef V8_CODE_STUBS_H_ |
6 #define V8_CODE_STUBS_H_ | 6 #define V8_CODE_STUBS_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/assembler.h" | 9 #include "src/assembler.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 V(GetProperty) \ | 97 V(GetProperty) \ |
98 V(SetProperty) \ | 98 V(SetProperty) \ |
99 V(InvokeBuiltin) \ | 99 V(InvokeBuiltin) \ |
100 V(DirectCEntry) \ | 100 V(DirectCEntry) \ |
101 V(StoreRegistersState) \ | 101 V(StoreRegistersState) \ |
102 V(RestoreRegistersState) | 102 V(RestoreRegistersState) |
103 #else | 103 #else |
104 #define CODE_STUB_LIST_ARM64(V) | 104 #define CODE_STUB_LIST_ARM64(V) |
105 #endif | 105 #endif |
106 | 106 |
| 107 // List of code stubs only used on PPC platforms. |
| 108 #ifdef V8_TARGET_ARCH_PPC |
| 109 #define CODE_STUB_LIST_PPC(V) \ |
| 110 V(GetProperty) \ |
| 111 V(SetProperty) \ |
| 112 V(InvokeBuiltin) \ |
| 113 V(DirectCEntry) |
| 114 #else |
| 115 #define CODE_STUB_LIST_PPC(V) |
| 116 #endif |
| 117 |
107 // List of code stubs only used on MIPS platforms. | 118 // List of code stubs only used on MIPS platforms. |
108 #if V8_TARGET_ARCH_MIPS | 119 #if V8_TARGET_ARCH_MIPS |
109 #define CODE_STUB_LIST_MIPS(V) \ | 120 #define CODE_STUB_LIST_MIPS(V) \ |
110 V(RegExpCEntry) \ | 121 V(RegExpCEntry) \ |
111 V(DirectCEntry) \ | 122 V(DirectCEntry) \ |
112 V(StoreRegistersState) \ | 123 V(StoreRegistersState) \ |
113 V(RestoreRegistersState) | 124 V(RestoreRegistersState) |
114 #elif V8_TARGET_ARCH_MIPS64 | 125 #elif V8_TARGET_ARCH_MIPS64 |
115 #define CODE_STUB_LIST_MIPS(V) \ | 126 #define CODE_STUB_LIST_MIPS(V) \ |
116 V(RegExpCEntry) \ | 127 V(RegExpCEntry) \ |
117 V(DirectCEntry) \ | 128 V(DirectCEntry) \ |
118 V(StoreRegistersState) \ | 129 V(StoreRegistersState) \ |
119 V(RestoreRegistersState) | 130 V(RestoreRegistersState) |
120 #else | 131 #else |
121 #define CODE_STUB_LIST_MIPS(V) | 132 #define CODE_STUB_LIST_MIPS(V) |
122 #endif | 133 #endif |
123 | 134 |
124 // Combined list of code stubs. | 135 // Combined list of code stubs. |
125 #define CODE_STUB_LIST(V) \ | 136 #define CODE_STUB_LIST(V) \ |
126 CODE_STUB_LIST_ALL_PLATFORMS(V) \ | 137 CODE_STUB_LIST_ALL_PLATFORMS(V) \ |
127 CODE_STUB_LIST_ARM(V) \ | 138 CODE_STUB_LIST_ARM(V) \ |
128 CODE_STUB_LIST_ARM64(V) \ | 139 CODE_STUB_LIST_ARM64(V) \ |
| 140 CODE_STUB_LIST_PPC(V) \ |
129 CODE_STUB_LIST_MIPS(V) | 141 CODE_STUB_LIST_MIPS(V) |
130 | 142 |
131 // Stub is base classes of all stubs. | 143 // Stub is base classes of all stubs. |
132 class CodeStub BASE_EMBEDDED { | 144 class CodeStub BASE_EMBEDDED { |
133 public: | 145 public: |
134 enum Major { | 146 enum Major { |
135 UninitializedMajorKey = 0, | 147 UninitializedMajorKey = 0, |
136 #define DEF_ENUM(name) name, | 148 #define DEF_ENUM(name) name, |
137 CODE_STUB_LIST(DEF_ENUM) | 149 CODE_STUB_LIST(DEF_ENUM) |
138 #undef DEF_ENUM | 150 #undef DEF_ENUM |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 } } // namespace v8::internal | 516 } } // namespace v8::internal |
505 | 517 |
506 #if V8_TARGET_ARCH_IA32 | 518 #if V8_TARGET_ARCH_IA32 |
507 #include "src/ia32/code-stubs-ia32.h" | 519 #include "src/ia32/code-stubs-ia32.h" |
508 #elif V8_TARGET_ARCH_X64 | 520 #elif V8_TARGET_ARCH_X64 |
509 #include "src/x64/code-stubs-x64.h" | 521 #include "src/x64/code-stubs-x64.h" |
510 #elif V8_TARGET_ARCH_ARM64 | 522 #elif V8_TARGET_ARCH_ARM64 |
511 #include "src/arm64/code-stubs-arm64.h" | 523 #include "src/arm64/code-stubs-arm64.h" |
512 #elif V8_TARGET_ARCH_ARM | 524 #elif V8_TARGET_ARCH_ARM |
513 #include "src/arm/code-stubs-arm.h" | 525 #include "src/arm/code-stubs-arm.h" |
| 526 #elif V8_TARGET_ARCH_PPC |
| 527 #include "src/ppc/code-stubs-ppc.h" |
514 #elif V8_TARGET_ARCH_MIPS | 528 #elif V8_TARGET_ARCH_MIPS |
515 #include "src/mips/code-stubs-mips.h" | 529 #include "src/mips/code-stubs-mips.h" |
516 #elif V8_TARGET_ARCH_MIPS64 | 530 #elif V8_TARGET_ARCH_MIPS64 |
517 #include "src/mips64/code-stubs-mips64.h" | 531 #include "src/mips64/code-stubs-mips64.h" |
518 #elif V8_TARGET_ARCH_X87 | 532 #elif V8_TARGET_ARCH_X87 |
519 #include "src/x87/code-stubs-x87.h" | 533 #include "src/x87/code-stubs-x87.h" |
520 #else | 534 #else |
521 #error Unsupported target architecture. | 535 #error Unsupported target architecture. |
522 #endif | 536 #endif |
523 | 537 |
(...skipping 2002 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2526 | 2540 |
2527 | 2541 |
2528 class CallDescriptors { | 2542 class CallDescriptors { |
2529 public: | 2543 public: |
2530 static void InitializeForIsolate(Isolate* isolate); | 2544 static void InitializeForIsolate(Isolate* isolate); |
2531 }; | 2545 }; |
2532 | 2546 |
2533 } } // namespace v8::internal | 2547 } } // namespace v8::internal |
2534 | 2548 |
2535 #endif // V8_CODE_STUBS_H_ | 2549 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |