testBug1360390.js (280B)
1 load(libdir + "asm.js"); 2 3 var code = ` 4 "use asm"; 5 var ff = foreign.ff; 6 function f(x) { 7 x = +x 8 return ~~x + (ff(3 ^ 9 / 7), 1) & 1; 9 } 10 return f; 11 `; 12 13 assertEq(asmLink(asmCompile("b", "foreign", code), 0, { ff: decodeURIComponent })(Infinity), 1);