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); |