summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2015-12-21 10:50:37 -0800
committerAlon Zakai <alonzakai@gmail.com>2015-12-21 10:50:37 -0800
commit2654fe23914c87afb2dd7340709db2cea5e2b047 (patch)
treea1bba9580db052544aa10ac2ab02db75d876200a /src
parentb58eadbc45b58322c1efa1f94f14bf0f15ae4d23 (diff)
downloadbinaryen-2654fe23914c87afb2dd7340709db2cea5e2b047.tar.gz
binaryen-2654fe23914c87afb2dd7340709db2cea5e2b047.tar.bz2
binaryen-2654fe23914c87afb2dd7340709db2cea5e2b047.zip
look through >>>0 coercions in asm2wasm
Diffstat (limited to 'src')
-rw-r--r--src/asm2wasm.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/asm2wasm.h b/src/asm2wasm.h
index dbf142fd3..ca88fa883 100644
--- a/src/asm2wasm.h
+++ b/src/asm2wasm.h
@@ -864,8 +864,8 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) {
}
abort_on("confusing assign", ast);
} else if (what == BINARY) {
- if (ast[1] == OR && ast[3][0] == NUM && ast[3][1]->getNumber() == 0) {
- auto ret = process(ast[2]); // just look through the ()|0 coercion
+ if ((ast[1] == OR || ast[1] == TRSHIFT) && ast[3][0] == NUM && ast[3][1]->getNumber() == 0) {
+ auto ret = process(ast[2]); // just look through the ()|0 or ()>>>0 coercion
fixCallType(ret, i32);
return ret;
}