• Jakob Gruber's avatar
    [regexp] Rewrite certain Assertion sequences · c51e4f3c
    Jakob Gruber authored
    RegExp assertions (e.g.: '^', '$', '\b', ...) sequences have certain
    properties that this rewriter exploits:
    
    1. They are zero-width and order-independent, thus one can remove all
    duplicate assertions.
    2. If a subsequence is guaranteed to fail, the entire sequence fails.
    Any sequence always known to fail (e.g. containing both '\b' and '\B')
    can be rewritten to a single node that triggers failure.
    
    This CL generalizes the previous optimization for repeated assertions
    to be order-independent, i.e. assertions only have to be in the same
    sequence but not next to each other.
    
    Bug: v8:6515, v8:6126
    Change-Id: I3f92f081ce8a55ad8c34c269a09a6686e3b008f3
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1657925
    Commit-Queue: Jakob Gruber <jgruber@chromium.org>
    Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#62201}
    c51e4f3c
Name
Last commit
Last update
..
arm Loading commit data...
arm64 Loading commit data...
ia32 Loading commit data...
mips Loading commit data...
mips64 Loading commit data...
ppc Loading commit data...
s390 Loading commit data...
x64 Loading commit data...
OWNERS Loading commit data...
jsregexp-inl.h Loading commit data...
jsregexp.cc Loading commit data...
jsregexp.h Loading commit data...
property-sequences.cc Loading commit data...
property-sequences.h Loading commit data...
regexp-ast.cc Loading commit data...
regexp-ast.h Loading commit data...
regexp-bytecodes.h Loading commit data...
regexp-compiler-tonode.cc Loading commit data...
regexp-compiler.cc Loading commit data...
regexp-compiler.h Loading commit data...
regexp-dotprinter.cc Loading commit data...
regexp-dotprinter.h Loading commit data...
regexp-interpreter.cc Loading commit data...
regexp-interpreter.h Loading commit data...
regexp-macro-assembler-arch.h Loading commit data...
regexp-macro-assembler-irregexp-inl.h Loading commit data...
regexp-macro-assembler-irregexp.cc Loading commit data...
regexp-macro-assembler-irregexp.h Loading commit data...
regexp-macro-assembler-tracer.cc Loading commit data...
regexp-macro-assembler-tracer.h Loading commit data...
regexp-macro-assembler.cc Loading commit data...
regexp-macro-assembler.h Loading commit data...
regexp-nodes.h Loading commit data...
regexp-parser.cc Loading commit data...
regexp-parser.h Loading commit data...
regexp-stack.cc Loading commit data...
regexp-stack.h Loading commit data...
regexp-utils.cc Loading commit data...
regexp-utils.h Loading commit data...