diff options
author | Alon Zakai <alonzakai@gmail.com> | 2015-11-01 11:17:32 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2015-11-01 11:17:32 -0800 |
commit | 34203ee327de86071c4f35f2a237f3ea671e312c (patch) | |
tree | 7f60712744a3afdf38e8317f9d3e72d84be93076 | |
parent | fb4151c56a72134f04152bed78f8fa73beb70f35 (diff) | |
download | binaryen-34203ee327de86071c4f35f2a237f3ea671e312c.tar.gz binaryen-34203ee327de86071c4f35f2a237f3ea671e312c.tar.bz2 binaryen-34203ee327de86071c4f35f2a237f3ea671e312c.zip |
not not free builder - we stil need its allocator
-rw-r--r-- | src/wasm-js.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wasm-js.cpp b/src/wasm-js.cpp index 2ee6e9683..d71c59125 100644 --- a/src/wasm-js.cpp +++ b/src/wasm-js.cpp @@ -18,7 +18,7 @@ using namespace wasm; ModuleInstance* instance = nullptr; // receives asm.js code, parses into wasm and returns an instance handle. -// this creates a module, an external interface, and a module instance, +// this creates a module, an external interface, a builder, and a module instance, // all of which are then the responsibility of the caller to free. // note: this modifies the input. extern "C" void EMSCRIPTEN_KEEPALIVE load_asm(char *input) { @@ -52,11 +52,11 @@ extern "C" void EMSCRIPTEN_KEEPALIVE load_asm(char *input) { Module* wasm = new Module(); if (debug) std::cerr << "wasming...\n"; - Asm2WasmBuilder asm2wasm(*wasm); - asm2wasm.processAsm(asmjs); + Asm2WasmBuilder* asm2wasm = new Asm2WasmBuilder(*wasm); + asm2wasm->processAsm(asmjs); if (debug) std::cerr << "optimizing...\n"; - asm2wasm.optimize(); + asm2wasm->optimize(); //std::cerr << *wasm << '\n'; |