Bug 283003
| Summary: | [Yarr] Improve processing of [\s\S] character classes | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Michael Saboff <msaboff> |
| Component: | JavaScriptCore | Assignee: | Michael Saboff <msaboff> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Other | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Michael Saboff
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Michael Saboff
<rdar://135409524>
Michael Saboff
Pull request: https://github.com/WebKit/WebKit/pull/36547
EWS
Committed 286509@main (e6ee2eb472c1): <https://commits.webkit.org/286509@main>
Reviewed commits have been landed. Closing PR #36547 and removing active labels.