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

Unified Diff: src/interpreter/bytecodes.h

Issue 1703453002: [interpreter, debugger] support debug breaks via bytecode array copy (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 4 years, 10 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
« no previous file with comments | « src/interpreter/bytecode-generator.cc ('k') | src/interpreter/bytecodes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecodes.h
diff --git a/src/interpreter/bytecodes.h b/src/interpreter/bytecodes.h
index 5e75e1a055b45c8b06e27942b22fe10ee1fb7e38..d4863b1662124f18ebe2676edc004300d24ada24 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 operands size.
+#define DEBUG_BREAK_BYTECODE_LIST(V) \
+ V(DebugBreak0, OperandType::kNone) \
+ V(DebugBreak1, OperandType::kReg8) \
+ V(DebugBreak2, OperandType::kReg16) \
+ V(DebugBreak3, OperandType::kReg16, OperandType::kReg8) \
+ V(DebugBreak4, OperandType::kReg16, OperandType::kReg16) \
+ V(DebugBreak5, OperandType::kReg16, OperandType::kReg16, OperandType::kReg8) \
+ V(DebugBreak6, OperandType::kReg16, OperandType::kReg16, \
+ OperandType::kReg16) \
+ V(DebugBreak7, OperandType::kReg16, OperandType::kReg16, \
+ OperandType::kReg16, OperandType::kReg8) \
+ V(DebugBreak8, OperandType::kReg16, OperandType::kReg16, \
+ OperandType::kReg16, OperandType::kReg16)
+
// The list of bytecodes which are interpreted by the interpreter.
#define BYTECODE_LIST(V) \
\
@@ -264,7 +279,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 {
@@ -415,6 +431,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);
@@ -459,6 +478,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);
« no previous file with comments | « src/interpreter/bytecode-generator.cc ('k') | src/interpreter/bytecodes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698