summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testBug552248.js
blob: ec310d158bbef8a25082572a4edd046fb62f8e4e (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
30
31
32
33
34
35
36
37
load(libdir + "evalInFrame.js");

var a = new Array();

function i(save) {
    var x = 9;
    evalInFrame(0, "a.push(x)", save);
    evalInFrame(1, "a.push(z)", save);
    evalInFrame(2, "a.push(z)", save);
    evalInFrame(3, "a.push(y)", save);
    evalInFrame(4, "a.push(x)", save);
}

function h() {
    var z = 5;
    evalInFrame(0, "a.push(z)");
    evalInFrame(1, "a.push(y)");
    evalInFrame(2, "a.push(x)");
    evalInFrame(0, "i(false)");
    evalInFrame(0, "a.push(z)", true);
    evalInFrame(1, "a.push(y)", true);
    evalInFrame(2, "a.push(x)", true);
    evalInFrame(0, "i(true)", true);
}

function g() {
    var y = 4;
    h();
}

function f() {
    var x = 3;
    g();
}

f();
assertEq(a+'', [5, 4, 3, 9, 5, 5, 4, 3, 5, 4, 3, 9, 5, 5, 4, 3]+'');