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

Wed, 31 Dec 2014 06:55:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:50 +0100
changeset 2
7e26c7da4463
permissions
-rw-r--r--

Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2

     1 function f(code) {
     2     a = code.replace(/s/, "");
     3     wtt = a
     4     code = code.replace(/\/\*DUPTRY\d+\*\//, function(k) {
     5         n = parseInt(k.substr(8), 0);
     6         return g("try{}catch(e){}", n)
     7     });
     8     f = eval("(function(){" + code + "})")
     9     if (typeof disassemble == 'function') {
    10         disassemble("-r", f)
    11     }
    12 }
    13 function g(s, n) {
    14     if (n == 0) {
    15         return s
    16     }
    17     s2 = s + s
    18     r = n % 2
    19     d = (n - r) / 2
    20     m = g(s2, d)
    21     return r ? m + s : m
    22 }
    23 f("switch(''){default:break;/*DUPTRY525*/}")

mercurial