diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/asm2wasm.cpp | 2 | ||||
-rw-r--r-- | src/wasm.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/asm2wasm.cpp b/src/asm2wasm.cpp index b02b4aa52..c594e520d 100644 --- a/src/asm2wasm.cpp +++ b/src/asm2wasm.cpp @@ -780,6 +780,7 @@ Function* Asm2WasmModule::processFunction(Ref ast) { ret->op = relational; ret->left = process(ast[2]); ret->right = process(ast[3]); + assert(ret->left->type == ret->right->type); ret->inputType = ret->left->type; return ret; } @@ -900,6 +901,7 @@ Function* Asm2WasmModule::processFunction(Ref ast) { ret->op = Eq; ret->left = process(ast[2]); ret->right = allocator.alloc<Const>()->set(Literal(0)); + assert(ret->left->type == ret->right->type); ret->inputType = ret->left->type; return ret; } diff --git a/src/wasm.h b/src/wasm.h index 2e383d83b..7acd65ddd 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -540,6 +540,7 @@ public: Const* set(Literal value_) { value = value_; + type = value.type; return this; } |