Index: src/interpreter/bytecodes.h |
diff --git a/src/interpreter/bytecodes.h b/src/interpreter/bytecodes.h |
index 3ad737fbc92d5e92bb4855ac4b54ebf81195e8a7..49a31e0de5613ec5fcca6c9f75652cbff180ada6 100644 |
--- a/src/interpreter/bytecodes.h |
+++ b/src/interpreter/bytecodes.h |
@@ -530,6 +530,29 @@ std::ostream& operator<<(std::ostream& os, const OperandScale& operand_scale); |
std::ostream& operator<<(std::ostream& os, const OperandSize& operand_size); |
std::ostream& operator<<(std::ostream& os, const OperandType& operand_type); |
+class ValidBytecodeOperandSizeCombinationsIterator final { |
+ public: |
+ ValidBytecodeOperandSizeCombinationsIterator(); |
+ |
+ void Advance(); |
+ bool done() { return reached_end_; } |
+ |
+ OperandScale operand_scale() const { return operand_scale_; } |
+ Bytecode bytecode() const { return bytecode_; } |
+ |
+ private: |
+ void IncrementPosition(); |
+ bool CurrentCombinationIsValid(); |
+ |
+ bool reached_end_; |
+ OperandScale operand_scale_; |
+ Bytecode bytecode_; |
+ |
+ static const Bytecode kFirstBytecode = static_cast<Bytecode>(0); |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ValidBytecodeOperandSizeCombinationsIterator); |
+}; |
+ |
} // namespace interpreter |
} // namespace internal |
} // namespace v8 |