feat(libc): wire the collate<char> facet vtable #11166
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/11166"
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 00xDisaster on 2026-10-25T20:22:44Z.
What
Fill the exported
collate<char>vtable with the facet methods that already backg_collateVtable. #9979 added the nine-slot_ZTVSt7collateIcE_nid_postfixdata object (NIDruZtIwbCFjk) with the console's 72-byte layout, but every slot was zero, so a title that calledcompare,transformorhashthrough the exported vtable faulted. Slots 2 through 8 now holdDestroyCollate,DeleteCollate,RetainFacet,ReleaseFacet,CollateCompare,CollateTransformandCollateHash; slots 0 and 1 stay zero for offset-to-top and typeinfo, as they were._Getcatstill installsg_collateVtable, so both the exported object and facets built by_Getcatcall the same implementations.The exported object is still writable data and supplies no RTTI typeinfo; the debt entry records both. This does not touch
time_putornum_put: open #11044 and #11054 implement those different virtuals, and no open PR currently fills this array. #10158 and #10200 add the distinct adjacentmessagesandnumpunctvtable declarations in the sameLocaleSupport.cppblock; both are currentlyCONFLICTING, so this PR merges first and they rebase afterwards, keeping all three declarations. No dependency is required.Tested
Linux CachyOS 7.3.0-4-cachyos, GCC 16.2.1. Base
upstream/main74ac0e7912a5eaa453fff872f4d4fe803154b08c; headc66f61ff5259e3d05eab0e35c99b948d2b62903b.cmake --build build --target guest_locale_tests --parallel: passed.ctest --test-dir build -R '^guest_locale$' --output-on-failure: 1/1 passed.guest_localenow callscompare,transform,hash,retainandreleasethrough&_ZTVSt7collateIcE_nid_postfix[2], checks the compare ordering and FNV hash result, and checks that slots 0 and 1 remain zero while slots 2 through 8 are non-null.tools/check_conventions.py --base upstream/main --head HEADandgit diff --check: clean.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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T20:29:29Z.
Review: COMMENTED
Reviewed exact head
c66f61ff5259e3d05eab0e35c99b948d2b62903b.The exported nine-slot object points at the same collate methods as the existing facet vtable, leaves offset-to-top/typeinfo zero as documented, and the test invokes all populated slots through the exported object. The debt update correctly records the remaining RTTI limitation and the evidence boundary.
Checks:
git diff --check upstream/main...HEADpasses and the conventions, eligibility, intake, labels and report checks pass. The author reportsguest_locale_testsandguest_localepassing locally. The current hosted relinker and register-context jobs pass; macOS relinker/register-context and write-watch jobs are still queued, while the general Linux/Windows jobs are skipped by the path policy. I did not run a local build in this review.