• Jakob Gruber's avatar
    [regexp] Only emit valid ranges in MakeRangeArray · b7dc9915
    Jakob Gruber authored
    Character class handling in the irregexp pipeline is quite complex;
    codepoints outside the BMP (basic multilingual plane) are only
    translated into surrogate pairs when needed, e.g. when the subject
    string is two-byte. If not needed, the codepoints simply stay part of
    the list of CharacterRanges.
    
    In EmitCharClass, we determine the valid subset of ranges through
    ranges_length; until this CL, we forgot to pass that information on to
    MakeRangeArray. Do that now by truncating the list of CharacterRanges.
    
    Fixed: chromium:1262423
    Change-Id: I5bb5b839e9935890ca2d10908ad66d72c3217178
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3240782
    Commit-Queue: Jakob Gruber <jgruber@chromium.org>
    Auto-Submit: Jakob Gruber <jgruber@chromium.org>
    Reviewed-by: 's avatarMathias Bynens <mathias@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#77514}
    b7dc9915
Name
Last commit
Last update
..
benchmarks Loading commit data...
bigint Loading commit data...
cctest Loading commit data...
common Loading commit data...
debugger Loading commit data...
debugging Loading commit data...
fuzzer Loading commit data...
fuzzilli Loading commit data...
inspector Loading commit data...
intl Loading commit data...
js-perf-test Loading commit data...
memory Loading commit data...
message Loading commit data...
mjsunit Loading commit data...
mkgrokdump Loading commit data...
mozilla Loading commit data...
test262 Loading commit data...
torque Loading commit data...
unittests Loading commit data...
wasm-api-tests Loading commit data...
wasm-js Loading commit data...
wasm-spec-tests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...
OWNERS Loading commit data...