From 6d36e9640efa7bbefc05e4db0fc6c97d79053c9b Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Sat, 28 Nov 2015 12:17:52 -0800 Subject: refactor wasm.js so that it will be able to support multiple wasm loading methods --- src/wasm-s-parser.h | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) (limited to 'src/wasm-s-parser.h') 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; -- cgit v1.2.3