| 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/code-stubs.h" | |
| 10 #include "src/compiler/frame.h" | 9 #include "src/compiler/frame.h" |
| 11 #include "src/compiler/machine-type.h" | 10 #include "src/compiler/machine-type.h" |
| 12 #include "src/compiler/node.h" | |
| 13 #include "src/compiler/operator.h" | 11 #include "src/compiler/operator.h" |
| 14 #include "src/zone.h" | 12 #include "src/zone.h" |
| 15 | 13 |
| 16 namespace v8 { | 14 namespace v8 { |
| 17 namespace internal { | 15 namespace internal { |
| 16 |
| 17 class CallInterfaceDescriptor; |
| 18 |
| 18 namespace compiler { | 19 namespace compiler { |
| 19 | 20 |
| 20 // Describes the location for a parameter or a return value to a call. | 21 // Describes the location for a parameter or a return value to a call. |
| 21 class LinkageLocation { | 22 class LinkageLocation { |
| 22 public: | 23 public: |
| 23 explicit LinkageLocation(int location) : location_(location) {} | 24 explicit LinkageLocation(int location) : location_(location) {} |
| 24 | 25 |
| 25 static const int16_t ANY_REGISTER = 32767; | 26 static const int16_t ANY_REGISTER = 32767; |
| 26 | 27 |
| 27 static LinkageLocation AnyRegister() { return LinkageLocation(ANY_REGISTER); } | 28 static LinkageLocation AnyRegister() { return LinkageLocation(ANY_REGISTER); } |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 CallDescriptor* GetJSCallDescriptor(int parameter_count) const; | 177 CallDescriptor* GetJSCallDescriptor(int parameter_count) const; |
| 177 static CallDescriptor* GetJSCallDescriptor(int parameter_count, Zone* zone); | 178 static CallDescriptor* GetJSCallDescriptor(int parameter_count, Zone* zone); |
| 178 CallDescriptor* GetRuntimeCallDescriptor( | 179 CallDescriptor* GetRuntimeCallDescriptor( |
| 179 Runtime::FunctionId function, int parameter_count, | 180 Runtime::FunctionId function, int parameter_count, |
| 180 Operator::Properties properties) const; | 181 Operator::Properties properties) const; |
| 181 static CallDescriptor* GetRuntimeCallDescriptor( | 182 static CallDescriptor* GetRuntimeCallDescriptor( |
| 182 Runtime::FunctionId function, int parameter_count, | 183 Runtime::FunctionId function, int parameter_count, |
| 183 Operator::Properties properties, Zone* zone); | 184 Operator::Properties properties, Zone* zone); |
| 184 | 185 |
| 185 CallDescriptor* GetStubCallDescriptor( | 186 CallDescriptor* GetStubCallDescriptor( |
| 186 CallInterfaceDescriptor descriptor, int stack_parameter_count = 0, | 187 const CallInterfaceDescriptor& descriptor, int stack_parameter_count = 0, |
| 187 CallDescriptor::Flags flags = CallDescriptor::kNoFlags) const; | 188 CallDescriptor::Flags flags = CallDescriptor::kNoFlags) const; |
| 188 static CallDescriptor* GetStubCallDescriptor( | 189 static CallDescriptor* GetStubCallDescriptor( |
| 189 CallInterfaceDescriptor descriptor, int stack_parameter_count, | 190 const CallInterfaceDescriptor& descriptor, int stack_parameter_count, |
| 190 CallDescriptor::Flags flags, Zone* zone); | 191 CallDescriptor::Flags flags, Zone* zone); |
| 191 | 192 |
| 192 // Creates a call descriptor for simplified C calls that is appropriate | 193 // Creates a call descriptor for simplified C calls that is appropriate |
| 193 // for the host platform. This simplified calling convention only supports | 194 // for the host platform. This simplified calling convention only supports |
| 194 // integers and pointers of one word size each, i.e. no floating point, | 195 // integers and pointers of one word size each, i.e. no floating point, |
| 195 // structs, pointers to members, etc. | 196 // structs, pointers to members, etc. |
| 196 static CallDescriptor* GetSimplifiedCDescriptor(Zone* zone, | 197 static CallDescriptor* GetSimplifiedCDescriptor(Zone* zone, |
| 197 MachineSignature* sig); | 198 MachineSignature* sig); |
| 198 | 199 |
| 199 // Get the location of an (incoming) parameter to this function. | 200 // Get the location of an (incoming) parameter to this function. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 228 CallDescriptor* const incoming_; | 229 CallDescriptor* const incoming_; |
| 229 | 230 |
| 230 DISALLOW_COPY_AND_ASSIGN(Linkage); | 231 DISALLOW_COPY_AND_ASSIGN(Linkage); |
| 231 }; | 232 }; |
| 232 | 233 |
| 233 } // namespace compiler | 234 } // namespace compiler |
| 234 } // namespace internal | 235 } // namespace internal |
| 235 } // namespace v8 | 236 } // namespace v8 |
| 236 | 237 |
| 237 #endif // V8_COMPILER_LINKAGE_H_ | 238 #endif // V8_COMPILER_LINKAGE_H_ |
| OLD | NEW |