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

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     2 /* Resolve 'arguments' and the name of the function itself in the presence of such local variables. */
     4 function f() {
     5     return typeof arguments;
     6     function arguments() {
     7         return 7;
     8     }
     9 }
    10 assertEq(f(), "function");
    12 function g() {
    13     var arguments = 0;
    14     return typeof arguments;
    15 }
    16 assertEq(g(), "number");
    18 function h() {
    19     return typeof h;
    20     function h() {
    21         return 7;
    22     }
    23 }
    24 assertEq(h(), "function");
    26 function i() {
    27     return typeof i;
    28     var i;
    29 }
    30 assertEq(i(), "undefined");
    32 function j() {
    33     return typeof j;
    34 }
    35 assertEq(j(), "function");

mercurial