Chromium Code Reviews| Index: src/interpreter/bytecodes.h |
| diff --git a/src/interpreter/bytecodes.h b/src/interpreter/bytecodes.h |
| index ba19fd7f168b1fe2f9dac1f304198b1ffdfb718f..30f8be2251720fe72c23dbd1fc0da33247dfb41a 100644 |
| --- a/src/interpreter/bytecodes.h |
| +++ b/src/interpreter/bytecodes.h |
| @@ -60,6 +60,21 @@ namespace interpreter { |
| NON_REGISTER_OPERAND_TYPE_LIST(V) \ |
| REGISTER_OPERAND_TYPE_LIST(V) |
| +// Define one debug break bytecode for each size. |
| +#define DEBUG_BREAK_BYTECODE_LIST(V) \ |
| + V(DebugBreak1, OperandType::kNone) \ |
| + V(DebugBreak2, OperandType::kReg8) \ |
| + V(DebugBreak3, OperandType::kReg16) \ |
| + V(DebugBreak4, OperandType::kReg16, OperandType::kReg8) \ |
| + V(DebugBreak5, OperandType::kReg16, OperandType::kReg16) \ |
| + V(DebugBreak6, OperandType::kReg16, OperandType::kReg16, OperandType::kReg8) \ |
| + V(DebugBreak7, OperandType::kReg16, OperandType::kReg16, \ |
| + OperandType::kReg16) \ |
| + V(DebugBreak8, OperandType::kReg16, OperandType::kReg16, \ |
| + OperandType::kReg16, OperandType::kReg8) \ |
| + V(DebugBreak9, OperandType::kReg16, OperandType::kReg16, \ |
| + OperandType::kReg16, OperandType::kReg16) |
|
Yang
2016/02/16 09:22:20
These are more than I originally thought. But we d
rmcilroy
2016/02/16 10:46:38
Yeah, I realized this yesterday after leaving work
Yang
2016/02/19 13:09:18
Done.
|
| + |
| // The list of bytecodes which are interpreted by the interpreter. |
| #define BYTECODE_LIST(V) \ |
| \ |
| @@ -270,7 +285,8 @@ namespace interpreter { |
| V(Return, OperandType::kNone) \ |
| \ |
| /* Debugger */ \ |
| - V(Debugger, OperandType::kNone) |
| + V(Debugger, OperandType::kNone) \ |
| + DEBUG_BREAK_BYTECODE_LIST(V) |
| // Enumeration of the size classes of operand types used by bytecodes. |
| enum class OperandSize : uint8_t { |
| @@ -421,6 +437,9 @@ class Bytecodes { |
| // |bytecode|. |
| static int GetRegisterOperandBitmap(Bytecode bytecode); |
| + // Returns a debug break bytecode with a matching operand size. |
| + static Bytecode GetDebugBreak(Bytecode bytecode); |
| + |
| // Returns the size of the bytecode including its operands. |
| static int Size(Bytecode bytecode); |
| @@ -465,6 +484,9 @@ class Bytecodes { |
| // Returns true if the bytecode is a call or a constructor call. |
| static bool IsCallOrNew(Bytecode bytecode); |
| + // Returns true if the bytecode is a debug break. |
| + static bool IsDebugBreak(Bytecode bytecode); |
| + |
| // Returns true if |operand_type| is a register index operand (kIdx8/kIdx16). |
| static bool IsIndexOperandType(OperandType operand_type); |