js/src/jit-test/tests/xdr/scope.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/jit-test/tests/xdr/scope.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,19 @@
     1.4 +load(libdir + 'bytecode-cache.js');
     1.5 +var test = "";
     1.6 +
     1.7 +// code a function which has both used and unused inner functions.
     1.8 +test  = (function () {
     1.9 +  function f() {
    1.10 +    var x = 3;
    1.11 +    (function() {
    1.12 +      with(obj) {
    1.13 +        (function() {
    1.14 +          assertEq(x, 2);
    1.15 +        })();
    1.16 +      }
    1.17 +    })();
    1.18 +  };
    1.19 +
    1.20 +  return "var obj = { x : 2 };" + f.toSource() + "; f()";
    1.21 +})();
    1.22 +evalWithCache(test, { assertEqBytecode: true, assertEqResult : true });

mercurial