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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 enum Kind { | 167 enum Kind { |
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 kSupportsTailCalls = 1u << 2, |
178 kHasLocalCatchHandlerForPromiseReject = 1u << 3, | 178 kCanUseRoots = 1u << 3, |
179 kSupportsTailCalls = 1u << 4, | |
180 kCanUseRoots = 1u << 5, | |
181 // (arm64 only) native stack should be used for arguments. | 179 // (arm64 only) native stack should be used for arguments. |
182 kUseNativeStack = 1u << 6, | 180 kUseNativeStack = 1u << 4, |
183 // (arm64 only) call instruction has to restore JSSP or CSP. | 181 // (arm64 only) call instruction has to restore JSSP or CSP. |
184 kRestoreJSSP = 1u << 7, | 182 kRestoreJSSP = 1u << 5, |
185 kRestoreCSP = 1u << 8, | 183 kRestoreCSP = 1u << 6, |
186 // Causes the code generator to initialize the root register. | 184 // Causes the code generator to initialize the root register. |
187 kInitializeRootRegister = 1u << 9, | 185 kInitializeRootRegister = 1u << 7, |
188 // Does not ever try to allocate space on our heap. | 186 // Does not ever try to allocate space on our heap. |
189 kNoAllocate = 1u << 10 | 187 kNoAllocate = 1u << 8 |
190 }; | 188 }; |
191 typedef base::Flags<Flag> Flags; | 189 typedef base::Flags<Flag> Flags; |
192 | 190 |
193 CallDescriptor(Kind kind, MachineType target_type, LinkageLocation target_loc, | 191 CallDescriptor(Kind kind, MachineType target_type, LinkageLocation target_loc, |
194 LocationSignature* location_sig, size_t stack_param_count, | 192 LocationSignature* location_sig, size_t stack_param_count, |
195 Operator::Properties properties, | 193 Operator::Properties properties, |
196 RegList callee_saved_registers, | 194 RegList callee_saved_registers, |
197 RegList callee_saved_fp_registers, Flags flags, | 195 RegList callee_saved_fp_registers, Flags flags, |
198 const char* debug_name = "") | 196 const char* debug_name = "") |
199 : kind_(kind), | 197 : kind_(kind), |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 CallDescriptor* const incoming_; | 427 CallDescriptor* const incoming_; |
430 | 428 |
431 DISALLOW_COPY_AND_ASSIGN(Linkage); | 429 DISALLOW_COPY_AND_ASSIGN(Linkage); |
432 }; | 430 }; |
433 | 431 |
434 } // namespace compiler | 432 } // namespace compiler |
435 } // namespace internal | 433 } // namespace internal |
436 } // namespace v8 | 434 } // namespace v8 |
437 | 435 |
438 #endif // V8_COMPILER_LINKAGE_H_ | 436 #endif // V8_COMPILER_LINKAGE_H_ |
OLD | NEW |