src/yield_handler.js
function processThunkArgs( args ) {
    let length = args.length | 0;

    if( length >= 3 ) {
        let res = new Array( --length );

        for( let i = 0; i < length; ) {
            res[i] = args[++i]; //It's a good thing this isn't undefined behavior in JavaScript
        }

        return res;
    }

    return args[1];
}
function processThunkArgs( args ) {
    let length = args.length | 0;

    if( length >= 3 ) {
        let res = new Array( --length );

        for( let i = 0; i < length; ) {
            res[i] = args[++i]; //It's a good thing this isn't undefined behavior in JavaScript
        }

        return res;
    }

    return args[1];
}
function processThunkArgs ( args ) { let length = args . length | 0 ; if ( length >= 3 ) { let res = new Array ( -- length ) ; for ( let i = 0 ; i < length ; ) { res [ i ] = args [ ++ i ] ; //It's a good thing this isn't undefined behavior in JavaScript } return res ; } return args [ 1 ] ; }
This is separated out so it can be optimized independently to the calling function.
This is separated out so it can be optimized independently to the calling function .