summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testSlowArrayPop.js
blob: f3602aa091dc49a9f6f1ff519971f0eea0930e0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
function testSlowArrayPop() {
    var a = [];
    for (var i = 0; i < 9; i++)
        a[i] = [0];
    a[8].__defineGetter__("0", function () { return 'xyzzy'; });

    var last;
    for (var i = 0; i < 9; i++)
        last = a[i].pop();  // reenters interpreter in getter
    return last;
}
assertEq(testSlowArrayPop(), 'xyzzy');