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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 // Describes the kind of this call, which determines the target. | 145 // Describes the kind of this call, which determines the target. |
146 enum Kind { | 146 enum Kind { |
147 kCallCodeObject, // target is a Code object | 147 kCallCodeObject, // target is a Code object |
148 kCallJSFunction, // target is a JSFunction object | 148 kCallJSFunction, // target is a JSFunction object |
149 kCallAddress // target is a machine pointer | 149 kCallAddress // target is a machine pointer |
150 }; | 150 }; |
151 | 151 |
152 enum Flag { | 152 enum Flag { |
153 kNoFlags = 0u, | 153 kNoFlags = 0u, |
154 kNeedsFrameState = 1u << 0, | 154 kNeedsFrameState = 1u << 0, |
155 kPatchableCallSite = 1u << 1, | 155 kHasExceptionHandler = 1u << 1, |
156 kNeedsNopAfterCall = 1u << 2, | 156 kHasLocalCatchHandler = 1u << 2, |
157 kHasExceptionHandler = 1u << 3, | 157 kSupportsTailCalls = 1u << 3, |
158 kHasLocalCatchHandler = 1u << 4, | 158 kCanUseRoots = 1u << 4, |
159 kSupportsTailCalls = 1u << 5, | |
160 kCanUseRoots = 1u << 6, | |
161 // (arm64 only) native stack should be used for arguments. | 159 // (arm64 only) native stack should be used for arguments. |
162 kUseNativeStack = 1u << 7, | 160 kUseNativeStack = 1u << 5, |
163 // (arm64 only) call instruction has to restore JSSP or CSP. | 161 // (arm64 only) call instruction has to restore JSSP or CSP. |
164 kRestoreJSSP = 1u << 8, | 162 kRestoreJSSP = 1u << 6, |
165 kRestoreCSP = 1u << 9, | 163 kRestoreCSP = 1u << 7, |
166 // Causes the code generator to initialize the root register. | 164 // Causes the code generator to initialize the root register. |
167 kInitializeRootRegister = 1u << 10, | 165 kInitializeRootRegister = 1u << 8 |
168 kPatchableCallSiteWithNop = kPatchableCallSite | kNeedsNopAfterCall | |
169 }; | 166 }; |
170 typedef base::Flags<Flag> Flags; | 167 typedef base::Flags<Flag> Flags; |
171 | 168 |
172 CallDescriptor(Kind kind, MachineType target_type, LinkageLocation target_loc, | 169 CallDescriptor(Kind kind, MachineType target_type, LinkageLocation target_loc, |
173 const MachineSignature* machine_sig, | 170 const MachineSignature* machine_sig, |
174 LocationSignature* location_sig, size_t stack_param_count, | 171 LocationSignature* location_sig, size_t stack_param_count, |
175 Operator::Properties properties, | 172 Operator::Properties properties, |
176 RegList callee_saved_registers, | 173 RegList callee_saved_registers, |
177 RegList callee_saved_fp_registers, Flags flags, | 174 RegList callee_saved_fp_registers, Flags flags, |
178 const char* debug_name = "") | 175 const char* debug_name = "") |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 CallDescriptor* const incoming_; | 401 CallDescriptor* const incoming_; |
405 | 402 |
406 DISALLOW_COPY_AND_ASSIGN(Linkage); | 403 DISALLOW_COPY_AND_ASSIGN(Linkage); |
407 }; | 404 }; |
408 | 405 |
409 } // namespace compiler | 406 } // namespace compiler |
410 } // namespace internal | 407 } // namespace internal |
411 } // namespace v8 | 408 } // namespace v8 |
412 | 409 |
413 #endif // V8_COMPILER_LINKAGE_H_ | 410 #endif // V8_COMPILER_LINKAGE_H_ |
OLD | NEW |