• littledan's avatar
    Add ES2015 RegExp full subclassing semantics behind a flag · 92a571e5
    littledan authored
    This patch implements ES2015 RegExp subclassing semantics, namely the
    hardest part where RegExp.prototype.exec and certain flag getters can
    be overridden in order to provide different behavior. This change is
    hidden behind a new flag, --harmony-regexp-exec. The flag guards the
    behavior by installing entirely different implementations of the
    methods which follow the new semantics.
    
    Preliminary performance tests show a 3-4x regression in the Octane
    RegExp benchmark. The new code doesn't call out into several fast
    paths that the old code supported, so this is expected.
    
    The patch is tested mostly by test262, where most RegExp tests are fixed,
    with the exception of deliberate spec violations for web compatibility,
    and for the 'sticky' flag, which is not dynamically read by this patch
    in all cases but rather statically compiled into the RegExp. The latter
    will require a follow-on patch to implement. A small additional set of
    tests verifies one particular case, mostly to check whether the flag
    mechanism works.
    
    R=adamk,yangguo@chromium.org
    LOG=Y
    BUG=v8:4602
    
    Review URL: https://codereview.chromium.org/1596483005
    
    Cr-Commit-Position: refs/heads/master@{#35068}
    92a571e5
Name
Last commit
Last update
benchmarks Loading commit data...
build Loading commit data...
docs Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party/binutils Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.gitignore Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
Makefile Loading commit data...
Makefile.android Loading commit data...
Makefile.nacl Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...