feat(libc): implement the std::__sce_v2 num_get virtuals for wchar_t floating point #16949
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/16949"
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 Danigamer05 on 2026-11-08T00:22:14Z.
What
Builds on #16924 and #16944, which both build on #16919: this branch merges the two, and through them #16560, #16516, #16214, #16178 and #15923, with current
main. The merge resolves the two debt entries both rewrite. Until they merge, only the last commit is this PR's change.Implement the
float,doubleandlong doubledo_getvirtuals ofstd::__sce_v2::num_get<wchar_t>, the last slots of the facet that still threwNotImplemented_nid_no_patch. These slots are not exports, so this PR adds no NID.The
libc.prxbundled with PPSA03671 v01.001.005 (J03848509, SHA-256483961e086b8a1fffa8138b3c0badf798987fb5f35ec908d828946408be2d8a6) reads these fields forwchar_t(0xE2530,0xE2780,0xE29D0) with the same readers as forchar, on 16-bit characters. So this PR only lets thewchar_tvtable use the templated functions of #16944, which were limited tocharuntil it could be checked. The digits, signs,x,e,pand the decimal point come fromctype<wchar_t>andnumpunct<wchar_t>, and every comparison uses all 16 bits.Tested
Windows 11, MinGW GCC 15.2, Release, head on top of #16924 and #16944. Not run on Linux or macOS, not run in a title.
guest_sce_v2_num_get_widenow also covers the three slots: decimal and hex fields,hexfloatforlong double, characters whose low byte is a digit,e,Eor the point, and a non-ASCII separator and decimal point for both readers. It passes, as doguest_sce_v2_num_get_char,guest_sce_v2_num_put_char,guest_sce_v2_num_put_wide,guest_sce_v2_char_facet_virtuals,guest_sce_v2_makeloc,guest_sce_v2_locale,guest_sce_v2_locale_basics,guest_sce_v2_locimp_references,guest_sce_v2_facet_ids,guest_locale,guest_sce_v2_exceptions,guest_sce_v2_string_to_integerandpublic_headers(14 of 14).hexfloaton a quarter of the calls.float(76) ordouble(5), as forchar.check_conventions,git diff --check: clean. Merges cleanly withmain.pr_overlapreports no open PR with the same functions or conflicting code; it could not compare 34 PRs that conflict withmainon shared files, and the 4 of them that touchLocaleSupport.cpp(#9526, #11172, #12518, #12704) do not add these virtuals.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-11-20T11:49:48Z.
Review: COMMENTED
Reviewed — comments
A formal decision is not justified because the changed-file audit is incomplete and I could not run the checks in this environment.
What I ran
Reviewed head
100ffa6068237f998d6aebac591e7efa575b8d30using targeted reader calls. I ran no commands or tests. The author reports Windows 11 and MinGW GCC 15.2 checks; those results were not independently verified.Results
Findings
Blocking
No verified blocking finding in the inspected code.
Non-blocking
None.
Not verified
Read the review description, commits, manifest, selected diff ranges, the full
GuestSceV2NumGetWide.cpp, changed lines inGuestLocale.hpp, and targetedLocaleSupport.cppsections. The full diff and remaining changed code were not read:CMakeLists.txt,GuestSceV2CharFacetVirtuals.cpp,GuestSceV2NumGetChar.cpp,GuestSceV2NumPutChar.cpp,GuestSceV2NumPutWide.cpp, anddocs/dev/debt/libc.md. Tests, prechecks, and platform behavior were not verified.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T07:19:28Z.
Review: COMMENTED
Reviewed — comments
Nothing blocks this review; the implementation and tests were not fully read, so a formal merge decision is not justified.
What I ran
5076834190f592df65074ddd3e98aee1d430e443.Results
Findings
Blocking
None verified.
Non-blocking
None.
Not verified
The full implementation and all added tests were not read. The changed files listed in the bundle are
core/libs/prx/libc/CMakeLists.txt,core/libs/prx/libc/include/GuestLocale.hpp,core/libs/prx/libc/src/LocaleSupport.cpp,core/libs/tests/GuestSceV2CharFacetVirtuals.cpp,core/libs/tests/GuestSceV2NumGetChar.cpp,core/libs/tests/GuestSceV2NumGetWide.cpp,core/libs/tests/GuestSceV2NumPutChar.cpp,core/libs/tests/GuestSceV2NumPutWide.cpp, anddocs/dev/debt/libc.md. The review bundle lists all nine as included; only excerpts of the diff were inspected, and no repository files were read throughrepo_read.py. Tests, CI, and console behavior were not independently verified.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T13:12:40Z.
Review: COMMENTED
Built the branch’s locale implementation and matching headers against the existing Linux runtime. The focused
GuestSceV2NumGetWidefixture passed.AI-assisted: yes.
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.