WASM: fix translation of binary operations

This commit is contained in:
Alexey Andreev 2016-09-30 00:46:45 +03:00
parent cc0c68e809
commit ef9d8a30bc

View File

@ -158,10 +158,10 @@ class WasmGenerationVisitor implements StatementVisitor, ExprVisitor {
generateBinary(WasmIntBinaryOperation.ADD, WasmFloatBinaryOperation.ADD, expr);
break;
case SUBTRACT:
generateBinary(WasmIntBinaryOperation.SUB, WasmFloatBinaryOperation.ADD, expr);
generateBinary(WasmIntBinaryOperation.SUB, WasmFloatBinaryOperation.SUB, expr);
break;
case MULTIPLY:
generateBinary(WasmIntBinaryOperation.MUL, WasmFloatBinaryOperation.ADD, expr);
generateBinary(WasmIntBinaryOperation.MUL, WasmFloatBinaryOperation.MUL, expr);
break;
case DIVIDE:
generateBinary(WasmIntBinaryOperation.DIV_SIGNED, WasmFloatBinaryOperation.DIV, expr);