michael@0: // Test that the tracer is not confused by a.m() when a is the same shape each michael@0: // time through the loop but a.m is a scripted getter that returns different michael@0: // functions. michael@0: michael@0: function f() { return 'f'; } michael@0: function g() { return 'g'; } michael@0: var arr = [f, f, f, f, f, f, f, f, g]; michael@0: var a = {get m() { return arr[i]; }}; michael@0: michael@0: var s = ''; michael@0: for (var i = 0; i < 9; i++) michael@0: s += a.m(); michael@0: assertEq(s, 'ffffffffg');