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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 297 LinkageLocation GetParameterLocation(int index) const { | 297 LinkageLocation GetParameterLocation(int index) const { |
| 298 return incoming_->GetInputLocation(index + 1); // + 1 to skip target. | 298 return incoming_->GetInputLocation(index + 1); // + 1 to skip target. |
| 299 } | 299 } |
| 300 | 300 |
| 301 // Get the machine type of an (incoming) parameter to this function. | 301 // Get the machine type of an (incoming) parameter to this function. |
| 302 MachineType GetParameterType(int index) const { | 302 MachineType GetParameterType(int index) const { |
| 303 return incoming_->GetInputType(index + 1); // + 1 to skip target. | 303 return incoming_->GetInputType(index + 1); // + 1 to skip target. |
| 304 } | 304 } |
| 305 | 305 |
| 306 // Get the location where this function should place its return value. | 306 // Get the location where this function should place its return value. |
| 307 LinkageLocation GetReturnLocation() const { | 307 LinkageLocation GetReturnLocation(size_t index = 0) const { |
| 308 return incoming_->GetReturnLocation(0); | 308 return incoming_->GetReturnLocation(index); |
| 309 } | 309 } |
| 310 | 310 |
| 311 // Get the machine type of this function's return value. | 311 // Get the machine type of this function's return value. |
| 312 MachineType GetReturnType() const { return incoming_->GetReturnType(0); } | 312 MachineType GetReturnType() const { return incoming_->GetReturnType(0); } |
|
titzer
2015/10/07 23:57:05
This one too.
bradn
2015/10/08 17:13:37
Done.
| |
| 313 | 313 |
| 314 // Get the frame offset for a given spill slot. The location depends on the | 314 // Get the frame offset for a given spill slot. The location depends on the |
| 315 // calling convention and the specific frame layout, and may thus be | 315 // calling convention and the specific frame layout, and may thus be |
| 316 // architecture-specific. Negative spill slots indicate arguments on the | 316 // architecture-specific. Negative spill slots indicate arguments on the |
| 317 // caller's frame. | 317 // caller's frame. |
| 318 FrameOffset GetFrameOffset(int spill_slot, Frame* frame) const; | 318 FrameOffset GetFrameOffset(int spill_slot, Frame* frame) const; |
| 319 | 319 |
| 320 static int FrameStateInputCount(Runtime::FunctionId function); | 320 static int FrameStateInputCount(Runtime::FunctionId function); |
| 321 | 321 |
| 322 // Get the location where an incoming OSR value is stored. | 322 // Get the location where an incoming OSR value is stored. |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 341 CallDescriptor* const incoming_; | 341 CallDescriptor* const incoming_; |
| 342 | 342 |
| 343 DISALLOW_COPY_AND_ASSIGN(Linkage); | 343 DISALLOW_COPY_AND_ASSIGN(Linkage); |
| 344 }; | 344 }; |
| 345 | 345 |
| 346 } // namespace compiler | 346 } // namespace compiler |
| 347 } // namespace internal | 347 } // namespace internal |
| 348 } // namespace v8 | 348 } // namespace v8 |
| 349 | 349 |
| 350 #endif // V8_COMPILER_LINKAGE_H_ | 350 #endif // V8_COMPILER_LINKAGE_H_ |
| OLD | NEW |