js/src/jit-test/tests/asm.js/testBug952022.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/jit-test/tests/asm.js/testBug952022.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,57 @@
     1.4 +function g(f) {
     1.5 +    for (var j = 0; j < 9; ++j) {
     1.6 +        try {
     1.7 +            f()
     1.8 +        } catch (e) {}
     1.9 +    }
    1.10 +}
    1.11 +function h(code) {
    1.12 +    Function(code)();
    1.13 +}
    1.14 +g([]);
    1.15 +g([]);
    1.16 +g([]);
    1.17 +g([]);
    1.18 +g([]);
    1.19 +g([]);
    1.20 +g([]);
    1.21 +g([]);
    1.22 +g([]);
    1.23 +g([]);
    1.24 +g([]);
    1.25 +g([]);
    1.26 +g([]);
    1.27 +g([]);
    1.28 +g([]);
    1.29 +g([]);
    1.30 +g([]);
    1.31 +g([]);
    1.32 +g([]);
    1.33 +g([]);
    1.34 +g([]);
    1.35 +g([]);
    1.36 +g([]);
    1.37 +g([]);
    1.38 +g([]);
    1.39 +g([]);
    1.40 +g([]);
    1.41 +g([]);
    1.42 +g([]);
    1.43 +g([]);
    1.44 +h("\
    1.45 +    m = (function(stdlib, foreign) { \
    1.46 +        \"use asm\";\
    1.47 +        var ff=foreign.ff;\
    1.48 +        function f(){\
    1.49 +            ff(0);\
    1.50 +        } \
    1.51 +        return f \
    1.52 +    })(this , { \
    1.53 +        ff: arguments.callee.caller\
    1.54 +    });\
    1.55 +    g(m , []);\
    1.56 +");
    1.57 +h("\
    1.58 +    m = undefined;\
    1.59 +    gc();\
    1.60 +")

mercurial