From 1de108fcc050dc3f63a7674f5946e1e005c40d29 Mon Sep 17 00:00:00 2001 From: JF Bastien Date: Wed, 20 Jan 2016 16:45:33 -0800 Subject: wasm2asm: use support/command-line.h --- src/wasm2asm.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/wasm2asm.h') diff --git a/src/wasm2asm.h b/src/wasm2asm.h index ad73159e6..69abf9c3f 100644 --- a/src/wasm2asm.h +++ b/src/wasm2asm.h @@ -32,8 +32,6 @@ namespace wasm { -extern int debug; - using namespace cashew; IString ASM_FUNC("asmFunc"), @@ -106,6 +104,8 @@ void flattenAppend(Ref ast, Ref extra) { class Wasm2AsmBuilder { public: + Wasm2AsmBuilder(bool debug) : debug(debug), tableSize(-1) {} + Ref processWasm(Module* wasm); Ref processFunction(Function* func); @@ -171,6 +171,7 @@ public: } private: + bool debug; // How many temp vars we need std::vector temps; // type => num temps // Which are currently free to use @@ -186,6 +187,10 @@ private: void addImport(Ref ast, Import *import); void addTables(Ref ast, Module *wasm); void addExports(Ref ast, Module *wasm); + + Wasm2AsmBuilder() = delete; + Wasm2AsmBuilder(const Wasm2AsmBuilder &) = delete; + Wasm2AsmBuilder &operator=(const Wasm2AsmBuilder &) = delete; }; Ref Wasm2AsmBuilder::processWasm(Module* wasm) { -- cgit v1.2.3