Skip to content

Commit

Permalink
update wasm.js
Browse files Browse the repository at this point in the history
  • Loading branch information
kripken committed Feb 3, 2017
1 parent 7d800b2 commit 3e75a78
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
21 changes: 11 additions & 10 deletions bin/wasm.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions build-js.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,13 @@ echo "building wasm.js"
"$EMSCRIPTEN/em++" \
$EMCC_ARGS \
src/wasm-js.cpp \
src/ast/ExpressionAnalyzer.cpp \
src/ast/ExpressionManipulator.cpp \
src/passes/pass.cpp \
src/passes/DeadCodeElimination.cpp \
src/passes/Print.cpp \
src/passes/LegalizeJSInterface.cpp \
src/passes/Vacuum.cpp \
src/emscripten-optimizer/parser.cpp \
src/emscripten-optimizer/simple_ast.cpp \
src/emscripten-optimizer/optimizer-shared.cpp \
Expand Down
1 change: 1 addition & 0 deletions src/mixed_arena.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include <atomic>
#include <cassert>
#include <cstdlib>
#include <memory>
#include <mutex>
#include <thread>
Expand Down
3 changes: 2 additions & 1 deletion src/wasm-js.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ extern "C" void EMSCRIPTEN_KEEPALIVE load_asm2wasm(char *input) {
prepare2wasm();

Asm2WasmPreProcessor pre;
pre.debugInfo = true; // FIXME: we must do this, as the input asm.js might have debug info
input = pre.process(input);

// proceed to parse and wasmify
Expand All @@ -79,7 +80,7 @@ extern "C" void EMSCRIPTEN_KEEPALIVE load_asm2wasm(char *input) {
module->memory.max = pre.memoryGrowth ? Address(Memory::kMaxSize) : module->memory.initial;

if (wasmJSDebug) std::cerr << "wasming...\n";
asm2wasm = new Asm2WasmBuilder(*module, pre.memoryGrowth, debug, false /* TODO: support imprecise? */, PassOptions(), false /* TODO: support optimizing? */, false /* TODO: support asm2wasm-i64? */);
asm2wasm = new Asm2WasmBuilder(*module, pre, debug, false /* TODO: support imprecise? */, PassOptions(), false /* TODO: support optimizing? */, false /* TODO: support asm2wasm-i64? */);
asm2wasm->processAsm(asmjs);
}

Expand Down

0 comments on commit 3e75a78

Please sign in to comment.