js/src/jit-test/tests/basic/testUndefinedPropertyAccess.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/jit-test/tests/basic/testUndefinedPropertyAccess.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,12 @@
     1.4 +function testUndefinedPropertyAccess() {
     1.5 +    var x = [1,2,3];
     1.6 +    var y = {};
     1.7 +    var a = { foo: 1 };
     1.8 +    y.__proto__ = x;
     1.9 +    var z = [x, x, x, y, y, y, y, a, a, a];
    1.10 +    var s = "";
    1.11 +    for (var i = 0; i < z.length; ++i)
    1.12 +        s += z[i].foo;
    1.13 +    return s;
    1.14 +}
    1.15 +assertEq(testUndefinedPropertyAccess(), "undefinedundefinedundefinedundefinedundefinedundefinedundefined111");

mercurial