Repository navigation
feat(libc): implement the std::__sce_v2 num_get virtuals for wchar_t integers, bool and pointers - #16924
feat(libc): implement the std::__sce_v2 num_get virtuals for wchar_t integers, bool and pointers#16924Danigamer05 wants to merge 16 commits into
Conversation
…irtuals for char The facets built by _Makeloc threw NotImplemented from every virtual except the lifecycle slots. The char ctype, numpunct and codecvt facets now answer as the console's libc.prx does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…irtuals for wchar_t Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…get-char-20261107
Main removed GuestStringInlineCapacity, GuestStringCapacityMask and GuestStringLargeAllocation from LocaleSupport.cpp, so the versioned facets' strings use GuestLocale::StringInlineCapacity, GuestLocale::StringCapacityMask and GuestStringStorage::Deallocate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…egers, bool and pointers Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-facet-virtuals-20261105
Main removed GuestStringInlineCapacity and GuestStringCapacityMask from LocaleSupport.cpp, so AssignSceV2String uses GuestLocale::StringInlineCapacity and GuestLocale::StringCapacityMask. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t/libc-sce-v2-num-put-char-20261106
Main removed GuestStringInlineCapacity and GuestStringLargeAllocation from LocaleSupport.cpp, so TakeSceV2String tests GuestLocale::StringInlineCapacity and frees through GuestStringStorage::Deallocate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sce-v2-num-put-wide-20261107 Brings in current main through boykopovar#16516. The templated TakeSceV2String frees through GuestStringStorage::Deallocate, since main removed GuestStringLargeAllocation from LocaleSupport.cpp. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sce-v2-num-get-char-20261107
…integers, bool and pointers Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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.
|
|
Windows check of head Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release. The hosted Windows check does not run these tests on pull requests.
AI-assisted: yes. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tested
AI-assisted: yes (Claude Code); the runs are automated, this summary was written from their reports. |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — no blocking findings
The review artifacts and repository source were not accessible in this session, so the change could not be verified.
What I ran
Not run; repo_read.py was unavailable.
Results
| Check | Result | Note |
|---|---|---|
| Change review | not run | Source could not be read |
Findings
Blocking
None verified.
Non-blocking
None.
Not verified
The description, commits, diff, manifest, changed files, and repository context were not read. No checks were run.
To get this to a good state
Nothing is required.
ligmaSec
left a comment
There was a problem hiding this comment.
I ran guest_sce_v2_num_get_wide and guest_sce_v2_num_get_char with c95d56ec56 and its prerequisite stack integrated into a Linux release build. Both passed. The wide fixture exercises the integer, boolean and pointer slots added here, and the char fixture checks the stacked implementation alongside it.
AI-assisted: yes.
What
Builds on #16919: this branch contains its commits, and through it #16560, #16516, #16214, #16178 and #15923, with current
mainmerged in. Until they merge, only the last commit is this PR's change.Implement the same eight
do_getvirtuals ofstd::__sce_v2::num_get<wchar_t>that #16919 implements forchar:bool,unsigned short,unsigned int,long,unsigned long,long long,unsigned long longandvoid*. Before this PR, each of them threwNotImplemented_nid_no_patch. Thefloat,doubleandlong doubleslots still throw. These slots are not exports, so this PR adds no NID.The behavior comes from the
libc.prxbundled with PPSA03671 v01.001.005 (J03848509, SHA-256483961e086b8a1fffa8138b3c0badf798987fb5f35ec908d828946408be2d8a6), vtable0x18CDD0, field reader0xE3350. The module's wide functions follow the same steps as thecharones, so the code of #16919, already a template on the character type, is now instantiated for 16-bit characters too:0xa, reads two bytes from the get area and moves its pointer by two bytes.underflowanduflowend the input only on -1, so U+FFFF is a character.ctype<wchar_t>::widen, and every comparison, with them, with the thousands separator and with theboolnames, uses all 16 bits.numpunct<wchar_t>gives a 16-bit separator and 16-bit names, whilegroupingstays narrow.The
_Makelocandnum_getdebt entries now cover both facets.Tested
Windows 11, MinGW GCC 15.2, Release, head on top of #16919. Not run on Linux or macOS, not run in a title.
guest_sce_v2_num_get_wide: every implemented slot, characters whose low byte is a digit, a sign or the separator, U+FFFF from the get area and fromunderflow, the direct count, a held character, non-ASCII separators andboolnames, and digits from a replacedctype<wchar_t>. 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)._Makeloc, with 16-bit texts that mix ASCII, characters with a high byte and U+FFFF, random 16-bit separators, andboolnames with non-ASCII characters. It compares the same fields as forchar, with the get pointer in bytes._Sto*xredirected to this library's: 400,000 calls over 2 seeds, 0 differences._Sto*x: 200,000 calls, 0 differences.charregression on the harness of feat(libc): implement the std::__sce_v2 num_get virtuals for char integers, bool and pointers #16919: 100,000 calls, 0 differences.underflowresult, get area read, digit lookup, sign, separator,boolnames, end of input). The harness catches all 8. The first test run missed 3, so the test was strengthened and those were rerun: it now catches all 8 too.check_conventions,git diff --check: clean. Merges cleanly withmain.pr_overlapreports no open PR with the same functions; it could not compare 36 PRs that conflict withmainon shared files. Of those, the 5 that touchLocaleSupport.cpp(fix(libs): share Sony CRT handler and lconv state between libc and libSceAmpr #7081, feat(libc): add std::__sce_v2::_Random_device, _Fiopen and setw #9526, feat(libc): wire the codecvt<wchar_t,char> facet vtable #11172, feat(libc): export the money_put facet vtable as data #12518, feat(libc): export the wide time_put facet vtable as data #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)