Index: src/interpreter/bytecodes.cc |
diff --git a/src/interpreter/bytecodes.cc b/src/interpreter/bytecodes.cc |
index e5b9ab73a9c3d7bcb0df30a558e9f9e9c7c69099..281a883e847b7d928b334ac4c432bc5f8c834dd7 100644 |
--- a/src/interpreter/bytecodes.cc |
+++ b/src/interpreter/bytecodes.cc |
@@ -103,6 +103,21 @@ int Bytecodes::MaximumSize() { return 1 + kMaxOperands; } |
// static |
+bool Bytecodes::IsJump(Bytecode bytecode) { |
+ return bytecode == Bytecode::kJump || bytecode == Bytecode::kJumpIfTrue || |
+ bytecode == Bytecode::kJumpIfFalse; |
+} |
+ |
+ |
+// static |
+bool Bytecodes::IsJumpConstant(Bytecode bytecode) { |
+ return bytecode == Bytecode::kJumpConstant || |
+ bytecode == Bytecode::kJumpIfTrueConstant || |
+ bytecode == Bytecode::kJumpIfFalseConstant; |
+} |
+ |
+ |
+// static |
std::ostream& Bytecodes::Decode(std::ostream& os, const uint8_t* bytecode_start, |
int parameter_count) { |
Vector<char> buf = Vector<char>::New(50); |