Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 582f25b3e6970f2e75fda3bdbdf29a6644dccd84
https://github.com/WebKit/WebKit/commit/582f25b3e6970f2e75fda3bdbdf29a6644dccd84
Author: Sosuke Suzuki <[email protected]>
Date: 2026-04-20 (Mon, 20 Apr 2026)
Changed paths:
A JSTests/microbenchmarks/regexp-forward-reference.js
M Source/JavaScriptCore/yarr/YarrJIT.cpp
M Source/JavaScriptCore/yarr/YarrJIT.h
Log Message:
-----------
[YARR] Forward references are no longer JIT-compiled
https://bugs.webkit.org/show_bug.cgi?id=312741
Reviewed by Yusuke Suzuki.
307322@main made forward references no-ops in the YARR JIT (per spec, a
backreference to a group that hasn't captured yet always matches the empty
string). 309655@main split PatternTerm::Type::ForwardReference into
NumberedForwardReference / NamedForwardReference and accidentally
reintroduced `m_failureReason = JITFailureReason::ForwardReference` in
generateTerm() / backtrackTerm(), causing patterns like /\2(a)(b)/ to fall
back to the bytecode interpreter again.
This patch restores the no-op handling for both new term types and removes
the now-unused JITFailureReason::ForwardReference enum value.
Baseline Patched
regexp-forward-reference 177.6213+-2.2410 ^ 53.3873+-1.0550 ^
definitely 3.3270x faster
Test: JSTests/microbenchmarks/regexp-forward-reference.js
* JSTests/microbenchmarks/regexp-forward-reference.js: Added.
* Source/JavaScriptCore/yarr/YarrJIT.cpp:
(JSC::Yarr::dumpCompileFailure):
* Source/JavaScriptCore/yarr/YarrJIT.h:
Canonical link: https://commits.webkit.org/311657@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications