/js/src/jit-test/tests/basic/testDeepPropertyShadowing.js
http://github.com/zpao/v8monkey · JavaScript · 17 lines · 17 code · 0 blank · 0 comment · 1 complexity · 658bf0a7ae61f3d0717cd1bc5237bf1b MD5 · raw file
- function testDeepPropertyShadowing()
- {
- function h(node) {
- var x = 0;
- while (node) {
- x++;
- node = node.parent;
- }
- return x;
- }
- var tree = {__proto__: {__proto__: {parent: null}}};
- h(tree);
- h(tree);
- tree.parent = {};
- assertEq(h(tree), 2);
- }
- testDeepPropertyShadowing();