summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/asm.js/testBug1360390.js
blob: eadd57876cf18bcf5b30d2d1c704575b3824b361 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
load(libdir + "asm.js");

var code = `
    "use asm";
    var ff = foreign.ff;
    function f(x) {
        x = +x
        return ~~x + (ff(3 ^ 9 / 7), 1) & 1;
    }
    return f;
`;

assertEq(asmLink(asmCompile("b", "foreign", code), 0, { ff: decodeURIComponent })(Infinity), 1);