Repository navigation
Conversation
do_compare, do_transform and do_hash call libc's wide collate implementations directly; compare, transform and hash dispatch through the facet's vtable as [locale.collate.members] requires. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Progress report (6bf3a19 → 619f6c7)📈 System libraries: 29.86% (+0.01%, +6 implemented, -6 removed functions) ✅ 6 implemented
🗑️ 6 removed
Changed libraries (implemented exports)
|
|
Windows check of head Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release. The hosted Windows check does not run this test on pull requests. The host
AI-assisted: yes. |
✅ AMD GPU test: passedPR head
Unstable on main (5, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (11, not counted against this PR)Validated but not compared (1, not in the main baseline's validation pass)Validation IDs already present on main (8 IDs in 799 tests)Skipped (61)ReproduceAutomated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
# Conflicts: # core/libs/prx/libc/include/GuestLocale.hpp
|
Thanks for the Windows and AMD reports on earlier head Could a reviewer look at the wide-character collate wrappers on AI-assisted: yes (Codex). |
Co-Authored-By: Codex <noreply@openai.com>
What
Implements the six
std::collate<wchar_t>members thatlibSceLibcInternalexported asNotImplementedstubs (Err.cpp,Pending3_049..054):roztnFEs5Escollate<wchar_t>::do_compareWideCollateCompareZxe-nQMgxHMcollate<wchar_t>::do_transformWideCollateTransformcWaCDW+Dc9Ucollate<wchar_t>::do_hashWideCollateHashn-3HFZvDwBwcollate<wchar_t>::comparedo_compare81uX7PzrtG8collate<wchar_t>::transformdo_transformentYnoIu+fccollate<wchar_t>::hashdo_hashReferences:
compare"Returns:do_compare(low1, high1, low2, high2)", and likewisetransformreturnsdo_transform(low, high)andhashreturnsdo_hash(low, high). The public members therefore dispatch through the facet's vtable, as the existingcollate<char>::transforminLocaleSupport.cppalready does (reinterpret_cast<const GuestLocale::CollateVtable*>(self->base.vtable)->transform(...)).do_members are the base implementations thatcollate<wchar_t>::_Getcatalready installs in the facet (g_wideCollateVtable{..., WideCollateCompare, WideCollateTransform, WideCollateHash}, withGuestWideCharacterSize = 2). They call those functions directly, not through the vtable, so a derived facet that callscollate<wchar_t>::do_compareexplicitly cannot recurse into its own override. libc now exposes that vtable tolibSceLibcInternalthroughGuestWideCollateVtable_nid_no_patch(). It has no NID, so libc's export set does not change.The members are written in a new
WideCollate.cppwith their declarations ininclude/WideCollate.hpp, which keeps them away from the lines ofApi.hppthat other open PRs edit. Their six debt entries are removed fromdocs/dev/debt/libSceLibcInternal.md. Only the C locale gets a collate facet, as before:_Getcatstill throws for any other locale.tools/progress.pycollect_libraries(): done goes from 9913 to 9919 (+6) out of 37146 on origin/main5b1d381d5a. libSceLibcInternal goes from 92 done / 1045 todo to 98 / 1039. No new todo names.Tested
New guest test
guest_libc_internal_wide_collate(core/libs/tests/GuestLibcInternalWideCollate.cpp). It checks:do_members return the base results and never reach it;Runs, same tests on both platforms (
guest_libc_internal_wide_collate, plus the existingguest_collateandguest_localeas regressions):libSceLibcInternal.prxon Windows exports all six<NID>_nid_no_patch_cutsymbols and importsGuestWideCollateVtable_nid_no_patchfrom libc.Err.cppand withoutWideCollate.cppbuilt in, the new test fails to link (undefined reference to sceLibcInternalWideCollateDoCompare_nid_no_patch, and the other five).python3 tools/check_conventions.py --base origin/main: all checks passed. Theconventions_*anddebt_splitCTest entries are self-tests of the checker scripts, not of this change, and were not run here.python3 tools/pr_overlap.py --branch feat/r2-collate-wchar: no open PR implements these exports or adds these files, andgit merge-treeagainst PR 15695 and PR 15696, the two that edit nearby lines of the libSceLibcInternalCMakeLists.txt, merges cleanly. It fails closed only because some older PRs that touchLocaleSupport.cpp,GuestLocale.hpp, the libSceLibcInternalCMakeLists.txtor its debt file conflict with main, so those files could not be compared automatically.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