• adamk's avatar
    Add fast paths for native RegExps in ES2015 subclass-aware code · 360586f2
    adamk authored
    This patch adds fast paths for @@replace and @@split that call into
    the old, side-effect free (and faster) versions of those builtin
    operations when possible (roughly, when the receiver is a RegExp
    and the 'exec' method is untampered). Also add some micro-optimizations
    that further improve performance.
    
    Taken altogether, this takes us from a ~70% regression on the Octane
    RegExp benchmark to a ~9% regression.
    
    The test262.status lines for RegExps has been reorganized to make it
    clearer the status of individual tests. More work will likely be
    required to increase spec compliance before the --harmony-regexp-exec
    flag is shipped; some of that work is happening on the spec side.
    
    BUG=v8:4602
    LOG=y
    
    Review URL: https://codereview.chromium.org/1836123002
    
    Cr-Commit-Position: refs/heads/master@{#35118}
    360586f2
regexp.js 40.7 KB