Index: test/mjsunit/wasm/asm-wasm.js |
diff --git a/test/mjsunit/wasm/asm-wasm.js b/test/mjsunit/wasm/asm-wasm.js |
index 4391e039ebfb977a24f31ef7802a3abb36ed423d..b4a9a81dc8b654552b885ea8cb61d11023d9217d 100644 |
--- a/test/mjsunit/wasm/asm-wasm.js |
+++ b/test/mjsunit/wasm/asm-wasm.js |
@@ -145,7 +145,7 @@ function TestWhileSimple() { |
function caller() { |
var x = 0; |
- while(x < 5) { |
+ while((x|0) < 5) { |
x = (x + 1)|0; |
} |
return x|0; |
@@ -162,7 +162,7 @@ function TestWhileWithoutBraces() { |
function caller() { |
var x = 0; |
- while(x <= 3) |
+ while((x|0) <= 3) |
x = (x + 1)|0; |
return x|0; |
} |
@@ -178,7 +178,7 @@ function TestReturnInWhile() { |
function caller() { |
var x = 0; |
- while(x < 10) { |
+ while((x|0) < 10) { |
x = (x + 6)|0; |
return x|0; |
} |
@@ -196,7 +196,7 @@ function TestReturnInWhileWithoutBraces() { |
function caller() { |
var x = 0; |
- while(x < 5) |
+ while((x|0) < 5) |
return 7; |
return x|0; |
} |
@@ -318,7 +318,7 @@ function TestBreakInBlock() { |
var x = 0; |
abc: { |
x = 10; |
- if (x == 10) { |
+ if ((x|0) == 10) { |
break abc; |
} |
x = 20; |
@@ -339,7 +339,7 @@ function TestBreakInNamedWhile() { |
var x = 0; |
outer: while (1) { |
x = (x + 1)|0; |
- while (x == 11) { |
+ while ((x|0) == 11) { |
break outer; |
} |
} |
@@ -358,9 +358,9 @@ function TestContinue() { |
function caller() { |
var x = 5; |
var ret = 0; |
- while (x >= 0) { |
+ while ((x|0) >= 0) { |
x = (x - 1)|0; |
- if (x == 2) { |
+ if ((x|0) == 2) { |
continue; |
} |
ret = (ret - 1)|0; |
@@ -381,11 +381,11 @@ function TestContinueInNamedWhile() { |
var x = 5; |
var y = 0; |
var ret = 0; |
- outer: while (x > 0) { |
+ outer: while ((x|0) > 0) { |
x = (x - 1)|0; |
y = 0; |
- while (y < 5) { |
- if (x == 3) { |
+ while ((y|0) < 5) { |
+ if ((x|0) == 3) { |
continue outer; |
} |
ret = (ret + 1)|0; |
@@ -420,7 +420,7 @@ function TestNotEquals() { |
function caller() { |
var a = 3; |
- if (a != 2) { |
+ if ((a|0) != 2) { |
return 21; |
} |
return 0; |
@@ -458,7 +458,7 @@ function TestMixedAdd() { |
var c = 0; |
c = ((a>>>0) + b)|0; |
if ((c >>> 0) > (0>>>0)) { |
- if (c < 0) { |
+ if ((c|0) < 0) { |
return 23; |
} |
} |
@@ -733,7 +733,7 @@ function TestForLoop() { |
function caller() { |
var ret = 0; |
var i = 0; |
- for (i = 2; i <= 10; i = (i+1)|0) { |
+ for (i = 2; (i|0) <= 10; i = (i+1)|0) { |
ret = (ret + i) | 0; |
} |
return ret|0; |
@@ -751,7 +751,7 @@ function TestForLoopWithoutInit() { |
function caller() { |
var ret = 0; |
var i = 0; |
- for (; i < 10; i = (i+1)|0) { |
+ for (; (i|0) < 10; i = (i+1)|0) { |
ret = (ret + 10) | 0; |
} |
return ret|0; |
@@ -771,7 +771,7 @@ function TestForLoopWithoutCondition() { |
var i = 0; |
for (i=1;; i = (i+1)|0) { |
ret = (ret + i) | 0; |
- if (i == 11) { |
+ if ((i|0) == 11) { |
break; |
} |
} |
@@ -789,7 +789,7 @@ function TestForLoopWithoutNext() { |
function caller() { |
var i = 0; |
- for (i=1; i < 41;) { |
+ for (i=1; (i|0) < 41;) { |
i = (i + 1) | 0; |
} |
return i|0; |
@@ -806,7 +806,7 @@ function TestForLoopWithoutBody() { |
function caller() { |
var i = 0; |
- for (i=1; i < 45 ; i = (i+1)|0) { |
+ for (i=1; (i|0) < 45 ; i = (i+1)|0) { |
} |
return i|0; |
} |
@@ -826,7 +826,7 @@ function TestDoWhile() { |
do { |
ret = (ret + ret)|0; |
i = (i + 1)|0; |
- } while (i < 2); |
+ } while ((i|0) < 2); |
return ret|0; |
} |
@@ -841,7 +841,7 @@ function TestConditional() { |
function caller() { |
var x = 1; |
- return ((x > 0) ? 41 : 71)|0; |
+ return (((x|0) > 0) ? 41 : 71)|0; |
} |
return {caller:caller}; |
@@ -911,8 +911,8 @@ function TestFunctionTableMultipleFunctions() { |
} |
function caller() { |
- if (function_table[0&1](50) == 51) { |
- if (function_table[1&1](60) == 62) { |
+ if ((function_table[0&1](50)|0) == 51) { |
+ if ((function_table[1&1](60)|0) == 62) { |
return 73; |
} |
} |
@@ -953,9 +953,9 @@ function TestFunctionTable() { |
fun_id = fun_id|0; |
arg1 = arg1|0; |
arg2 = arg2|0; |
- if (table_id == 0) { |
+ if ((table_id|0) == 0) { |
return funBin[fun_id&3](arg1, arg2)|0; |
- } else if (table_id == 1) { |
+ } else if ((table_id|0) == 1) { |
return fun[fun_id&0](arg1)|0; |
} |
return 0; |