summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/wasm/regress/reserve-enough.js
blob: 4866772b2113fe751ac7fba9f092099663159fd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
load(libdir + "wasm.js");

// Bug 1281131 - be sure to reserve enough stack space

wasmEvalText(
`(module
  (func $func0
   ${loopy(100)}
   (nop)))`);

function loopy(n) {
    if (n == 0)
	return "(nop)";
    return `(loop $out${n} $in${n} ${loopy(n-1)})`;
}