diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-03-02 17:36:58 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-03-02 17:36:58 -0800 |
commit | e5f02a129130d873ba3bd855a06ba488512abf65 (patch) | |
tree | 1563c5cdb1cc6c0287f92937959da54259a8479d /src/wasm-interpreter.h | |
parent | e68cf04a0df1dfbfa2d7f5f892669b728c5d8b11 (diff) | |
parent | 7543689ae566f2cde0fc4d2d0898f969d1e96c75 (diff) | |
download | binaryen-e5f02a129130d873ba3bd855a06ba488512abf65.tar.gz binaryen-e5f02a129130d873ba3bd855a06ba488512abf65.tar.bz2 binaryen-e5f02a129130d873ba3bd855a06ba488512abf65.zip |
Merge pull request #217 from WebAssembly/spec-fixes
Fixes for latest spec test updates
Diffstat (limited to 'src/wasm-interpreter.h')
-rw-r--r-- | src/wasm-interpreter.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h index 2a841f6fd..a7405e948 100644 --- a/src/wasm-interpreter.h +++ b/src/wasm-interpreter.h @@ -29,6 +29,10 @@ #include "support/bits.h" #include "wasm.h" +#ifdef WASM_INTERPRETER_DEBUG +#include "wasm-printing.h" +#endif + namespace wasm { using namespace cashew; @@ -166,7 +170,7 @@ private: indent++; #if WASM_INTERPRETER_DEBUG == 2 doIndent(std::cout, indent); - expression->print(std::cout, indent) << '\n'; + std::cout << "\n" << expression << '\n'; indent++; #endif } @@ -445,8 +449,8 @@ private: if (flow.breaking()) return flow; Literal right = flow.value; NOTE_EVAL2(left, right); - assert(left.type == curr->left->type); - assert(right.type == curr->right->type); + assert(isConcreteWasmType(curr->left->type) ? left.type == curr->left->type : true); + assert(isConcreteWasmType(curr->right->type) ? right.type == curr->right->type : true); if (left.type == i32) { switch (curr->op) { case Add: return left.add(right); |