Repository navigation
[JSC] DFG RegExpTest asserts when the RegExp is also the argument - #74030
Merged
webkit-commit-queue merged 1 commit intoSep 15, 2026
Conversation
Collaborator
|
EWS run on current version of this PR (hash dd3477f) Details |
Constellation
approved these changes
Sep 15, 2026
https://bugs.webkit.org/show_bug.cgi?id=324211 Reviewed by Yusuke Suzuki. In `regExp.test(regExp)` both operands of RegExpTest are the same node, so baseGPR and argumentGPR are the same register. Debug builds then hit ASSERT(noOverlap(baseGPR, argumentGPR, scratch1GPR, scratch2GPR)) in emitRegExpMinimumLengthFilterGuards(), added in 320487@main. The function only reads baseGPR and argumentGPR and only writes the scratch registers, so assert each input against the scratch registers separately, as emitRegExpStickyFirstCharacterFilterGuards() already does. The generated code does not change: a RegExp argument is not a string, so it branches to the slow path call before the guards run. Test: JSTests/stress/regexp-test-regexp-is-also-the-argument.js * JSTests/stress/regexp-test-regexp-is-also-the-argument.js: Added. (shouldBe): (testConstant): (testConstantAnchored): (testConstantSticky): * Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::emitRegExpMinimumLengthFilterGuards): Canonical link: https://commits.webkit.org/321146@main
webkit-commit-queue
force-pushed
the
eng/regexp-test-minimum-length-filter-same-register
branch
from
September 15, 2026 07:29
dd3477f to
d22fa24
Compare
Collaborator
|
Committed 321146@main (d22fa24): https://commits.webkit.org/321146@main Reviewed commits have been landed. Closing PR #74030 and removing active labels. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
d22fa24
dd3477f
🛠 win🧪 win-tests🧪 api-mac🧪 api-mac-debug🧪 api-ios🧪 mac-AS-debug-wk2🧪 mac-intel-wk2🛠 watch