diff options
Diffstat (limited to 'src/wasm.h')
-rw-r--r-- | src/wasm.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/wasm.h b/src/wasm.h index f985e9b59..c9494d4d6 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -742,7 +742,8 @@ public: ReturnId, HostId, NopId, - UnreachableId + UnreachableId, + NumExpressionIds }; Id _id; @@ -827,7 +828,7 @@ public: Expression *condition, *ifTrue, *ifFalse; void finalize() { - if (condition) { + if (ifFalse) { type = getReachableWasmType(ifTrue->type, ifFalse->type); } } @@ -975,10 +976,9 @@ public: UnaryOp op; Expression *value; - // the type is always the type of the operands, - // except for relationals - bool isRelational() { return op == EqZ; } + + // no finalize since some opcodes have more than one type, so user must set it anyhow }; class Binary : public Expression { |