Index: src/wasm/wasm-interpreter.h |
diff --git a/src/wasm/wasm-interpreter.h b/src/wasm/wasm-interpreter.h |
index b106a202d218fb153dea168b1ef8f91bb748da19..ff1ce2422b3b4fdac568a55175dd2f8321262fb3 100644 |
--- a/src/wasm/wasm-interpreter.h |
+++ b/src/wasm/wasm-interpreter.h |
@@ -84,15 +84,16 @@ inline void WasmVal::to() { |
} |
// Representation of frames within the interpreter. |
-class WasmFrame { |
+class WasmInterpreterFrame { |
public: |
const WasmFunction* function() const { return function_; } |
int pc() const { return pc_; } |
private: |
friend class WasmInterpreter; |
+ friend class ThreadImpl; |
- WasmFrame(const WasmFunction* function, int pc, int fp, int sp) |
+ WasmInterpreterFrame(const WasmFunction* function, int pc, int fp, int sp) |
: function_(function), pc_(pc), fp_(fp), sp_(sp) {} |
const WasmFunction* function_; |
@@ -130,17 +131,16 @@ class WasmInterpreter { |
// 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; |
+ virtual const WasmInterpreterFrame* GetFrame(int index) = 0; |
+ virtual WasmInterpreterFrame* GetMutableFrame(int index) = 0; |
virtual WasmVal GetReturnValue() = 0; |
// Thread-specific breakpoints. |
- bool SetBreakpoint(const WasmFunction* function, int pc, bool enabled); |
- bool GetBreakpoint(const WasmFunction* function, int pc); |
+ bool SetBreakpoint(uint32_t function_index, int pc, bool enabled); |
+ bool GetBreakpoint(uint32_t function_index, int pc); |
}; |
- WasmInterpreter(WasmModuleInstance* instance, |
- base::AccountingAllocator* allocator); |
+ WasmInterpreter(WasmModuleInstance* instance, Zone* zone); |
~WasmInterpreter(); |
//========================================================================== |
@@ -149,12 +149,12 @@ class WasmInterpreter { |
void Run(); |
void Pause(); |
- // Set a breakpoint at {pc} in {function} to be {enabled}. Returns the |
+ // Set a breakpoint at {pc} in {function_index} to be {enabled}. Returns the |
// previous state of the breakpoint at {pc}. |
- bool SetBreakpoint(const WasmFunction* function, pc_t pc, bool enabled); |
+ bool SetBreakpoint(uint32_t function_index, pc_t pc, bool enabled); |
- // Gets the current state of the breakpoint at {function}. |
- bool GetBreakpoint(const WasmFunction* function, pc_t pc); |
+ // Gets the current state of the breakpoint at {function_index}. |
+ bool GetBreakpoint(uint32_t function_index, pc_t pc); |
// Enable or disable tracing for {function}. Return the previous state. |
bool SetTracing(const WasmFunction* function, bool enabled); |
@@ -168,10 +168,10 @@ class WasmInterpreter { |
//========================================================================== |
// 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); |
+ WasmVal GetLocalVal(const WasmInterpreterFrame* frame, int index); |
+ WasmVal GetExprVal(const WasmInterpreterFrame* frame, int pc); |
+ void SetLocalVal(WasmInterpreterFrame* frame, int index, WasmVal val); |
+ void SetExprVal(WasmInterpreterFrame* frame, int pc, WasmVal val); |
//========================================================================== |
// Memory access. |
@@ -198,7 +198,7 @@ class WasmInterpreter { |
const byte* end); |
private: |
- Zone zone_; |
+ Zone* zone_; |
WasmInterpreterInternals* internals_; |
}; |