Chromium Code Reviews| Index: src/wasm/wasm-interpreter.h |
| diff --git a/src/wasm/wasm-interpreter.h b/src/wasm/wasm-interpreter.h |
| index f4adf378efc1bf30edbc3c40b03ca827efd59ab9..dcdb5f63eaf3537331fb306a4b828f3720a98213 100644 |
| --- a/src/wasm/wasm-interpreter.h |
| +++ b/src/wasm/wasm-interpreter.h |
| @@ -76,15 +76,24 @@ inline void WasmVal::to() { |
| } |
| // Representation of frames within the interpreter. |
| -class WasmFrame { |
| +class InterpretedFrame { |
| public: |
| const WasmFunction* function() const { return function_; } |
| int pc() const { return pc_; } |
| + //========================================================================== |
|
titzer
2017/01/16 10:18:25
These methods are not going to be possible to impl
Clemens Hammacher
2017/01/16 11:53:26
Yes, I was aware of that. I planned to include a p
|
| + // 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; |
| + friend class ThreadImpl; |
| - 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_; |
| @@ -122,8 +131,8 @@ class V8_EXPORT_PRIVATE 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 InterpretedFrame GetFrame(int index) = 0; |
| + virtual InterpretedFrame GetMutableFrame(int index) = 0; |
| virtual WasmVal GetReturnValue(int index = 0) = 0; |
| // Returns true if the thread executed an instruction which may produce |
| // nondeterministic results, e.g. float div, float sqrt, and float mul, |
| @@ -161,14 +170,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(); |