summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/xdr/scope.js
blob: 417a402d24dc03c4c71cd128933f6eced72e6a87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
load(libdir + 'bytecode-cache.js');
var test = "";

// code a function which has both used and unused inner functions.
test  = (function () {
  function f() {
    var x = 3;
    (function() {
      with(obj) {
        (function() {
          assertEq(x, 2);
        })();
      }
    })();
  };

  return "var obj = { x : 2 };" + f.toSource() + "; f()";
})();
evalWithCache(test, { assertEqBytecode: true, assertEqResult : true });