summaryrefslogtreecommitdiff
path: root/src/wasm.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-09-14 21:28:43 -0700
committerGitHub <noreply@github.com>2016-09-14 21:28:43 -0700
commite567fa8675831e79f855cea2181fa58beb107e42 (patch)
tree14f1e37d27244b349e8ee34939119002f742748d /src/wasm.h
parent63b499e3ec9bbdf4e79ab6d9dc198299516e8aec (diff)
parentaf3bea2786fe62070522b7fd7add4290a4cb4e6d (diff)
downloadbinaryen-e567fa8675831e79f855cea2181fa58beb107e42.tar.gz
binaryen-e567fa8675831e79f855cea2181fa58beb107e42.tar.bz2
binaryen-e567fa8675831e79f855cea2181fa58beb107e42.zip
Merge pull request #695 from WebAssembly/opts
Get optimizer on par with emscripten asm.js optimizer
Diffstat (limited to 'src/wasm.h')
-rw-r--r--src/wasm.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/wasm.h b/src/wasm.h
index d6bdfe91f..4d5cf4d70 100644
--- a/src/wasm.h
+++ b/src/wasm.h
@@ -981,7 +981,6 @@ public:
Expression *condition, *ifTrue, *ifFalse;
void finalize() {
- assert(ifTrue);
if (ifFalse) {
if (ifTrue->type == ifFalse->type) {
type = ifTrue->type;
@@ -992,6 +991,8 @@ public:
} else {
type = none;
}
+ } else {
+ type = none; // if without else
}
}
};
@@ -1027,6 +1028,8 @@ public:
void finalize() {
if (condition) {
type = none;
+ } else {
+ type = unreachable;
}
}
};