diff options
author | Alon Zakai <alonzakai@gmail.com> | 2015-11-28 12:17:52 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2015-11-28 12:59:22 -0800 |
commit | 6d36e9640efa7bbefc05e4db0fc6c97d79053c9b (patch) | |
tree | 7bab27202fda1d6b67888d607ad43d697a0b6d21 /src/asm2wasm.h | |
parent | 86491ff1fb2a7bebc357b28db74385785c0644ef (diff) | |
download | binaryen-6d36e9640efa7bbefc05e4db0fc6c97d79053c9b.tar.gz binaryen-6d36e9640efa7bbefc05e4db0fc6c97d79053c9b.tar.bz2 binaryen-6d36e9640efa7bbefc05e4db0fc6c97d79053c9b.zip |
refactor wasm.js so that it will be able to support multiple wasm loading methods
Diffstat (limited to 'src/asm2wasm.h')
-rw-r--r-- | src/asm2wasm.h | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/src/asm2wasm.h b/src/asm2wasm.h index 7f7be358b..ed376f576 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -7,42 +7,16 @@ #include "wasm.h" #include "emscripten-optimizer/optimizer.h" #include "mixed_arena.h" +#include "shared-constants.h" namespace wasm { using namespace cashew; -int debug = 0; // wasm::debug is set in main(), typically from an env var +extern int debug; // wasm::debug is set in main(), typically from an env var // Utilities -IString GLOBAL("global"), NAN_("NaN"), INFINITY_("Infinity"), - TOPMOST("topmost"), - INT8ARRAY("Int8Array"), - INT16ARRAY("Int16Array"), - INT32ARRAY("Int32Array"), - UINT8ARRAY("Uint8Array"), - UINT16ARRAY("Uint16Array"), - UINT32ARRAY("Uint32Array"), - FLOAT32ARRAY("Float32Array"), - FLOAT64ARRAY("Float64Array"), - IMPOSSIBLE_CONTINUE("impossible-continue"), - MATH("Math"), - IMUL("imul"), - CLZ32("clz32"), - FROUND("fround"), - ASM2WASM("asm2wasm"), - F64_REM("f64-rem"), - F64_TO_INT("f64-to-int"), - GLOBAL_MATH("global.Math"), - ABS("abs"), - FLOOR("floor"), - SQRT("sqrt"), - I32_TEMP("asm2wasm_i32_temp"), - DEBUGGER("debugger"), - GROW_WASM_MEMORY("__growWasmMemory"), - NEW_SIZE("newSize"); - static void abort_on(std::string why) { std::cerr << why << '\n'; abort(); |