• Hai Dang's avatar
    Add fast path for cloning by iterating fast holey arrays. · 9f7ec7d4
    Hai Dang authored
    This fast path copies the backing store and replaces holes with undefined.
    In the case where the array is holey but there is no actual holes, the
    resulting array is of the same elements kind as the source array. If a hole
    does appear, the resulting array will be of PACKED_ELEMENTS kind so that it
    can contain undefined.
    
    The builtin CloneFastJSArrayFillingHoles includes this fast path, but
    CloneFastJSArray does not (it still behaves as before). In case of fast
    packed arrays, CloneFastJSArrayFillingHoles behaves the same as
    CloneFastJSArray.
    
    Bug: chromium:881273, v8:7980
    Change-Id: I49c641c1a673313f06aeed93077031ab6b017b6d
    Reviewed-on: https://chromium-review.googlesource.com/1236573
    Commit-Queue: Hai Dang <dhai@google.com>
    Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#56209}
    9f7ec7d4
code-stub-assembler.cc 484 KB