• Peter Marshall's avatar
    [typedarray] Add a fast-path copy of arrays in IterableToList · 23c42883
    Peter Marshall authored
    Currently we perform the full iteration protocol even when we don't need
    to. When IterableToListCanBeElided is true, we still need to create a
    copy of the array (from a spec correctness point of view, in case there
    are user-JS side-effects that would modify the original).
    
    This CL copies the array directly, skipping the iteration protocol.
    This recovers the JSTests/TypedArrays/ConstructArrayLike benchmark
    almost completely.
    
    Change-Id: I7f1593dd9af6e4a0485bd654e6c02186c5ae99d0
    Reviewed-on: https://chromium-review.googlesource.com/1105995Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
    Commit-Queue: Peter Marshall <petermarshall@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#53996}
    23c42883
builtins-definitions.h 108 KB