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(size_t index = 0) const { |
| 313 return incoming_->GetReturnType(index); |
| 314 } |
313 | 315 |
314 // Get the frame offset for a given spill slot. The location depends on the | 316 // 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 | 317 // calling convention and the specific frame layout, and may thus be |
316 // architecture-specific. Negative spill slots indicate arguments on the | 318 // architecture-specific. Negative spill slots indicate arguments on the |
317 // caller's frame. | 319 // caller's frame. |
318 FrameOffset GetFrameOffset(int spill_slot, Frame* frame) const; | 320 FrameOffset GetFrameOffset(int spill_slot, Frame* frame) const; |
319 | 321 |
320 static int FrameStateInputCount(Runtime::FunctionId function); | 322 static int FrameStateInputCount(Runtime::FunctionId function); |
321 | 323 |
322 // Get the location where an incoming OSR value is stored. | 324 // Get the location where an incoming OSR value is stored. |
(...skipping 18 matching lines...) Expand all Loading... |
341 CallDescriptor* const incoming_; | 343 CallDescriptor* const incoming_; |
342 | 344 |
343 DISALLOW_COPY_AND_ASSIGN(Linkage); | 345 DISALLOW_COPY_AND_ASSIGN(Linkage); |
344 }; | 346 }; |
345 | 347 |
346 } // namespace compiler | 348 } // namespace compiler |
347 } // namespace internal | 349 } // namespace internal |
348 } // namespace v8 | 350 } // namespace v8 |
349 | 351 |
350 #endif // V8_COMPILER_LINKAGE_H_ | 352 #endif // V8_COMPILER_LINKAGE_H_ |
OLD | NEW |