feat(libSceIcu): forward RTTI class identifiers to the bundled ICU #28915
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/28915"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by LODIBIDO on 2026-12-04T16:25:17Z.
What
Implements the RTTI class-identifier exports for six ICU classes in a new
RttiClassIds.cpp:getStaticClassIDforLocale,ParsePosition,UnicodeString,UnicodeSet,UnicodeFilterandUnicodeFunctor, andgetDynamicClassIDfor the four of them that export it. Each forwards to the bundled ICU 78'sgetStaticClassID().ICU class identifiers are opaque unique addresses; only their identity relationships matter. Forwarding to ICU 78 preserves them:
getDynamicClassIDreturns the class's owngetStaticClassID(as ICU's RTTI macro defines it), and the six classes have distinct identifiers. The stubs are removed fromLegacyExports.cppandinclude/LegacyExports.hpp.Only classes whose
getStaticClassIDthe bundled ICU build actually links are included.ResourceBundle,CanonicalIterator,UnicodeSetIterator,RuleBasedBreakIterator,StringCharacterIteratorandUCharCharacterIteratorare left as stubs because that symbol is not linked; the service, collection and enumeration classes pull internal headers that conflict here and are not addressed.The console's own identifier values are unverified; see the debt note.
Tested
Native Intel Mac (x86_64, macOS 15.7.8, Apple clang 17.0.0), Release, with the diffs of #27201 and #27767 applied locally.
guest_icu_rtti_class_ids: each identifier non-null, eachgetDynamicClassIDequals itsgetStaticClassID, and the six differ. Passed 5 of 5 runs.ctest -R '^public_headers'65 of 65.tools/progress.py --compare:libSceIcu445 to 455 of 2766.Not tested: Windows, Linux, console.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Summary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-12-04T16:35:32Z.
Review: COMMENTED
Actionable comments
RttiClassIds.hppto thelibSceIcuumbrella.2884e4a6-b434-4053-93c8-c6e25a63fdcdReviewing files that changed from the base of the PR and between
82a605ad2canda3d9d02ff6.core/libs/prx/libSceIcu/CMakeLists.txtcore/libs/prx/libSceIcu/LegacyExports.cppcore/libs/prx/libSceIcu/RttiClassIds.cppcore/libs/prx/libSceIcu/include/LegacyExports.hppcore/libs/prx/libSceIcu/include/RttiClassIds.hppcore/libs/prx/libSceIcu/tests/RttiClassIds.cppdocs/dev/debt/changes/feat-icu-rtti-class-ids.mdIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by Plyxen on 2026-12-04T16:52:56Z.
Review: APPROVED
Verified head
a3d9d02ff6on Windows 11 with WinLibs GCC 15.2 (Release), applied alone to main484b0368d3(without #27201 or #27767, both closed). This covers the Windows run listed under Not tested.libSceIcuand everyguest_icu_*test target build after a reconfigure.guest_icu_*: 112 of 112 pass, including the newguest_icu_rtti_class_ids. On main 111 of 111 pass, so removing the tenLegacyExportsstubs breaks nothing that is tested.Reading it: each
getDynamicClassIDignoresthisand returns its own class'sgetStaticClassID(), which is what ICU'sUOBJECT_DEFINE_RTTI_IMPLEMENTATIONdoes. A guest object of a subclass reaches the subclass's export through its vtable, so the identity relationships hold. I did not run a negative control.Not run: Linux and the console values.
AI-assisted: yes (Claude Code)
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.