Index: src/interpreter/bytecodes.cc |
diff --git a/src/interpreter/bytecodes.cc b/src/interpreter/bytecodes.cc |
index 7d06f29317218bd8fc4112b37c6026c2f0603737..798004ce794253845a93acd957805b4de4eca48b 100644 |
--- a/src/interpreter/bytecodes.cc |
+++ b/src/interpreter/bytecodes.cc |
@@ -264,17 +264,25 @@ bool Bytecodes::IsJumpOrReturn(Bytecode bytecode) { |
return bytecode == Bytecode::kReturn || IsJump(bytecode); |
} |
-bool Bytecodes::IsMaybeRegisterOperandType(OperandType operand_type) { |
- return (operand_type == OperandType::kMaybeReg8 || |
- operand_type == OperandType::kMaybeReg16); |
+// static |
+bool Bytecodes::IsIndexOperandType(OperandType operand_type) { |
+ return operand_type == OperandType::kIdx8 || |
+ operand_type == OperandType::kIdx16; |
} |
+// static |
bool Bytecodes::IsRegisterCountOperandType(OperandType operand_type) { |
return (operand_type == OperandType::kRegCount8 || |
operand_type == OperandType::kRegCount16); |
} |
// static |
+bool Bytecodes::IsMaybeRegisterOperandType(OperandType operand_type) { |
+ return (operand_type == OperandType::kMaybeReg8 || |
+ operand_type == OperandType::kMaybeReg16); |
+} |
+ |
+// static |
bool Bytecodes::IsRegisterOperandType(OperandType operand_type) { |
switch (operand_type) { |
#define CASE(Name, _) \ |
@@ -327,6 +335,11 @@ bool Bytecodes::IsRegisterOutputOperandType(OperandType operand_type) { |
return false; |
} |
+// static |
+bool Bytecodes::IsImmediateOperandType(OperandType operand_type) { |
rmcilroy
2016/02/10 16:43:14
nit - move above IsRegisterCountOperandType
Stefano Sanfilippo
2016/02/10 16:49:30
Done.
|
+ return operand_type == OperandType::kImm8; |
+} |
+ |
namespace { |
static Register DecodeRegister(const uint8_t* operand_start, |
OperandType operand_type) { |