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

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/jit-test/tests/basic/testDeepPropertyShadowing.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,17 @@
     1.4 +function testDeepPropertyShadowing()
     1.5 +{
     1.6 +    function h(node) {
     1.7 +        var x = 0;
     1.8 +        while (node) {
     1.9 +            x++;
    1.10 +            node = node.parent;
    1.11 +        }
    1.12 +        return x;
    1.13 +    }
    1.14 +    var tree = {__proto__: {__proto__: {parent: null}}};
    1.15 +    h(tree);
    1.16 +    h(tree);
    1.17 +    tree.parent = {};
    1.18 +    assertEq(h(tree), 2);
    1.19 +}
    1.20 +testDeepPropertyShadowing();

mercurial