Chromium Code Reviews| 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" |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 234 // Creates a call descriptor for simplified C calls that is appropriate | 234 // Creates a call descriptor for simplified C calls that is appropriate |
| 235 // for the host platform. This simplified calling convention only supports | 235 // for the host platform. This simplified calling convention only supports |
| 236 // integers and pointers of one word size each, i.e. no floating point, | 236 // integers and pointers of one word size each, i.e. no floating point, |
| 237 // structs, pointers to members, etc. | 237 // structs, pointers to members, etc. |
| 238 static CallDescriptor* GetSimplifiedCDescriptor(Zone* zone, | 238 static CallDescriptor* GetSimplifiedCDescriptor(Zone* zone, |
| 239 const MachineSignature* sig); | 239 const MachineSignature* sig); |
| 240 | 240 |
| 241 // Creates a call descriptor for interpreter handler code stubs. These are not | 241 // Creates a call descriptor for interpreter handler code stubs. These are not |
| 242 // intended to be called directly but are instead dispatched to by the | 242 // intended to be called directly but are instead dispatched to by the |
| 243 // interpreter. | 243 // interpreter. |
| 244 static CallDescriptor* GetInterpreterDispatchDescriptor( | 244 static CallDescriptor* GetInterpreterDispatchDescriptor(Zone* zone); |
| 245 Zone* zone, const MachineSignature* sig); | |
| 246 | 245 |
| 247 // Get the location of an (incoming) parameter to this function. | 246 // Get the location of an (incoming) parameter to this function. |
| 248 LinkageLocation GetParameterLocation(int index) const { | 247 LinkageLocation GetParameterLocation(int index) const { |
| 249 return incoming_->GetInputLocation(index + 1); // + 1 to skip target. | 248 return incoming_->GetInputLocation(index + 1); // + 1 to skip target. |
| 250 } | 249 } |
| 251 | 250 |
| 252 // Get the machine type of an (incoming) parameter to this function. | 251 // Get the machine type of an (incoming) parameter to this function. |
| 253 MachineType GetParameterType(int index) const { | 252 MachineType GetParameterType(int index) const { |
| 254 return incoming_->GetInputType(index + 1); // + 1 to skip target. | 253 return incoming_->GetInputType(index + 1); // + 1 to skip target. |
| 255 } | 254 } |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 273 | 272 |
| 274 // Get the location where an incoming OSR value is stored. | 273 // Get the location where an incoming OSR value is stored. |
| 275 LinkageLocation GetOsrValueLocation(int index) const; | 274 LinkageLocation GetOsrValueLocation(int index) const; |
| 276 | 275 |
| 277 // A special parameter index for JSCalls that represents the closure. | 276 // A special parameter index for JSCalls that represents the closure. |
| 278 static const int kJSFunctionCallClosureParamIndex = -1; | 277 static const int kJSFunctionCallClosureParamIndex = -1; |
| 279 | 278 |
| 280 // A special {OsrValue} index to indicate the context spill slot. | 279 // A special {OsrValue} index to indicate the context spill slot. |
| 281 static const int kOsrContextSpillSlotIndex = -1; | 280 static const int kOsrContextSpillSlotIndex = -1; |
| 282 | 281 |
| 282 // Special parameters used to pass fixed register data through interpreter | |
|
Michael Starzinger
2015/07/21 13:51:45
nit: s/parameters/parameter indices/
rmcilroy
2015/07/23 10:43:54
Done.
| |
| 283 // dispatches. | |
| 284 static const int kInterpreterBytecodeParameter = 0; | |
| 285 static const int kInterpreterDispatchTableParameter = 1; | |
| 286 | |
| 283 private: | 287 private: |
| 284 CallDescriptor* const incoming_; | 288 CallDescriptor* const incoming_; |
| 285 | 289 |
| 286 DISALLOW_COPY_AND_ASSIGN(Linkage); | 290 DISALLOW_COPY_AND_ASSIGN(Linkage); |
| 287 }; | 291 }; |
| 288 | 292 |
| 289 } // namespace compiler | 293 } // namespace compiler |
| 290 } // namespace internal | 294 } // namespace internal |
| 291 } // namespace v8 | 295 } // namespace v8 |
| 292 | 296 |
| 293 #endif // V8_COMPILER_LINKAGE_H_ | 297 #endif // V8_COMPILER_LINKAGE_H_ |
| OLD | NEW |