• littledan's avatar
    Add Array support for @@species and subclassing · 6e962237
    littledan authored
    This patch implements @@species, guarded behind the --harmony-species
    flag, on Arrays. Methods which return an Array will instead return
    the appropriate instance based on the ArraySpeciesCreate algorithm.
    The algorithm is implemented in C++ to get access to realm information
    and to implement some Array methods in C++, but it is also accessed
    from JavaScript through a new runtime function. A couple interactive
    Octane runs show no performance regression with the flag turned off,
    but turning --harmony-species on will surely have a significant
    regression, as Array methods now heavily use ObjectDefineProperty.
    
    BUG=v8:4093
    LOG=Y
    R=adamk,cbruni
    
    Review URL: https://codereview.chromium.org/1560763002
    
    Cr-Commit-Position: refs/heads/master@{#33144}
    6e962237
typedarray.js 28.3 KB