diff options
author | Ben Smith <binjimin@gmail.com> | 2017-04-16 16:07:03 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-16 16:07:03 -0700 |
commit | a4751fe78f119305fa8927f1bba10aefecc14f3f (patch) | |
tree | e339741de3c5b1ce7382601952d0f80a685cd701 /src/interpreter.h | |
parent | 15c898a5bd3e257e72e4f5b4fdc831c82bf20e83 (diff) | |
download | wabt-a4751fe78f119305fa8927f1bba10aefecc14f3f.tar.gz wabt-a4751fe78f119305fa8927f1bba10aefecc14f3f.tar.bz2 wabt-a4751fe78f119305fa8927f1bba10aefecc14f3f.zip |
Refactor Stream/Writer; write as C++ (#399)
Diffstat (limited to 'src/interpreter.h')
-rw-r--r-- | src/interpreter.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/interpreter.h b/src/interpreter.h index 28b15b33..8f4143fe 100644 --- a/src/interpreter.h +++ b/src/interpreter.h @@ -28,7 +28,7 @@ namespace wabt { -struct Stream; +class Stream; #define FOREACH_INTERPRETER_RESULT(V) \ V(Ok, "ok") \ @@ -334,7 +334,7 @@ struct InterpreterEnvironment { std::vector<InterpreterMemory> memories; std::vector<InterpreterTable> tables; std::vector<InterpreterGlobal> globals; - OutputBuffer istream; + std::unique_ptr<OutputBuffer> istream; BindingHash module_bindings; BindingHash registered_module_bindings; }; @@ -387,13 +387,13 @@ InterpreterResult call_host(InterpreterThread* thread, InterpreterResult run_interpreter(InterpreterThread* thread, uint32_t num_instructions, uint32_t* call_stack_return_top); -void trace_pc(InterpreterThread* thread, struct Stream* stream); +void trace_pc(InterpreterThread* thread, Stream* stream); void disassemble(InterpreterEnvironment* env, - struct Stream* stream, + Stream* stream, uint32_t from, uint32_t to); void disassemble_module(InterpreterEnvironment* env, - struct Stream* stream, + Stream* stream, InterpreterModule* module); InterpreterExport* get_interpreter_export_by_name(InterpreterModule* module, |