summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/asm.js/bug1565301.js
blob: 77feaa1e269263a1209014f141c61512fa94385e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// |jit-test| skip-if: !isAsmJSCompilationAvailable() || helperThreadCount() === 0

const maxSize = Math.pow(2, 29) - 1;

// We just don't want to crash during compilation here.

evaluate(`
  offThreadCompileToStencil("\\
    g = (function(t,foreign){\\
        \\"use asm\\";\\
        var ff = foreign.ff;\\
        function f() {\\
            +ff()\\
        }\\
        return f\\
", { lineNumber: (${maxSize})});
`);

evaluate(`
  offThreadCompileToStencil("\\
    g = (function(t,foreign){\\
        \\"use asm\\";\\
        var ff = foreign.ff;\\
        function f() {\\
            +ff()\\
        }\\
        return f\\
", { lineNumber: (${maxSize + 1})});
`);