PageRenderTime 25ms CodeModel.GetById 18ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

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

http://github.com/zpao/v8monkey
JavaScript | 12 lines | 9 code | 3 blank | 0 comment | 1 complexity | 941c1dc873f3e52304905ae4c0753e1f MD5 | raw file
 1var isTrue = true;
 2
 3function g(x) {
 4    return x;
 5}
 6
 7function f() {
 8    return g.apply(null, isTrue ? ["happy"] : arguments);
 9}
10
11for (var i = 0; i < 18; ++i)
12    assertEq(f("sad"), "happy");