• peterwmwong's avatar
    [builtins] Port WeakMap.p.set and WeakSet.p.add to CSA from JS · 7ae0a2f9
    peterwmwong authored
    - Add WeakMapPrototypeSet and WeakSetPrototypeAdd TFJ builtins
      - Fast paths for...
        1) existing key
        2) new key when ObjectHashTable has a "sufficient capacity"
    - Create WeakCollectionsBuiltinsAssembler to consolidate common WeakMap/WeakSet code generation
    - Convert existing WeakMapLookupHashIndex to use WeakCollectionsBuiltinsAssembler
    
    Some quick benchmarks shows performance gains of...
    - 1.56x - 1.98x for WeakMap constructor
    - 1.66x - 2.06x for WeakSet constructor
    - 1.50x - 2.11x for WeakMap.p.set
    - 1.54x - 2.26x for WeakSet.p.add
    
    https: //github.com/peterwmwong/v8-perf/blob/master/weakcollection-set/README.md
    Bug: v8:5049, v8:6604
    Change-Id: I3499d46be6b2b3b1d8d46720ebe86cc5142ee542
    Reviewed-on: https://chromium-review.googlesource.com/737935
    Commit-Queue: Jakob Gruber <jgruber@chromium.org>
    Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#49036}
    7ae0a2f9
builtins-collections-gen.cc 80.7 KB