• Benedikt Meurer's avatar
    [es6] Correct Function.prototype.apply, Reflect.construct and Reflect.apply. · e4d25389
    Benedikt Meurer authored
    Introduce a new Apply builtin that forms a correct and optimizable
    foundation for the Function.prototype.apply, Reflect.construct and
    Reflect.apply builtins (which properly does the PrepareForTailCall
    as required by the ES2015 spec).
    
    The new Apply builtin avoids going to the runtime if it is safe to
    just access the backing store elements of the argArray, i.e. if you
    pass a JSArray with no holes, or an unmapped, unmodified sloppy or
    strict arguments object.
    
    mips/mips64 ports by Balazs Kilvady <balazs.kilvady@imgtec.com>
    
    CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel
    BUG=v8:4413, v8:4430
    LOG=n
    R=yangguo@chromium.org
    
    Review URL: https://codereview.chromium.org/1523753002 .
    
    Cr-Commit-Position: refs/heads/master@{#32927}
    e4d25389
function-apply.js 7.46 KB