Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(660)

Unified Diff: src/interpreter/bytecodes.h

Issue 1822043005: [Interpreter] Add ValidBytecodeOperandSizeCombinationsIterator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@move-hasbch-to-bytecodes
Patch Set: Rename class. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/interpreter/bytecodes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | src/interpreter/bytecodes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698