| 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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 329       size_t return_count = 1); | 329       size_t return_count = 1); | 
| 330 | 330 | 
| 331   // Creates a call descriptor for simplified C calls that is appropriate | 331   // Creates a call descriptor for simplified C calls that is appropriate | 
| 332   // for the host platform. This simplified calling convention only supports | 332   // for the host platform. This simplified calling convention only supports | 
| 333   // integers and pointers of one word size each, i.e. no floating point, | 333   // integers and pointers of one word size each, i.e. no floating point, | 
| 334   // structs, pointers to members, etc. | 334   // structs, pointers to members, etc. | 
| 335   static CallDescriptor* GetSimplifiedCDescriptor( | 335   static CallDescriptor* GetSimplifiedCDescriptor( | 
| 336       Zone* zone, const MachineSignature* sig, | 336       Zone* zone, const MachineSignature* sig, | 
| 337       bool set_initialize_root_flag = false); | 337       bool set_initialize_root_flag = false); | 
| 338 | 338 | 
| 339   // Creates a call descriptor for interpreter handler code stubs. These are not |  | 
| 340   // intended to be called directly but are instead dispatched to by the |  | 
| 341   // interpreter. |  | 
| 342   static CallDescriptor* GetInterpreterDispatchDescriptor(Zone* zone); |  | 
| 343 |  | 
| 344   // Get the location of an (incoming) parameter to this function. | 339   // Get the location of an (incoming) parameter to this function. | 
| 345   LinkageLocation GetParameterLocation(int index) const { | 340   LinkageLocation GetParameterLocation(int index) const { | 
| 346     return incoming_->GetInputLocation(index + 1);  // + 1 to skip target. | 341     return incoming_->GetInputLocation(index + 1);  // + 1 to skip target. | 
| 347   } | 342   } | 
| 348 | 343 | 
| 349   // Get the machine type of an (incoming) parameter to this function. | 344   // Get the machine type of an (incoming) parameter to this function. | 
| 350   MachineType GetParameterType(int index) const { | 345   MachineType GetParameterType(int index) const { | 
| 351     return incoming_->GetInputType(index + 1);  // + 1 to skip target. | 346     return incoming_->GetInputType(index + 1);  // + 1 to skip target. | 
| 352   } | 347   } | 
| 353 | 348 | 
| (...skipping 29 matching lines...) Expand all  Loading... | 
| 383   static int GetJSCallContextParamIndex(int parameter_count) { | 378   static int GetJSCallContextParamIndex(int parameter_count) { | 
| 384     return parameter_count + 2;  // Parameter (arity + 2) is special. | 379     return parameter_count + 2;  // Parameter (arity + 2) is special. | 
| 385   } | 380   } | 
| 386 | 381 | 
| 387   // A special {Parameter} index for JSCalls that represents the closure. | 382   // A special {Parameter} index for JSCalls that represents the closure. | 
| 388   static const int kJSCallClosureParamIndex = -1; | 383   static const int kJSCallClosureParamIndex = -1; | 
| 389 | 384 | 
| 390   // A special {OsrValue} index to indicate the context spill slot. | 385   // A special {OsrValue} index to indicate the context spill slot. | 
| 391   static const int kOsrContextSpillSlotIndex = -1; | 386   static const int kOsrContextSpillSlotIndex = -1; | 
| 392 | 387 | 
| 393   // Special parameter indices used to pass fixed register data through |  | 
| 394   // interpreter dispatches. |  | 
| 395   static const int kInterpreterAccumulatorParameter = 0; |  | 
| 396   static const int kInterpreterRegisterFileParameter = 1; |  | 
| 397   static const int kInterpreterBytecodeOffsetParameter = 2; |  | 
| 398   static const int kInterpreterBytecodeArrayParameter = 3; |  | 
| 399   static const int kInterpreterDispatchTableParameter = 4; |  | 
| 400   static const int kInterpreterContextParameter = 5; |  | 
| 401 |  | 
| 402  private: | 388  private: | 
| 403   CallDescriptor* const incoming_; | 389   CallDescriptor* const incoming_; | 
| 404 | 390 | 
| 405   DISALLOW_COPY_AND_ASSIGN(Linkage); | 391   DISALLOW_COPY_AND_ASSIGN(Linkage); | 
| 406 }; | 392 }; | 
| 407 | 393 | 
| 408 }  // namespace compiler | 394 }  // namespace compiler | 
| 409 }  // namespace internal | 395 }  // namespace internal | 
| 410 }  // namespace v8 | 396 }  // namespace v8 | 
| 411 | 397 | 
| 412 #endif  // V8_COMPILER_LINKAGE_H_ | 398 #endif  // V8_COMPILER_LINKAGE_H_ | 
| OLD | NEW | 
|---|