js/src/jit-test/tests/pic/grandproto.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/jit-test/tests/pic/grandproto.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,28 @@
     1.4 +function A()
     1.5 +{
     1.6 +    this.a = 77;
     1.7 +    this.b = 88;
     1.8 +}
     1.9 +
    1.10 +function B()
    1.11 +{
    1.12 +}
    1.13 +
    1.14 +B.prototype = new A;
    1.15 +
    1.16 +function C()
    1.17 +{
    1.18 +}
    1.19 +
    1.20 +C.prototype = new B;
    1.21 +
    1.22 +function f() {
    1.23 +    var o = new C;
    1.24 +    var z;
    1.25 +    for (var i = 0; i < 5; ++i) {
    1.26 +	z = o.a;
    1.27 +	assertEq(z, 77);
    1.28 +    }
    1.29 +}
    1.30 +
    1.31 +f();
    1.32 \ No newline at end of file

mercurial