• Jakob Gruber's avatar
    [regexp] Dont attempt to match '^' before the start of the string · 1990b1e1
    Jakob Gruber authored
    This fixes an invalid assumption when emitting code for matching '^'
    (start of line) in multiline regexps and '\b', '\B' in general.
    
    What we used to do: if the current trace's cp_offset (the offset from
    the current position) was non-zero, we assumed that we were looking at
    subject string index 1 or greater (i.e.: not at the start of the string
    or before).
    
    This is no longer valid since cp_offsets can now be negative.
    
    This CL changes the logic to omit start- and bounds-checks only for
    strictly positive cp_offsets, where the above assumption still holds.
    
    Bug: chromium:996391
    Change-Id: I79be4fc295c6f0b63e41c13d1e91fdd00f2f2b42
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1771794
    Commit-Queue: Erik Corry <erikcorry@chromium.org>
    Auto-Submit: Jakob Gruber <jgruber@chromium.org>
    Reviewed-by: 's avatarErik Corry <erikcorry@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#63424}
    1990b1e1
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...
gen-regexp-special-case.cc 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-bytecode-generator-inl.h Loading commit data...
regexp-bytecode-generator.cc Loading commit data...
regexp-bytecode-generator.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-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...
regexp.cc Loading commit data...
regexp.h Loading commit data...
special-case.h Loading commit data...