PageRenderTime 15ms CodeModel.GetById 10ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

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

http://github.com/zpao/v8monkey
JavaScript | 18 lines | 14 code | 4 blank | 0 comment | 1 complexity | 01efe7158cfff03c3ffc7bc632753020 MD5 | raw file
 1expected = 4;
 2
 3var fourth = { nextSibling: null };
 4var third  = { nextSibling: fourth };
 5var second = { nextSibling: third };
 6var first  = { nextSibling: second };
 7
 8function f() {
 9  let loopcount = 0;
10  for (let node = first; node; node = node.nextSibling) {
11    loopcount++;
12  }
13  return loopcount;
14}
15
16actual = f();
17
18assertEq(actual, expected);