summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug641235.js
blob: 8534b53c0408acc46ff69cd02bedc3fc34b00ba1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
try {
function g(code) {
    code = code.replace(/\/\*DUPTRY\d+\*\//, function(k) {
        var n = parseInt(k.substr(8), 10);
        return aa("try{}catch(e){}", n);
    });
    var f = new Function(code);
    f()
}
function aa(s, n) {
    if (n == 1) {
        return s;
    }
    var s2 = s + s;
    var r = n % 2;
    var d = (n - r) / 2;
    var m = aa(s2, d);
    return r ? m + s : m;
}
g("switch(x){default:case l:/*DUPTRY5338*/case 0:x}");
} catch (e) {}