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_COMPILER_LINKAGE_H_ | 5 #ifndef V8_COMPILER_LINKAGE_H_ |
6 #define V8_COMPILER_LINKAGE_H_ | 6 #define V8_COMPILER_LINKAGE_H_ |
7 | 7 |
8 #include "src/base/flags.h" | 8 #include "src/base/flags.h" |
9 #include "src/compiler/frame.h" | 9 #include "src/compiler/frame.h" |
10 #include "src/compiler/operator.h" | 10 #include "src/compiler/operator.h" |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 kCallCodeObject, // target is a Code object | 168 kCallCodeObject, // target is a Code object |
169 kCallJSFunction, // target is a JSFunction object | 169 kCallJSFunction, // target is a JSFunction object |
170 kCallAddress // target is a machine pointer | 170 kCallAddress // target is a machine pointer |
171 }; | 171 }; |
172 | 172 |
173 enum Flag { | 173 enum Flag { |
174 kNoFlags = 0u, | 174 kNoFlags = 0u, |
175 kNeedsFrameState = 1u << 0, | 175 kNeedsFrameState = 1u << 0, |
176 kHasExceptionHandler = 1u << 1, | 176 kHasExceptionHandler = 1u << 1, |
177 kHasLocalCatchHandler = 1u << 2, | 177 kHasLocalCatchHandler = 1u << 2, |
178 kSupportsTailCalls = 1u << 3, | 178 kHasLocalCatchHandlerForPromiseReject = 1u << 3, |
179 kCanUseRoots = 1u << 4, | 179 kSupportsTailCalls = 1u << 4, |
| 180 kCanUseRoots = 1u << 5, |
180 // (arm64 only) native stack should be used for arguments. | 181 // (arm64 only) native stack should be used for arguments. |
181 kUseNativeStack = 1u << 5, | 182 kUseNativeStack = 1u << 6, |
182 // (arm64 only) call instruction has to restore JSSP or CSP. | 183 // (arm64 only) call instruction has to restore JSSP or CSP. |
183 kRestoreJSSP = 1u << 6, | 184 kRestoreJSSP = 1u << 7, |
184 kRestoreCSP = 1u << 7, | 185 kRestoreCSP = 1u << 8, |
185 // Causes the code generator to initialize the root register. | 186 // Causes the code generator to initialize the root register. |
186 kInitializeRootRegister = 1u << 8, | 187 kInitializeRootRegister = 1u << 9, |
187 // Does not ever try to allocate space on our heap. | 188 // Does not ever try to allocate space on our heap. |
188 kNoAllocate = 1u << 9 | 189 kNoAllocate = 1u << 10 |
189 }; | 190 }; |
190 typedef base::Flags<Flag> Flags; | 191 typedef base::Flags<Flag> Flags; |
191 | 192 |
192 CallDescriptor(Kind kind, MachineType target_type, LinkageLocation target_loc, | 193 CallDescriptor(Kind kind, MachineType target_type, LinkageLocation target_loc, |
193 LocationSignature* location_sig, size_t stack_param_count, | 194 LocationSignature* location_sig, size_t stack_param_count, |
194 Operator::Properties properties, | 195 Operator::Properties properties, |
195 RegList callee_saved_registers, | 196 RegList callee_saved_registers, |
196 RegList callee_saved_fp_registers, Flags flags, | 197 RegList callee_saved_fp_registers, Flags flags, |
197 const char* debug_name = "") | 198 const char* debug_name = "") |
198 : kind_(kind), | 199 : kind_(kind), |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 CallDescriptor* const incoming_; | 426 CallDescriptor* const incoming_; |
426 | 427 |
427 DISALLOW_COPY_AND_ASSIGN(Linkage); | 428 DISALLOW_COPY_AND_ASSIGN(Linkage); |
428 }; | 429 }; |
429 | 430 |
430 } // namespace compiler | 431 } // namespace compiler |
431 } // namespace internal | 432 } // namespace internal |
432 } // namespace v8 | 433 } // namespace v8 |
433 | 434 |
434 #endif // V8_COMPILER_LINKAGE_H_ | 435 #endif // V8_COMPILER_LINKAGE_H_ |
OLD | NEW |