• Jakob Gruber's avatar
    [regexp] Early errors 🤯 · a56874d3
    Jakob Gruber authored
    This CL implements early SyntaxErrors for regular expressions. Early
    errors are thrown when a malformed pattern is parsed, rather than when
    the code first runs.
    
    We do this by having the JS parser call into the regexp parser when
    a regexp pattern is found. Regexps are expected to be relatively
    rare, small, and cheap to parse - that's why we currently accept that
    the regexp parser does unnecessary work (e.g. creating the AST
    structures).
    
    If needed, we can optimize in the future. Ideas:
    
    - Split up the regexp parser to avoid useless work for syntax validation.
    - Preserve parser results to avoid reparsing later.
    
    Bug: v8:896
    Change-Id: I3d1ec18c980ba94439576ac3764138552418b85d
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3106647
    Commit-Queue: Jakob Gruber <jgruber@chromium.org>
    Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
    Reviewed-by: 's avatarPatrick Thier <pthier@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#76502}
    a56874d3
Name
Last commit
Last update
..
embenchen Loading commit data...
poppler Loading commit data...
sqlite3 Loading commit data...
asm-heap.js Loading commit data...
asm-memory.js Loading commit data...
asm-stdlib.js Loading commit data...
asm-validation.js Loading commit data...
atomics-add.js Loading commit data...
atomics-and.js Loading commit data...
atomics-compareexchange.js Loading commit data...
atomics-exchange.js Loading commit data...
atomics-load.js Loading commit data...
atomics-or.js Loading commit data...
atomics-store.js Loading commit data...
atomics-sub.js Loading commit data...
atomics-xor.js Loading commit data...
b5528-comma.js Loading commit data...
call-annotation.js Loading commit data...
call-collisions.js Loading commit data...
call-stdlib.js Loading commit data...
do-while-false.js Loading commit data...
do-while.js Loading commit data...
float32array-negative-offset.js Loading commit data...
float32array-outofbounds.js Loading commit data...
float32array-store-div.js Loading commit data...
float64array-negative-offset.js Loading commit data...
float64array-outofbounds.js Loading commit data...
float64array-store-div.js Loading commit data...
float64mul.js Loading commit data...
global-imports.js Loading commit data...
if-cloning.js Loading commit data...
if-folding.js Loading commit data...
if-reduction.js Loading commit data...
if-tonumber.js Loading commit data...
immutable.js Loading commit data...
infinite-loops-taken.js Loading commit data...
infinite-loops.js Loading commit data...
int16array-negative-offset.js Loading commit data...
int16array-outofbounds.js Loading commit data...
int32-div.js Loading commit data...
int32-mod.js Loading commit data...
int32-mul.js Loading commit data...
int32-tmod.js Loading commit data...
int32-udiv.js Loading commit data...
int32-umod.js Loading commit data...
int32array-constant-key.js Loading commit data...
int32array-negative-offset.js Loading commit data...
int32array-outofbounds.js Loading commit data...
int32array-unaligned.js Loading commit data...
int32div.js Loading commit data...
int32mod-constant.js Loading commit data...
int32mod.js Loading commit data...
int32modb.js Loading commit data...
int8array-negative-offset.js Loading commit data...
load-elimination.js Loading commit data...
math-abs.js Loading commit data...
math-ceil.js Loading commit data...
math-clz32.js Loading commit data...
math-floor.js Loading commit data...
math-fround.js Loading commit data...
math-max.js Loading commit data...
math-min.js Loading commit data...
noexpose-wasm.js Loading commit data...
pointer-masking.js Loading commit data...
redundancy1.js Loading commit data...
redundancy2.js Loading commit data...
regress-1013920.js Loading commit data...
regress-1027595.js Loading commit data...
regress-1069173.js Loading commit data...
regress-641885.js Loading commit data...
regress-660813.js Loading commit data...
regress-669899.js Loading commit data...
regress-672045.js Loading commit data...
regress-676573.js Loading commit data...
regress-681707.js Loading commit data...
regress-718745.js Loading commit data...
regress-719866.js Loading commit data...
regress-740325.js Loading commit data...
regress-913822.js Loading commit data...
regress-920076.js Loading commit data...
regress-937650.js Loading commit data...
regress-9531.js Loading commit data...
return-types.js Loading commit data...
sign-extend.js Loading commit data...
switch.js Loading commit data...
uint32-less-than-shift.js Loading commit data...
uint32div.js Loading commit data...
uint32mod-constant.js Loading commit data...
uint32mod.js Loading commit data...
uint8array-outofbounds.js Loading commit data...
word32and.js Loading commit data...
word32ror.js Loading commit data...
zero-extend.js Loading commit data...