Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 282d55d7a1416497d8c2cbeb1997ea70656d1642
https://github.com/WebKit/WebKit/commit/282d55d7a1416497d8c2cbeb1997ea70656d1642
Author: Yusuke Suzuki <[email protected]>
Date: 2026-04-23 (Thu, 23 Apr 2026)
Changed paths:
A JSTests/stress/yarr-jit-fixedcount-paren-context-free-on-skip.js
M Source/JavaScriptCore/yarr/YarrJIT.cpp
Log Message:
-----------
[YARR] Just marking current FixedCount ParenContext incomplete and try using
it again
https://bugs.webkit.org/show_bug.cgi?id=313173
rdar://175457494
Reviewed by Geoffrey Garen and Sosuke Suzuki.
This patch makes FixedCount backtracking mechanism simplified. Instead
of restoring and nullifying ParenContext heads, we can just mark the
currently using ParenContext as incomplete, and using this again to
continue the backtracking. Since FixedCount Parentheses starts with
ParenContext with incomplete state, so basically this means that we will
again attempt to match with the current Frame's information with the
current ParenContext's state. So the ParenContexts heads in the saved store
is only modified after the restoration. So we no longer need to care
about the problem of reusing stale ParenContexts.
This allows us to recover freeing ParenContext when we failed to match
the current iteration's FixedCount. This guarantees that FixedCount
parentheses is using ParenContext strictly up-to-N for N iterations
(e.g. (...){N}).
Test: JSTests/stress/yarr-jit-fixedcount-paren-context-free-on-skip.js
* JSTests/stress/yarr-jit-fixedcount-paren-context-free-on-skip.js: Added.
(stringify):
(test):
(test.a.b):
(n.const.re.new.RegExp):
* Source/JavaScriptCore/yarr/YarrJIT.cpp:
Canonical link: https://commits.webkit.org/311912@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications