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

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

Issue 2629823003: [wasm] Implement frame inspection for interpreted frames (Closed)
Patch Set: Rebase after Yangs revert ಠ益ಠ Created 3 years, 11 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/wasm/wasm-debug.cc ('k') | 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 87758bdd24f352c7a7158aa517afa140308b1c40..7162f22b320770350c7fd5216af5bb09537ce054 100644
--- a/src/wasm/wasm-interpreter.h
+++ b/src/wasm/wasm-interpreter.h
@@ -80,20 +80,24 @@ FOREACH_UNION_MEMBER(DECLARE_CAST)
#undef DECLARE_CAST
// Representation of frames within the interpreter.
-class WasmFrame {
+class InterpretedFrame {
public:
const WasmFunction* function() const { return function_; }
- int pc() const {
- // TODO(wasm): Remove USE once we actually use them.
- USE(fp_);
- USE(sp_);
- return pc_;
- }
+ int pc() const { return pc_; }
+
+ //==========================================================================
+ // Stack frame inspection.
+ //==========================================================================
+ int GetParameterCount() const;
+ WasmVal GetLocalVal(int index) const;
+ WasmVal GetExprVal(int pc) const;
+ void SetLocalVal(int index, WasmVal val);
+ void SetExprVal(int pc, WasmVal val);
private:
friend class WasmInterpreter;
- WasmFrame(const WasmFunction* function, int pc, int fp, int sp)
+ InterpretedFrame(const WasmFunction* function, int pc, int fp, int sp)
: function_(function), pc_(pc), fp_(fp), sp_(sp) {}
const WasmFunction* function_;
@@ -134,8 +138,8 @@ class V8_EXPORT_PRIVATE WasmInterpreter {
// Stack inspection and modification.
pc_t GetBreakpointPc();
int GetFrameCount();
- const WasmFrame* GetFrame(int index);
- WasmFrame* GetMutableFrame(int index);
+ const InterpretedFrame GetFrame(int index);
+ InterpretedFrame GetMutableFrame(int index);
WasmVal GetReturnValue(int index = 0);
// Returns true if the thread executed an instruction which may produce
// nondeterministic results, e.g. float div, float sqrt, and float mul,
@@ -174,14 +178,6 @@ class V8_EXPORT_PRIVATE WasmInterpreter {
Thread* GetThread(int id);
//==========================================================================
- // Stack frame inspection.
- //==========================================================================
- WasmVal GetLocalVal(const WasmFrame* frame, int index);
- WasmVal GetExprVal(const WasmFrame* frame, int pc);
- void SetLocalVal(WasmFrame* frame, int index, WasmVal val);
- void SetExprVal(WasmFrame* frame, int pc, WasmVal val);
-
- //==========================================================================
// Memory access.
//==========================================================================
size_t GetMemorySize();
« no previous file with comments | « src/wasm/wasm-debug.cc ('k') | src/wasm/wasm-interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698