• Benedikt Meurer's avatar
    [builtins] Port EnqueueMicrotask to CSA. · 2b4cc835
    Benedikt Meurer authored
    Previously the Promise builtins would always use a runtime function to
    schedule a new microtask, which is unnecessarily expensive. Since the
    runtime function only adds the microtask to a FixedArray (potentially
    growing that array) and increments the number of pending microtasks, it
    is fairly straight-forward to do this in CSA land instead.
    
    This change improves the Bluebird benchmarks by 2-4% on average.
    
    Bug: v8:7253
    Change-Id: I77e96b9e5afbb4bdbe129b6bb289d9905ed581bf
    Reviewed-on: https://chromium-review.googlesource.com/851972
    Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
    Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#50372}
    2b4cc835
code-stub-assembler.h 99.2 KB