michael@0: function testStuff(x, y) { michael@0: for (var i = 0; i < 60; i++) { michael@0: x[y](); michael@0: x[y]; michael@0: } michael@0: } michael@0: testStuff({"elements":function(){}}, "elements"); michael@0: michael@0: var o = { michael@0: res: 0, michael@0: f: function() { this.res += 3; }, michael@0: __noSuchMethod__: function() { this.res += 5; } michael@0: }; michael@0: michael@0: function testNoSuchMethod(x, y) { michael@0: for (var i = 0; i < 60; i++) { michael@0: x[y](); michael@0: } michael@0: } michael@0: michael@0: testNoSuchMethod(o, "f"); michael@0: testNoSuchMethod(o, "g"); michael@0: assertEq(o.res, 480);