• Jakob Gruber's avatar
    [regexp] Restructure fast path check logic · c6b1ef0e
    Jakob Gruber authored
    Prior to this CL, the regexp fast path check is stricter than it
    needs to be. For example, adding any arbitrary property on the regexp
    prototype would move the execution of all regexp builtins in the same
    context onto the slow path. This actually happens in the real world:
    popular web frameworks commonly monkey-patch builtin prototypes to add
    functionality.
    
    The intent of this CL is to widen the fast path for regexp builtins s.t.
    modifications of the prototype that do not conflict with our
    requirements stay on the fast path.
    
    This is done by extending the current fast path check with an
    additional step. If checking the prototype map identity or
    relevant prototype property constness fails, we now compare the actual
    value of all relevant properties against the expected value. If these
    match, the prototype can be considered fast.
    
    The new step as described in the previous paragraph is part of the
    permissive fast path check (BranchIfFastRegExp_Permissive). The strict
    variant (BranchIfFastRegExp_Strict) is also still required by a few
    spots. We should refactor these to also allow the permissive check in
    follow-up work.
    
    Bug: v8:5577,chromium:977382
    Change-Id: I69b2244e68ccfbd00edf17fc326aa4b5f5d089fa
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1706056
    Commit-Queue: Jakob Gruber <jgruber@chromium.org>
    Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
    Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
    Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#62948}
    c6b1ef0e
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
custom_deps Loading commit data...
docs Loading commit data...
gni 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 Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.clang-tidy Loading commit data...
.editorconfig Loading commit data...
.flake8 Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython 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...
COMMON_OWNERS Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
ENG_REVIEW_OWNERS Loading commit data...
INFRA_OWNERS Loading commit data...
INTL_OWNERS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
MIPS_OWNERS Loading commit data...
OWNERS Loading commit data...
PPC_OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
S390_OWNERS Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...