summaryrefslogtreecommitdiff
path: root/src/asm2wasm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/asm2wasm.h')
-rw-r--r--src/asm2wasm.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/asm2wasm.h b/src/asm2wasm.h
index 92ef589d2..e44d2b5b1 100644
--- a/src/asm2wasm.h
+++ b/src/asm2wasm.h
@@ -251,9 +251,8 @@ private:
return asmToWasmType(detectAsmType(ast, data));
}
- bool isUnsignedCoercion(Ref ast) { // TODO: use detectSign?
- if (ast[0] == BINARY && ast[1] == TRSHIFT) return true;
- return false;
+ bool isUnsignedCoercion(Ref ast) {
+ return detectSign(ast) == ASM_UNSIGNED;
}
// an asm.js binary op can either be a binary or a relational in wasm