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

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     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