• bmeurer's avatar
    [turbofan] Add initial support for growing stores. · e6822a83
    bmeurer authored
    Introduce a dedicated MaybeGrowFastElements simplified operator, which
    tries to grow a fast elements backing store for a given element that
    should be added to an array/object. Use that to lower a growing keyed
    store to a sequence of
    
     1) check index is a valid array index,
     2) check stored value,
     3) maybe grow elements backing store (and deoptimize if it would
        normalize), and
     4) store the actual element.
    
    The actual growing is done by two dedicated GrowFastDoubleElements
    and GrowFastSmiOrObjectElements builtins, which are very similar to
    the GrowArrayElementsStub that is used by Crankshaft.
    
    Drive-by-fix: Turn CopyFixedArray into CopyFastSmiOrObjectElements
    builtin, similar to the new growing builtins, so we don't need to
    inline the store+write barrier for the elements into all optimized
    code objects anymore.
    
    Also fix a bug in the OperationTyper for NumberSilenceNaN, which was
    triggered by this change.
    
    BUG=v8:5272
    
    Review-Url: https://codereview.chromium.org/2227493002
    Cr-Commit-Position: refs/heads/master@{#38418}
    e6822a83
simplified-operator.h 13.2 KB