michael@0: michael@0: /* Recompilation that requires patching the same native stub multiple times. */ michael@0: michael@0: var first = 0; michael@0: var second = 0; michael@0: michael@0: function foreachweird(a, f, vfirst, vsecond) michael@0: { michael@0: a.forEach(f); michael@0: assertEq(first, vfirst); michael@0: assertEq(second, vsecond); michael@0: } michael@0: michael@0: function weird() { michael@0: eval("first = 'one';"); michael@0: eval("second = 'two';"); michael@0: } michael@0: michael@0: foreachweird([0], function() {}, 0, 0); michael@0: foreachweird([0], function() {}, 0, 0); michael@0: foreachweird([0], weird, 'one', 'two');