summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/gc/oomInParseAsmJS.js
blob: b5279a26a6c91dd6f2b5d5ac6fb0009571a8642c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
if (!('oomTest' in this))
    quit();

function parseAsmJS() {
    eval(`function m(stdlib)
          {
            "use asm";
            var abs = stdlib.Math.abs;
            function f(d)
            {
              d = +d;
              return (~~(5.0 - +abs(d)))|0;
            }
            return f;
          }`);
}
oomTest(parseAsmJS);