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/wasm-s-parser.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/wasm-s-parser.h')
-rw-r--r-- | src/wasm-s-parser.h | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index 531341b01..792867981 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -9,38 +9,14 @@ #include "wasm.h" #include "mixed_arena.h" +#include "shared-constants.h" namespace wasm { -int debug = 0; // wasm::debug is set in main(), typically from an env var - using namespace cashew; // Globals -IString MODULE("module"), - FUNC("func"), - PARAM("param"), - RESULT("result"), - MEMORY("memory"), - SEGMENT("segment"), - EXPORT("export"), - IMPORT("import"), - TABLE("table"), - LOCAL("local"), - TYPE("type"), - CALL("call"), - CALL_IMPORT("call_import"), - CALL_INDIRECT("call_indirect"), - BR_IF("br_if"), - INFINITY_("infinity"), - NEG_INFINITY("-infinity"), - NAN_("nan"), - NEG_NAN("-nan"), - CASE("case"), - BR("br"), - FAKE_RETURN("fake_return_waka123"); - int unhex(char c) { if (c >= '0' && c <= '9') return c - '0'; if (c >= 'a' && c <= 'f') return c - 'a' + 10; |