| 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/machine-type.h" | 10 #include "src/compiler/machine-type.h" |
| 11 #include "src/compiler/operator.h" | 11 #include "src/compiler/operator.h" |
| 12 #include "src/frames.h" | 12 #include "src/frames.h" |
| 13 #include "src/runtime/runtime.h" | 13 #include "src/runtime/runtime.h" |
| 14 #include "src/zone.h" | 14 #include "src/zone.h" |
| 15 | 15 |
| 16 namespace v8 { | 16 namespace v8 { |
| 17 namespace internal { | 17 namespace internal { |
| 18 | 18 |
| 19 class CallInterfaceDescriptor; | 19 class CallInterfaceDescriptor; |
| 20 | 20 |
| 21 namespace compiler { | 21 namespace compiler { |
| 22 | 22 |
| 23 class Node; |
| 23 class OsrHelper; | 24 class OsrHelper; |
| 24 | 25 |
| 25 // Describes the location for a parameter or a return value to a call. | 26 // Describes the location for a parameter or a return value to a call. |
| 26 class LinkageLocation { | 27 class LinkageLocation { |
| 27 public: | 28 public: |
| 28 explicit LinkageLocation(int location) : location_(location) {} | 29 explicit LinkageLocation(int location) : location_(location) {} |
| 29 | 30 |
| 30 bool is_register() const { | 31 bool is_register() const { |
| 31 return 0 <= location_ && location_ <= ANY_REGISTER; | 32 return 0 <= location_ && location_ <= ANY_REGISTER; |
| 32 } | 33 } |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 | 161 |
| 161 // Get the callee-saved FP registers, if any, across this call. | 162 // Get the callee-saved FP registers, if any, across this call. |
| 162 RegList CalleeSavedFPRegisters() const { return callee_saved_fp_registers_; } | 163 RegList CalleeSavedFPRegisters() const { return callee_saved_fp_registers_; } |
| 163 | 164 |
| 164 const char* debug_name() const { return debug_name_; } | 165 const char* debug_name() const { return debug_name_; } |
| 165 | 166 |
| 166 bool UsesOnlyRegisters() const; | 167 bool UsesOnlyRegisters() const; |
| 167 | 168 |
| 168 bool HasSameReturnLocationsAs(const CallDescriptor* other) const; | 169 bool HasSameReturnLocationsAs(const CallDescriptor* other) const; |
| 169 | 170 |
| 171 bool CanTailCall(const Node* call) const; |
| 172 |
| 170 private: | 173 private: |
| 171 friend class Linkage; | 174 friend class Linkage; |
| 172 | 175 |
| 173 const Kind kind_; | 176 const Kind kind_; |
| 174 const MachineType target_type_; | 177 const MachineType target_type_; |
| 175 const LinkageLocation target_loc_; | 178 const LinkageLocation target_loc_; |
| 176 const MachineSignature* const machine_sig_; | 179 const MachineSignature* const machine_sig_; |
| 177 const LocationSignature* const location_sig_; | 180 const LocationSignature* const location_sig_; |
| 178 const size_t js_param_count_; | 181 const size_t js_param_count_; |
| 179 const Operator::Properties properties_; | 182 const Operator::Properties properties_; |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 CallDescriptor* const incoming_; | 272 CallDescriptor* const incoming_; |
| 270 | 273 |
| 271 DISALLOW_COPY_AND_ASSIGN(Linkage); | 274 DISALLOW_COPY_AND_ASSIGN(Linkage); |
| 272 }; | 275 }; |
| 273 | 276 |
| 274 } // namespace compiler | 277 } // namespace compiler |
| 275 } // namespace internal | 278 } // namespace internal |
| 276 } // namespace v8 | 279 } // namespace v8 |
| 277 | 280 |
| 278 #endif // V8_COMPILER_LINKAGE_H_ | 281 #endif // V8_COMPILER_LINKAGE_H_ |
| OLD | NEW |