| Index: src/compiler/machine-type.h
|
| diff --git a/src/compiler/machine-type.h b/src/compiler/machine-type.h
|
| index ca37527cb941a6bb9d44b5395b866d3ce25b37a8..6e749abb1596a5d067690ed0819292e96dc991e2 100644
|
| --- a/src/compiler/machine-type.h
|
| +++ b/src/compiler/machine-type.h
|
| @@ -108,6 +108,32 @@ inline int ElementSizeOf(MachineType machine_type) {
|
| }
|
| }
|
|
|
| +// Describes the inputs and outputs of a function or call in terms of machine
|
| +// types.
|
| +class MachineSignature {
|
| + public:
|
| + MachineSignature(uint8_t return_count, uint16_t param_count,
|
| + MachineType* reps)
|
| + : return_count_(return_count), param_count_(param_count), reps_(reps) {}
|
| +
|
| + int GetReturnCount() const { return return_count_; }
|
| + int GetParamCount() const { return param_count_; }
|
| +
|
| + MachineType GetParameterType(int index) const {
|
| + DCHECK(index >= 0 && index < param_count_);
|
| + return reps_[return_count_ + index];
|
| + }
|
| +
|
| + MachineType GetReturnType(int index = 0) const {
|
| + DCHECK(index >= 0 && index < return_count_);
|
| + return reps_[index];
|
| + }
|
| +
|
| + protected:
|
| + uint8_t return_count_;
|
| + uint16_t param_count_;
|
| + MachineType* reps_;
|
| +};
|
| } // namespace compiler
|
| } // namespace internal
|
| } // namespace v8
|
|
|