js/src/jit-test/tests/jaeger/recompile/nativestack.js

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     2 /* Recompilation that requires patching the same native stub multiple times on one stack. */
     4 var first = 0;
     5 var second = 0;
     7 function eacher(f, vfirst, vsecond) {
     8   var a = [0];
     9   a.forEach(f);
    10   assertEq(first, vfirst);
    11   assertEq(second, vsecond);
    12 }
    14 function one() {
    15   eacher(two, 'one', 'two');
    16 }
    18 function two() {
    19   eval("first = 'one';");
    20   eval("second = 'two';");
    21 }
    23 eacher(function () {}, 0, 0);
    24 eacher(function () {}, 0, 0);
    25 eacher(one, 'one', 'two');

mercurial