• Benedikt Meurer's avatar
    [builtin] Further cleanup %ArrayIteratorPrototype%.next(). · 2650fc33
    Benedikt Meurer authored
    Refactor the ArrayIteratorPrototypeNext CSA builtin to handle the
    JSArray element access in a dedicated helper macro, very similar
    to how it's done for JSTypedArray's. Also add support for dictionary
    elements to this helper macro using the existing dictionary access
    logic in the CodeStubAssembler.
    
    This improves the readability of the builtin significantly and the
    performance of iterating arrays with dictionary elements goes up by
    a factor of ~3.5x.
    
    Bug: v8:8015, v8:8070
    Change-Id: Ibfee760ea1e4bc0fffb42b232fb1d097b706bd1f
    Reviewed-on: https://chromium-review.googlesource.com/1183305Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
    Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#55283}
    2650fc33
array-iterator.js 8.01 KB