summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testScriptGetter_JSOP_CALLPROP-2.js
blob: f9899b1926a15183447dcbfc4629abc089438b10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// Test that the tracer is not confused by a.m() when a is the same shape each
// time through the loop but a.m is a scripted getter that returns different
// functions.

function f() { return 'f'; }
function g() { return 'g'; }
var arr = [f, f, f, f, f, f, f, f, g];
var a = {get m() { return arr[i]; }};

var s = '';
for (var i = 0; i < 9; i++)
    s += a.m();
assertEq(s, 'ffffffffg');