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