interpreter/index.js
function branch(inst, list, argv, event, fin) {
    if (argv.length > 0) {
        // Append the argv for programs that return
        // a list that accepts them as parameters
        list = list.concat(argv.splice(0));
    }
    // HACK HACK HACK. OK, so, when dealing with deeply recursive
    // functions in Runiq, we may hit an error where we exceed the
    // available call stack size. A setTimeout will get us a fresh
    // call stack, but at serious perf expense, since setTimeouts
    // end up triggered 4 ms later. So what I'm doing here is
    // trying to call unload, and if that gives an error, then
    // falling back to setTimeout method. This technique has an
    // incredible benefit, speeding up Runiq programs by 50X or so.
    // However, it could prove unworkable depending on browser support
    // for catching call-stack errors.
    try {
        return unload(inst, list, argv, event, fin);
    }
    catch (e) {
        return setTimeout(function branchCallback() {
            Console.printWarning(inst, "Caught call stack error: " + e);
            return unload(inst, list, argv, event, fin);
        }, 0);
    }
}
function branch(inst, list, argv, event, fin) {
    if (argv.length > 0) {
        // Append the argv for programs that return
        // a list that accepts them as parameters
        list = list.concat(argv.splice(0));
    }
    // HACK HACK HACK. OK, so, when dealing with deeply recursive
    // functions in Runiq, we may hit an error where we exceed the
    // available call stack size. A setTimeout will get us a fresh
    // call stack, but at serious perf expense, since setTimeouts
    // end up triggered 4 ms later. So what I'm doing here is
    // trying to call unload, and if that gives an error, then
    // falling back to setTimeout method. This technique has an
    // incredible benefit, speeding up Runiq programs by 50X or so.
    // However, it could prove unworkable depending on browser support
    // for catching call-stack errors.
    try {
        return unload(inst, list, argv, event, fin);
    }
    catch (e) {
        return setTimeout(function branchCallback() {
            Console.printWarning(inst, "Caught call stack error: " + e);
            return unload(inst, list, argv, event, fin);
        }, 0);
    }
}
function branch ( inst , list , argv , event , fin ) { if ( argv . length > 0 ) { // Append the argv for programs that return // a list that accepts them as parameters list = list . concat ( argv . splice ( 0 ) ) ; } // HACK HACK HACK. OK, so, when dealing with deeply recursive // functions in Runiq, we may hit an error where we exceed the // available call stack size. A setTimeout will get us a fresh // call stack, but at serious perf expense, since setTimeouts // end up triggered 4 ms later. So what I'm doing here is // trying to call unload, and if that gives an error, then // falling back to setTimeout method. This technique has an // incredible benefit, speeding up Runiq programs by 50X or so. // However, it could prove unworkable depending on browser support // for catching call-stack errors. try { return unload ( inst , list , argv , event , fin ) ; } catch ( e ) { return setTimeout ( function branchCallback ( ) { Console . printWarning ( inst , "Caught call stack error: " + e ) ; return unload ( inst , list , argv , event , fin ) ; } , 0 ) ; } }
Force flow through a set timeout prior to executing the given list
Force flow through a set timeout prior to executing the given list