PageRenderTime 9ms CodeModel.GetById 2ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/js/src/jit-test/tests/basic/bug541191-5.js

http://github.com/zpao/v8monkey
JavaScript | 24 lines | 18 code | 5 blank | 1 comment | 2 complexity | 0517c533b7175b0fa7f8c66a1b5b7a2b MD5 | raw file
 1/* vim: set ts=4 sw=4 tw=99 et: */
 2
 3function g(a, b, c, d) {
 4    return "" + a + b + c + d;
 5}
 6
 7var x = 1;
 8function f(a, b, c) {
 9    arguments[1] = 2;
10    arguments[2] = 3;
11    arguments[3] = 4;
12    if (x)
13        arguments.length = 1;
14    var k;
15    for (var i = 0; i < 10; i++)
16        k = g.apply(this, arguments);
17    return k;
18}
19
20assertEq(f(1), "1undefinedundefinedundefined");
21x = 0;
22assertEq(f(1), "1undefinedundefinedundefined");
23
24