From 34203ee327de86071c4f35f2a237f3ea671e312c Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Sun, 1 Nov 2015 11:17:32 -0800 Subject: not not free builder - we stil need its allocator --- src/wasm-js.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/wasm-js.cpp') 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'; -- cgit v1.2.3