feat(libc): implement collate<wchar_t>::_Getcat #2333

Closed
Darkeox34 wants to merge 1 commit from upstream-pr/2333 into main
Darkeox34 commented 2026-10-09 15:43:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Darkeox34 on 2026-10-09T15:43:01Z.


What

Implements collate<wchar_t>::_Getcat
(_ZNSt7collateIwE7_GetcatEPPKNSt6locale5facetEPKS1__nid_postfix) in libc:

  • Implements the wide-character collation facet collate<wchar_t> for the classic C locale.
  • Adds WideString and WideCollateVtable supporting comparison, string transformation (with
    7-element inline capacity) and 64-bit FNV-1a hashing over 16-bit guest wide characters.
  • Expands unit tests in GuestCollate.cpp to verify facet initialization, comparison,
    transformation, hashing, and reference counting lifecycle.
  • Documents collate<wchar_t>::_Getcat in TechnicalDebt.md.

Tested

  • Validated with python tools/check_conventions.py --base upstream/main.
  • Verified progress report with python tools/progress.py.
  • Covered by GuestCollate test suite.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in
    TechnicalDebt
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4802642053 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2333). Originally posted by [Darkeox34](https://github.com/Darkeox34) on 2026-10-09T15:43:01Z. --- ### What Implements `collate<wchar_t>::_Getcat` (`_ZNSt7collateIwE7_GetcatEPPKNSt6locale5facetEPKS1__nid_postfix`) in `libc`: - Implements the wide-character collation facet `collate<wchar_t>` for the classic C locale. - Adds `WideString` and `WideCollateVtable` supporting comparison, string transformation (with 7-element inline capacity) and 64-bit FNV-1a hashing over 16-bit guest wide characters. - Expands unit tests in `GuestCollate.cpp` to verify facet initialization, comparison, transformation, hashing, and reference counting lifecycle. - Documents `collate<wchar_t>::_Getcat` in `TechnicalDebt.md`. ### Tested - Validated with `python tools/check_conventions.py --base upstream/main`. - Verified progress report with `python tools/progress.py`. - Covered by `GuestCollate` test suite. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in TechnicalDebt - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-09 16:32:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T16:32:07Z.


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.

Pull request Conflicting files (lines on main) Same exports Same new files
#2185 docs/dev/TechnicalDebt.md L351
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6085028500 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2333#issuecomment-6085028500). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-09T16:32:07Z. --- <!-- pr-overlap --> 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**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | #2185 | `docs/dev/TechnicalDebt.md` [L351](https://github.com/boykopovar/AnyPS5/blob/8b393b6e9a8ade9188d4f74a0293e0efd9828597/docs/dev/TechnicalDebt.md#L351) | | |
Kikoarl commented 2026-10-09 17:52:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Kikoarl on 2026-10-09T17:52:52Z.


Tested on Linux (CachyOS x86_64, Intel RPL-S iGPU / Mesa 26.3.0-devel / Vulkan 1.4.363, GCC 16.2.1) at c49df772:

  • Build: Built cleanly in RAM (/tmp/anyps5_build) with zero warnings/errors.
  • Conventions: python3 tools/check_conventions.py --base origin/main --head HEAD -> PASS (0 errors).
  • Verification: Verified GuestCollate.cpp test suite. Correctly implements wide-character collation categorization for libc++ runtime.

LGTM!

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6086308402 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2333#issuecomment-6086308402). Originally posted by [Kikoarl](https://github.com/Kikoarl) on 2026-10-09T17:52:52Z. --- Tested on Linux (CachyOS x86_64, Intel RPL-S iGPU / Mesa 26.3.0-devel / Vulkan 1.4.363, GCC 16.2.1) at `c49df772`: - **Build**: Built cleanly in RAM (`/tmp/anyps5_build`) with zero warnings/errors. - **Conventions**: `python3 tools/check_conventions.py --base origin/main --head HEAD` -> **PASS (0 errors)**. - **Verification**: Verified `GuestCollate.cpp` test suite. Correctly implements wide-character collation categorization for libc++ runtime. LGTM!
popcoder565 commented 2026-10-09 19:04:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by popcoder565 on 2026-10-09T19:04:01Z.


Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head c49df772, merged onto main f8c2f072 in one build with 9 other PRs that had no Windows run.

  • This PR's tests pass: guest_collate.
  • Full ctest in that build: 512 of 513. The one failure is agc_driver_depth_fast_clear_submit from #2325, which fails intermittently on its own too. The test comes from #425, where I reported it.

No title was run.

🤖 Addressed by Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6087423161 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2333#issuecomment-6087423161). Originally posted by [popcoder565](https://github.com/popcoder565) on 2026-10-09T19:04:01Z. --- Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head `c49df772`, merged onto `main` f8c2f072 in one build with 9 other PRs that had no Windows run. - This PR's tests pass: `guest_collate`. - Full ctest in that build: 512 of 513. The one failure is `agc_driver_depth_fast_clear_submit` from #2325, which fails intermittently on its own too. The test comes from #425, where I reported it. No title was run. _🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
oneandonlydean commented 2026-10-09 20:12:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-09T20:12:07Z.


Closing: no title is shown to reach collate<wchar_t>::_Getcat on main. Reopen with the title ID and the log line where it stops if one does.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6088473197 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2333#issuecomment-6088473197). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-09T20:12:07Z. --- Closing: no title is shown to reach `collate<wchar_t>::_Getcat` on main. Reopen with the title ID and the log line where it stops if one does.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!2333
No description provided.