Skip to content

[JSC] Enable JIT compiling by DFG for String#codePointAt on ARMv7 #47338

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

sosukesuzuki
Copy link
Member

@sosukesuzuki sosukesuzuki commented Jun 28, 2025

cb619a3

[JSC] Enable JIT compiling by DFG for `String#codePointAt` on ARMv7
https://bugs.webkit.org/show_bug.cgi?id=295149

Reviewed by Justin Michaud.

String#codePointAt is only JIT compiled on 64-bit architectures.

This patch enables JIT compilation on ARMv7 by moving the
compileStringCodePointAt function from DFGSpeculativeJIT64.cpp
to the shared DFGSpeculativeJIT.cpp file.

The implementation itself remains unchanged, making it available to both
32-bit and 64-bit architectures without any functional modifications.

* Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
* Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileStringCodePointAt):
* Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compileStringCodePointAt): Deleted.

Canonical link: https://commits.webkit.org/296841@main

03e2a08

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac 🛠 wpe 🛠 win
✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug 🧪 wpe-wk2 🧪 win-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🛠 wpe-cairo
✅ 🛠 🧪 jsc ✅ 🧪 api-ios ✅ 🧪 mac-wk2 ❌ 🛠 gtk
✅ 🛠 🧪 jsc-arm64 ✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ❌ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ❌ 🧪 api-gtk
✅ 🛠 🧪 merge ✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2 ✅ 🛠 playstation
✅ 🛠 tv ✅ 🛠 mac-safer-cpp ✅ 🛠 jsc-armv7
✅ 🛠 tv-sim ✅ 🧪 jsc-armv7-tests
✅ 🛠 watch
✅ 🛠 watch-sim

@sosukesuzuki sosukesuzuki requested a review from a team as a code owner June 28, 2025 12:50
@sosukesuzuki sosukesuzuki self-assigned this Jun 28, 2025
@sosukesuzuki sosukesuzuki added the JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues. label Jun 28, 2025
@sosukesuzuki sosukesuzuki added the merge-queue Applied to send a pull request to merge-queue label Jun 30, 2025
https://bugs.webkit.org/show_bug.cgi?id=295149

Reviewed by Justin Michaud.

String#codePointAt is only JIT compiled on 64-bit architectures.

This patch enables JIT compilation on ARMv7 by moving the
compileStringCodePointAt function from DFGSpeculativeJIT64.cpp
to the shared DFGSpeculativeJIT.cpp file.

The implementation itself remains unchanged, making it available to both
32-bit and 64-bit architectures without any functional modifications.

* Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
* Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileStringCodePointAt):
* Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compileStringCodePointAt): Deleted.

Canonical link: https://commits.webkit.org/296841@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/armv7-string-code-point-at branch from 03e2a08 to cb619a3 Compare July 1, 2025 00:14
@webkit-commit-queue
Copy link
Collaborator

Committed 296841@main (cb619a3): https://commits.webkit.org/296841@main

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

@webkit-commit-queue webkit-commit-queue merged commit cb619a3 into WebKit:main Jul 1, 2025
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants