diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-04-09 18:34:12 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-04-09 18:34:12 -0700 |
commit | 3e00d9a1481c6f61cef163b186c2b13b8160cdad (patch) | |
tree | ab085cebcfeb1e79d0cc6985747e1e38838d4acb /src/wasm.h | |
parent | d30b98d47697daa167333db66ac0fe3d8a693eae (diff) | |
parent | 4c98c3f9c6d0c98fbcbaa44a4fc5eb3b7e21b201 (diff) | |
download | binaryen-3e00d9a1481c6f61cef163b186c2b13b8160cdad.tar.gz binaryen-3e00d9a1481c6f61cef163b186c2b13b8160cdad.tar.bz2 binaryen-3e00d9a1481c6f61cef163b186c2b13b8160cdad.zip |
Merge pull request #329 from WebAssembly/opts
Begin an AST Builder helper class, and more asm2wasm opts
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 { |