Skip to content

Commit 2654fe2

Browse files
committed
look through >>>0 coercions in asm2wasm
1 parent b58eadb commit 2654fe2

File tree

5 files changed

+695
-2383
lines changed

5 files changed

+695
-2383
lines changed

src/asm2wasm.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -864,8 +864,8 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) {
864864
}
865865
abort_on("confusing assign", ast);
866866
} else if (what == BINARY) {
867-
if (ast[1] == OR && ast[3][0] == NUM && ast[3][1]->getNumber() == 0) {
868-
auto ret = process(ast[2]); // just look through the ()|0 coercion
867+
if ((ast[1] == OR || ast[1] == TRSHIFT) && ast[3][0] == NUM && ast[3][1]->getNumber() == 0) {
868+
auto ret = process(ast[2]); // just look through the ()|0 or ()>>>0 coercion
869869
fixCallType(ret, i32);
870870
return ret;
871871
}

0 commit comments

Comments
 (0)