js/src/jit-test/tests/basic/testRebranding.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/testRebranding.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,10 @@
     1.4 +q = "";
     1.5 +function g() { q += "g"; }
     1.6 +function h() { q += "h"; }
     1.7 +a = [g, g, g, g, h];
     1.8 +for (i=0; i<5; i++) { f = a[i];  f(); }
     1.9 +
    1.10 +function testRebranding() {
    1.11 +    return q;
    1.12 +}
    1.13 +assertEq(testRebranding(), "ggggh");

mercurial