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

Side by Side Diff: src/wasm/wasm-interpreter.h

Issue 2415533003: [wasm] Rename WasmModuleInstance to WasmInstance. (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/wasm/wasm-interpreter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_WASM_INTERPRETER_H_ 5 #ifndef V8_WASM_INTERPRETER_H_
6 #define V8_WASM_INTERPRETER_H_ 6 #define V8_WASM_INTERPRETER_H_
7 7
8 #include "src/wasm/wasm-opcodes.h" 8 #include "src/wasm/wasm-opcodes.h"
9 #include "src/zone/zone-containers.h" 9 #include "src/zone/zone-containers.h"
10 10
11 namespace v8 { 11 namespace v8 {
12 namespace base { 12 namespace base {
13 class AccountingAllocator; 13 class AccountingAllocator;
14 } 14 }
15 15
16 namespace internal { 16 namespace internal {
17 namespace wasm { 17 namespace wasm {
18 18
19 // forward declarations. 19 // forward declarations.
20 struct WasmFunction; 20 struct WasmFunction;
21 struct WasmModuleInstance; 21 struct WasmInstance;
22 class WasmInterpreterInternals; 22 class WasmInterpreterInternals;
23 23
24 typedef size_t pc_t; 24 typedef size_t pc_t;
25 typedef size_t sp_t; 25 typedef size_t sp_t;
26 typedef int32_t pcdiff_t; 26 typedef int32_t pcdiff_t;
27 typedef uint32_t spdiff_t; 27 typedef uint32_t spdiff_t;
28 28
29 const pc_t kInvalidPc = 0x80000000; 29 const pc_t kInvalidPc = 0x80000000;
30 30
31 typedef ZoneMap<pc_t, pcdiff_t> ControlTransferMap; 31 typedef ZoneMap<pc_t, pcdiff_t> ControlTransferMap;
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 virtual int GetFrameCount() = 0; 124 virtual int GetFrameCount() = 0;
125 virtual const WasmFrame* GetFrame(int index) = 0; 125 virtual const WasmFrame* GetFrame(int index) = 0;
126 virtual WasmFrame* GetMutableFrame(int index) = 0; 126 virtual WasmFrame* GetMutableFrame(int index) = 0;
127 virtual WasmVal GetReturnValue(int index = 0) = 0; 127 virtual WasmVal GetReturnValue(int index = 0) = 0;
128 128
129 // Thread-specific breakpoints. 129 // Thread-specific breakpoints.
130 bool SetBreakpoint(const WasmFunction* function, int pc, bool enabled); 130 bool SetBreakpoint(const WasmFunction* function, int pc, bool enabled);
131 bool GetBreakpoint(const WasmFunction* function, int pc); 131 bool GetBreakpoint(const WasmFunction* function, int pc);
132 }; 132 };
133 133
134 WasmInterpreter(WasmModuleInstance* instance, AccountingAllocator* allocator); 134 WasmInterpreter(WasmInstance* instance, AccountingAllocator* allocator);
135 ~WasmInterpreter(); 135 ~WasmInterpreter();
136 136
137 //========================================================================== 137 //==========================================================================
138 // Execution controls. 138 // Execution controls.
139 //========================================================================== 139 //==========================================================================
140 void Run(); 140 void Run();
141 void Pause(); 141 void Pause();
142 142
143 // Set a breakpoint at {pc} in {function} to be {enabled}. Returns the 143 // Set a breakpoint at {pc} in {function} to be {enabled}. Returns the
144 // previous state of the breakpoint at {pc}. 144 // previous state of the breakpoint at {pc}.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 private: 190 private:
191 Zone zone_; 191 Zone zone_;
192 WasmInterpreterInternals* internals_; 192 WasmInterpreterInternals* internals_;
193 }; 193 };
194 194
195 } // namespace wasm 195 } // namespace wasm
196 } // namespace internal 196 } // namespace internal
197 } // namespace v8 197 } // namespace v8
198 198
199 #endif // V8_WASM_INTERPRETER_H_ 199 #endif // V8_WASM_INTERPRETER_H_
OLDNEW
« 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