diff options
author | Alon Zakai <alonzakai@gmail.com> | 2015-10-31 20:46:12 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2015-10-31 20:46:12 -0700 |
commit | 4d566bd9c9084cb57adc9d206cac612bec02c63c (patch) | |
tree | 705029d7936e80e2e557ea2925191d44ca48cb2a /src | |
parent | cfb0cefcf93417a30c03bca7ff0a6c4d0428b1b5 (diff) | |
download | binaryen-4d566bd9c9084cb57adc9d206cac612bec02c63c.tar.gz binaryen-4d566bd9c9084cb57adc9d206cac612bec02c63c.tar.bz2 binaryen-4d566bd9c9084cb57adc9d206cac612bec02c63c.zip |
fix interpreter bugs in binary and compare; working add test in wasm polyfill
Diffstat (limited to 'src')
-rw-r--r-- | src/wasm-interpreter.h | 4 | ||||
-rw-r--r-- | src/wasm-js.cpp | 4 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h index 2fcda535f..4733f5b90 100644 --- a/src/wasm-interpreter.h +++ b/src/wasm-interpreter.h @@ -226,7 +226,7 @@ public: Flow flow = visit(curr->left); if (flow.breaking()) return flow; Literal left = flow.value; - flow = visit(curr->left); + flow = visit(curr->right); if (flow.breaking()) return flow; Literal right = flow.value; switch (curr->op) { // lmao @@ -255,7 +255,7 @@ public: Flow flow = visit(curr->left); if (flow.breaking()) return flow; Literal left = flow.value; - flow = visit(curr->left); + flow = visit(curr->right); if (flow.breaking()) return flow; Literal right = flow.value; switch (curr->op) { // :) diff --git a/src/wasm-js.cpp b/src/wasm-js.cpp index 813ad87eb..36ce6c4c7 100644 --- a/src/wasm-js.cpp +++ b/src/wasm-js.cpp @@ -58,9 +58,7 @@ extern "C" void EMSCRIPTEN_KEEPALIVE load_asm(char *input) { if (debug) std::cerr << "optimizing...\n"; asm2wasm.optimize(); -#ifdef WASM_INTERPRETER_DEBUG - std::cerr << *wasm << '\n'; -#endif + //std::cerr << *wasm << '\n'; if (debug) std::cerr << "generating exports...\n"; EM_ASM({ |