/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
- expected = 4;
- var fourth = { nextSibling: null };
- var third = { nextSibling: fourth };
- var second = { nextSibling: third };
- var first = { nextSibling: second };
- function f() {
- let loopcount = 0;
- for (let node = first; node; node = node.nextSibling) {
- loopcount++;
- }
- return loopcount;
- }
- actual = f();
- assertEq(actual, expected);