diff options
Diffstat (limited to 'src')
-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); |