js/src/jit-test/tests/jaeger/recompile/property.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 /* Handle recompilation on undefined properties and array holes. */
     4 var v = {};
     5 if (typeof v == 'string')
     6   v.x = 0;
     7 function prop(v)
     8 {
     9   var z = v.x + 1;
    10   assertEq(z, NaN);
    11 }
    12 prop(v);
    14 v = [];
    15 v[0] = 0;
    16 v[1] = 1;
    17 v[3] = 3;
    18 v[4] = 4;
    19 function elem(x)
    20 {
    21   var x = "";
    22   for (var i = 0; i < 5; i++)
    23     x += v[i];
    24   assertEq(x, "01undefined34");
    25 }
    26 elem(v);

mercurial