summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/bug1318634.js
blob: 58448bb1708570dde494428617ba9b6a78da4ba8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
var o1 = {get x() { return 1; }};
var o2 = {get x() { return 2; }};
var o3 = Object.create(o1);

function f(o) {
    return o.x;
}

var res = 0;
for (var i=0; i<15; i++) {
    res += f(o3);
    res += f(o2);
}

o1.y = 1;

for (var i=0; i<110; i++)
    res += f(o2);

assertEq(res, 265);