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

Unified Diff: src/wasm/wasm-interpreter.h

Issue 2014373003: [wasm] Add more tests for interpreter breakpoints. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove redundant local Created 4 years, 7 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 | « no previous file | src/wasm/wasm-interpreter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-interpreter.h
diff --git a/src/wasm/wasm-interpreter.h b/src/wasm/wasm-interpreter.h
index a3bb318c8f0059a93c58e104acaf4d73396d6b09..c5efd4426b14a450c272107133c572bb3cb45092 100644
--- a/src/wasm/wasm-interpreter.h
+++ b/src/wasm/wasm-interpreter.h
@@ -26,6 +26,8 @@ typedef size_t sp_t;
typedef int32_t pcdiff_t;
typedef uint32_t spdiff_t;
+const pc_t kInvalidPc = 0x80000000;
+
// Visible for testing. A {ControlTransfer} helps the interpreter figure out
// the target program counter and stack manipulations for a branch.
struct ControlTransfer {
@@ -126,6 +128,7 @@ class WasmInterpreter {
virtual ~Thread() {}
// Stack inspection and modification.
+ virtual pc_t GetBreakpointPc() = 0;
virtual int GetFrameCount() = 0;
virtual const WasmFrame* GetFrame(int index) = 0;
virtual WasmFrame* GetMutableFrame(int index) = 0;
@@ -148,10 +151,10 @@ class WasmInterpreter {
// Set a breakpoint at {pc} in {function} to be {enabled}. Returns the
// previous state of the breakpoint at {pc}.
- bool SetBreakpoint(const WasmFunction* function, int pc, bool enabled);
+ bool SetBreakpoint(const WasmFunction* function, pc_t pc, bool enabled);
// Gets the current state of the breakpoint at {function}.
- bool GetBreakpoint(const WasmFunction* function, int pc);
+ bool GetBreakpoint(const WasmFunction* function, pc_t pc);
// Enable or disable tracing for {function}. Return the previous state.
bool SetTracing(const WasmFunction* function, bool enabled);
« no previous file with comments | « no previous file | src/wasm/wasm-interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698