• Benedikt Meurer's avatar
    [builtins] Port Map and Set iterators to CodeStubAssembler. · 3b84cbfe
    Benedikt Meurer authored
    This is the next step towards faster Map and Set iteration. It
    introduces the appropriate instance types for Map and Set
    iterators (following the pattern for Array iterators) and migrates
    the following builtins to the CodeStubAssembler:
    
      - Set.prototype.entries
      - Set.prototype.values
      - Map.prototype.entries
      - Map.prototype.keys
      - Map.prototype.values
      - %SetIteratorPrototype%.next
      - %MapIteratorPrototype%.next
    
    This already provides a significant performance boost for regular
    for-of iteration of Sets and Maps, by a factor of 5-10 depending
    on the input. The final step will be to inline some fast-paths
    into TurboFan.
    
    Drive-by-fix: Remove obsolete %IsJSSetIterator and %IsJSMapIterator
    intrinsics and runtime functions.
    
    TBR=jgruber@chromium.org
    
    Bug: v8:6344, v8:6571, chromium:740122
    Change-Id: I3ab0ee49e2afe8d4295707a5ecbd51adda621918
    Reviewed-on: https://chromium-review.googlesource.com/563626
    Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
    Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#46497}
    3b84cbfe
objects-printer.cc 57.9 KB