Bug 258531 - [JSC] Improve RegExp Lookbehind Character Class Backtracking
Summary: [JSC] Improve RegExp Lookbehind Character Class Backtracking
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Michael Saboff
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-06-26 14:06 PDT by Michael Saboff
Modified: 2023-06-28 12:42 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Saboff 2023-06-26 14:06:15 PDT
We currently backtrack character classes that may contain non-BMP characters by rematching one less than the prior count.  For large strings that need to backtrack a large number of characters, this is quit wasteful.

Now that we have methods that can read non-BMP characters either forward or bacckward, we can use these to back up just one character.  The same applies to lookaheads.
Comment 1 Michael Saboff 2023-06-26 14:06:46 PDT
<rdar://111051833>
Comment 2 Michael Saboff 2023-06-26 14:20:04 PDT
Pull request: https://github.com/WebKit/WebKit/pull/15304
Comment 3 EWS 2023-06-28 12:42:08 PDT
Committed 265593@main (8e5b3f5761f0): <https://commits.webkit.org/265593@main>

Reviewed commits have been landed. Closing PR #15304 and removing active labels.