Repository navigation
feat(libSceIcu): implement the enumeration dispatch exports - #11132
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Progress report (89a7f98 → 0570125)📈 System libraries: 26.8% (+0.09%, +45 implemented functions) ✅ 45 implemented
Changed libraries (implemented exports)
|
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed the PR-specific Enumeration.cpp and UEnumeration layout against pinned ICU 78.1 uenum.cpp/uenumimp.h. Null-enumeration and pre-set-error short circuits, missing-callback status, the next dummy length slot, unext null forwarding, and close/baseContext free ordering match the source. The callback types use the guest calling convention and the 56-byte layout matches ICU. I syntax-compiled the changed dispatcher and GuestIcuEnumeration.cpp locally with GCC 12.2 (g++ -std=c++20 -Icore/libs -fsyntax-only); the PR reports Windows guest_icu_enumeration and ctest -R "guest_icu_|patched_libraries" passing. Hosted eligibility, conventions, intake, labels and report pass; product build/test jobs are skipped. This is stacked on #11122, which remains a merge-order dependency.
|
@mantavisual the four
The debt entry's "13.42 exports no |
|
Tested head
AI-assisted: yes (Claude Code); results above were run on this machine. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Remove the 36 stubs whose NIDs open PRs boykopovar#10962-boykopovar#10967, boykopovar#11115, boykopovar#11118, boykopovar#11122, boykopovar#11132 and boykopovar#11136 add to libSceIcu, leaving 112.
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
…field-position # Conflicts: # core/libs/prx/libSceIcu/CMakeLists.txt # docs/dev/debt/libSceIcu.md
…-point-sets # Conflicts: # core/libs/prx/libSceIcu/CMakeLists.txt # docs/dev/debt/libSceIcu.md
…patch # Conflicts: # core/libs/prx/libSceIcu/CMakeLists.txt # docs/dev/debt/libSceIcu.md
…ric-helpers # Conflicts: # core/libs/prx/libSceIcu/libSceIcu.hpp # docs/dev/debt/libSceIcu.md
…rror-name # Conflicts: # core/libs/prx/libSceIcu/Version.cpp # core/libs/prx/libSceIcu/Version.hpp # core/libs/prx/libSceIcu/libSceIcu.hpp
…field-position # Conflicts: # core/libs/prx/libSceIcu/libSceIcu.hpp
…ric-helpers Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # core/libs/prx/libSceIcu/CMakeLists.txt
…ric-helpers Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # core/libs/prx/libSceIcu/CMakeLists.txt # docs/dev/debt/libSceIcu.md
…rror-name Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # core/libs/prx/libSceIcu/CMakeLists.txt
…field-position Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # core/libs/prx/libSceIcu/CMakeLists.txt
…-point-sets Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # core/libs/prx/libSceIcu/CMakeLists.txt # docs/dev/debt/libSceIcu.md
…patch Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # core/libs/prx/libSceIcu/CMakeLists.txt
What
Implements the four
uenum_exports that firmware 13.42'slibSceIcuhas (BunnyFl's export list):uenum_close,uenum_count,uenum_nextanduenum_unext. They don't enumerate anything themselves. They dispatch through the callbacks in aUEnumeration, the object ICU's enumeration producers return; 13.42 exports producers such asucal_openTimeZones,ucol_getKeywordValuesanducurr_openISOCurrencies.Behaviour follows ICU 78.1's uenum.cpp over the
UEnumerationlayout in uenumimp.h:baseContext,context, then theclose,count,uNext,nextandresetcallbacks, 56 bytes. The callbacks are called with the guest ABI (APS5_VABI), so an enumeration built by guest code or by a future producer here works the same way.uenum_count,uenum_nextanduenum_unextreturn −1 or null for a null enumeration without reading the status, and for an error that is already set without calling anything. If the callback is missing, they setU_UNSUPPORTED_ERROR. Otherwise they return whatever the callback returns, and the callback may change the status.uenum_nextpasses a local length slot when the caller gives a nullresultLength.uenum_unextforwards the null as ICU does.uenum_closedoes nothing for null. With aclosecallback, it freesbaseContext(if set) and then callsclose. Without one, it frees only the enumeration. Freeing uses the guestfree, because ICU'suprv_freedefaults tofreeand 13.42 exports nou_setMemoryFunctionsto change it.A null status with a nonnull enumeration throws
APS5_INVALID_ARG_EX, since ICU dereferences it.uenum_resetand the*Defaulthelpers are not in 13.42's exports and are not added. The new debt entry records this, and that no export here creates an enumeration yet.Depends on #11122 (stacked on it). The agreed ICU order is #11013 → #10961 → … → #10967 → #11088 → #11115 → #11118 → #11122, and this PR comes after #11122. Until those merge, the diff also shows their commits. This PR's own change is the last commit,
c1d9fa2f64.Tested
Windows 11 Pro 23H2, WinLibs GCC 15.2.0 r7, Release,
BUILD_TESTING=ON, on #11122 (0bcb2ae1aa).guest_icu_enumeration, using enumerations whose callbacks areAPS5_VABIfunctions:count(the callback's status change is kept),nextwith and without a length slot,unext(including a forwarded null length), the end of the enumeration, andclose.U_UNSUPPORTED_ERROR, with the length left alone).closecallback, onlybaseContextis freed andcloseis called. Without one, only the enumeration is freed and itsbaseContextis left alone, as in ICU.ctest -R "guest_icu_|patched_libraries": all 7 pass. The NID-patchedlibSceIcu.prxbuilds.tools/progress.py --module libSceIcu: 50 implemented, 0 stubs.tools/check_test_registration.py build: 1346 test executables, none built and not run.python3 tools/check_conventions.py --base origin/mainpasses. Overlap: no open PR implements or names anyuenum_function (checked 2026-10-25).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)