Bug 283003

Summary: [Yarr] Improve processing of [\s\S] character classes
Product: WebKit Reporter: Michael Saboff <msaboff>
Component: JavaScriptCoreAssignee: Michael Saboff <msaboff>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   

Michael Saboff
Reported 2024-11-12 11:43:00 PST
The character class [\s\S], which is all white space and non-white space characters is used in lieu of ‘.’ (any character). Many developers use [\s\S] instead of ’.’ because the ‘.’ any character does not include line terminators unless the dot all ’s’ flag is added to the regex. The character class [\s\S] matches any character regardless of flags added to the expression. The current YARR processing of [\s\S] "any character' character classes is suboptimal. We only need to read a subject string character. Instead, we currently check the read character for various values.
Attachments
Michael Saboff
Comment 1 2024-11-12 11:43:23 PST
Michael Saboff
Comment 2 2024-11-12 12:12:18 PST
EWS
Comment 3 2024-11-12 16:10:59 PST
Committed 286509@main (e6ee2eb472c1): <https://commits.webkit.org/286509@main> Reviewed commits have been landed. Closing PR #36547 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.