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

Unified Diff: src/interpreter/bytecodes.h

Issue 1325983002: [Intepreter] Extend and move Register class. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix bug in test. Created 5 years, 3 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
Index: src/interpreter/bytecodes.h
diff --git a/src/interpreter/bytecodes.h b/src/interpreter/bytecodes.h
index a5b34f791afcfa1ca7101a4333e9dcd34a3b8403..9d7137b285392efc9c62a917b676bb6109d5b194 100644
--- a/src/interpreter/bytecodes.h
+++ b/src/interpreter/bytecodes.h
@@ -105,8 +105,25 @@ class Bytecodes {
// Maximum size of a bytecode and its operands.
static int MaximumSize();
+ // Returns the operand value for register with the specified index.
+ static uint8_t RegisterIndexToOperand(int index);
+
+ // Returns the register index for a register operand.
+ static int RegisterIndexFromOperand(uint8_t operand);
+
+ // Returns the operand value for parameter with the specified index.
+ static uint8_t ParameterIndexToOperand(int index, int number_of_parameters);
+
+ // Returns the maximum number of parameters including this.
+ static int MaximumNumberOfParameters();
+
+ // Returns the parameter index for a parameter operand.
+ static int ParameterIndexFromOperand(uint8_t operand,
+ int number_of_parameters);
+
// Decode a single bytecode and operands to |os|.
- static std::ostream& Decode(std::ostream& os, const uint8_t* bytecode_start);
+ static std::ostream& Decode(std::ostream& os, const uint8_t* bytecode_start,
+ int number_of_parameters);
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(Bytecodes);

Powered by Google App Engine
This is Rietveld 408576698