Index: src/compiler/common-operator.cc |
diff --git a/src/compiler/common-operator.cc b/src/compiler/common-operator.cc |
index 2d0d8d08e5674f12342270bd219d09b686abafd1..2cd63314cff790a5a68a113a4e44a7e59e63d46f 100644 |
--- a/src/compiler/common-operator.cc |
+++ b/src/compiler/common-operator.cc |
@@ -43,6 +43,13 @@ DeoptimizeReason DeoptimizeReasonOf(Operator const* const op) { |
return OpParameter<DeoptimizeReason>(op); |
} |
+int ValueInputCountOfReturn(Operator const* const op) { |
+ DCHECK(op->opcode() == IrOpcode::kReturn); |
+ // Return nodes have a hidden input at index 0 which we ignore in the value |
+ // input count. |
+ return op->ValueInputCount() - 1; |
+} |
+ |
size_t hash_value(DeoptimizeKind kind) { return static_cast<size_t>(kind); } |
std::ostream& operator<<(std::ostream& os, DeoptimizeKind kind) { |