summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/saved-stacks/same-stack.js
blob: b82ba1c04ab93e0d13dc59a6cb936879c9fdada4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// Test that the same saved stack is only ever allocated once.

const stacks = [];

for (let i = 0; i < 10; i++) {
  stacks.push(saveStack());
}

const s = stacks.pop();
for (let stack of stacks) {
  assertEq(s, stack);
}