summaryrefslogtreecommitdiff
path: root/src/wasm-interpreter.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-03-02 17:36:58 -0800
committerAlon Zakai <alonzakai@gmail.com>2016-03-02 17:36:58 -0800
commite5f02a129130d873ba3bd855a06ba488512abf65 (patch)
tree1563c5cdb1cc6c0287f92937959da54259a8479d /src/wasm-interpreter.h
parente68cf04a0df1dfbfa2d7f5f892669b728c5d8b11 (diff)
parent7543689ae566f2cde0fc4d2d0898f969d1e96c75 (diff)
downloadbinaryen-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.h10
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);