js/src/jit-test/tests/basic/bug541191-5.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/bug541191-5.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,24 @@
     1.4 +/* vim: set ts=8 sts=4 et sw=4 tw=99: */
     1.5 +
     1.6 +function g(a, b, c, d) {
     1.7 +    return "" + a + b + c + d;
     1.8 +}
     1.9 +
    1.10 +var x = 1;
    1.11 +function f(a, b, c) {
    1.12 +    arguments[1] = 2;
    1.13 +    arguments[2] = 3;
    1.14 +    arguments[3] = 4;
    1.15 +    if (x)
    1.16 +        arguments.length = 1;
    1.17 +    var k;
    1.18 +    for (var i = 0; i < 10; i++)
    1.19 +        k = g.apply(this, arguments);
    1.20 +    return k;
    1.21 +}
    1.22 +
    1.23 +assertEq(f(1), "1undefinedundefinedundefined");
    1.24 +x = 0;
    1.25 +assertEq(f(1), "1undefinedundefinedundefined");
    1.26 +
    1.27 +

mercurial