diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-02-03 12:20:59 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-02-03 12:20:59 -0800 |
commit | 0c4e4521b5ede340a7060bf052ccdf84269c3f0a (patch) | |
tree | 3698cca698bbb8dfb044a4c8625a7b5c06f68e48 /src/wasm-binary.h | |
parent | 83b368381eb1e9e499f213129627d0c188d0008f (diff) | |
download | binaryen-0c4e4521b5ede340a7060bf052ccdf84269c3f0a.tar.gz binaryen-0c4e4521b5ede340a7060bf052ccdf84269c3f0a.tar.bz2 binaryen-0c4e4521b5ede340a7060bf052ccdf84269c3f0a.zip |
Break and Return have unreachable type
Diffstat (limited to 'src/wasm-binary.h')
-rw-r--r-- | src/wasm-binary.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h index de4747d84..440689ea0 100644 --- a/src/wasm-binary.h +++ b/src/wasm-binary.h @@ -851,7 +851,7 @@ assert(0); void visitBinary(Binary *curr) { if (debug) std::cerr << "zz node: Binary" << std::endl; #define TYPED_CODE(code) { \ - switch (curr->left->type) { \ + switch (getReachableWasmType(curr->left->type, curr->right->type)) { \ case i32: o << int8_t(BinaryConsts::I32##code); break; \ case i64: o << int8_t(BinaryConsts::I64##code); break; \ case f32: o << int8_t(BinaryConsts::F32##code); break; \ @@ -861,7 +861,7 @@ assert(0); break; \ } #define INT_TYPED_CODE(code) { \ - switch (curr->left->type) { \ + switch (getReachableWasmType(curr->left->type, curr->right->type)) { \ case i32: o << int8_t(BinaryConsts::I32##code); break; \ case i64: o << int8_t(BinaryConsts::I64##code); break; \ default: abort(); \ @@ -869,7 +869,7 @@ assert(0); break; \ } #define FLOAT_TYPED_CODE(code) { \ - switch (curr->left->type) { \ + switch (getReachableWasmType(curr->left->type, curr->right->type)) { \ case f32: o << int8_t(BinaryConsts::F32##code); break; \ case f64: o << int8_t(BinaryConsts::F64##code); break; \ default: abort(); \ |