feat(libSceIcu): implement Unicode decimal digit helpers #15346
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15346"
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 AasishDairelSahayaGrinspan on 2026-11-03T02:06:31Z.
What
Implement libSceIcu's Unicode decimal-digit helpers, replacing the two unconditional stubs with generic decimal-range lookup and radix-aware ASCII letter handling. Add deterministic coverage for BMP, supplementary-plane, invalid, and radix-boundary inputs.
Tested
macOS: direct C++20 build and execution of CharacterDigits.cpp plus tests/CharacterDigits.cpp; python3 tools/check_conventions.py --base origin/main. Full CMake/CTest was not run because this checkout has missing third-party submodules (SDL2, FFmpeg, FreeType, libusb, zstd, Opus, mimalloc, glslang) and an incomplete pre-existing LibAtrac9 submodule.
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 fileImported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-03T02:35:43Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
At head
d662d75334e8a548d30dd36580acc835d1aaba08,u_digitomits ICU’s fullwidth Latin digit ranges, and the debt file still describes the two implemented functions as throwing stubs.What I ran
7feb37ee3e30e10139b483fb4df689d5b5b69ab8.u_digitimplementation at the source permalink below.Results
Precheck and command output
The helper launch errors were:
Filtered ABI audit output:
NID/hash assertions from
tools/nid_names.py:Hosted check output:
Negative control
Not run. The added C++ test requires a built exact-head binary; I did not build or run it.
Findings
Blocking
CharacterDigits.cpp,u_digit: after decimal lookup, the implementation recognizes only ASCIIA-Zanda-z. ICU also maps fullwidth Latin letters. Thus U+FF21 at radix 16 and U+FF5A at radix 36 return-1here instead of 10 and 35. Add both ranges and regression assertions, including rejection when the fullwidth letter’s value equals the radix.Non-blocking
docs/dev/debt/libSceIcu.mdstill says the affected functions are no-argument throwing stubs and reports 93/73 stub counts. Update the counts and describe the new implementation’s ICU source and Unicode data revision, while retaining the stated limits on console ABI, firmware compatibility and runtime behavior.Sources
u_digitimplementation at this PR headu_digitbehavior at pinned commitNot verified
To get this to a good state
Add both fullwidth ranges and focused assertions, update the debt entry/counts with the source and Unicode data revision, then rerun
python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 15346andctest --test-dir build -R guest_icu_character_digits --output-on-failureon the new head. I will recheck the exact SHA and applicable checks after the update.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-03T08:19:06Z.
Review: APPROVED
Re-checked — new head, approved
The new head adds the missing fullwidth Latin cases and regression assertions; the current-base preview and all applicable hosted checks pass.
What I ran
Reviewed all six changed files in PR #15346 at head
de56b01de9449a5383d1b2bda1b32785adb142beagainst PR base7feb37ee3e30e10139b483fb4df689d5b5b69ab8. The latest stack check previewed this head cleanly against currentmain4f41f4c375f5abb487dbd184fbc150f31994d762. Environment: Debian 12 x86_64, Python 3.11.2, Git 2.39.5, GCC 12.2.0; I did not compile locally. The author reports a direct C++20 build and run of the new test at this exact head; that is author-reported evidence, not a run I performed.Results
guest_icu_character_digits.main.Relevant unedited check output
The precheck report's overall status was:
Its optional ABI/test-quality scripts were absent from the isolated PR snapshot, and its first stack preview became stale while
mainadvanced. I ran the ABI audit from the review workspace and reran the stack check; the latter reports a fresh, clean preview. The exact-head test-quality heuristic output was:The relevant CMake lines explicitly register the target:
Exact hosted check summary:
Negative control
I did not alter the implementation or run this test against the base revision. The author-reported run exercises the new test but is not a negative control.
Findings
Blocking
None found in the reviewed head.
Non-blocking
The Windows job log could not be retrieved through
gh, so I cannot independently confirm from that log that the new target ran there. The author reports a direct C++20 build and execution of the exact-head test. Console behavior and firmware-specific Unicode data remain unverified, as the debt entry states.Sources
u_digitreferenceNot verified
I did not run a local C++ build, CTest, or negative control, and I did not verify behavior on console hardware. The hosted Windows log was unavailable through the CLI; Linux and specialized jobs were skipped. The standalone C++20 result is reported by the PR author.
To get this to a good state
No further change is needed for this head. If it changes, I will inspect the new diff and rerun the same no-build checks and relevant tests.