refactor(libc): read toupper and tolower from the case tables #14022
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14022"
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 romainhedouin on 2026-10-31T16:18:07Z.
What
toupperandtolowerlooked up the C++ locale on every call. The same mapping is already ing_upperTableandg_lowerTable, so they now read from those tables. The results are the same.Tested
tools/check_conventions.pypasses.GuestCharacterandGuestRuneLocaletests, and any game. This Mac can't run the x86-64 build.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-31T16:21:25Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
The source change is consistent with the existing classic-locale case tables, but this
perfPR does not include the performance report required by the repository.What I ran
Reviewed head
2d5f3cad64a75872bbb78ec6929ac526f99e5615against base474030e58424fefdb65e5df9f3820810fbb4553c; the base is an ancestor of the head and the merge preview is clean. Environment: Debian GNU/Linux 12, Python 3.11.2, GCC 12.2.0. No project build or compilation was run.Results
conventions,intake, andlabelspassed; no build or tests ranConvertCharactervalidates the argument, preserves negative values, then indexes the existing lower/upper tables atvalue + 1Unedited command output
The
gh pr checksoutput on this head was:Findings
Blocking
perf(libc): ..., and the description reports timing gains, but it contains no pairedaps5-summary.jsonllines frommainand this change for the same scene and machine, no corresponding traces, and notools/trace_digest.pyoutput. Please add that matched report, or remove the performance claim and retitle the PR to reflect a non-performance change.Non-blocking
Sources
474030eConvertCharacterimplementation at head2d5f3cadNot verified
To get this to a good state
Add the matched baseline/change summaries, trace files, and digest output, or remove the performance claim and retitle the PR. I will rerun the relevant checks and review the updated head.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T16:54:27Z.
Review: APPROVED
Re-checked — new head, looks good
The updated refactor title and description no longer make an unsupported performance claim, and the one-line mapping preserves the existing validated classic-locale table behavior.
What I ran
Reviewed head
c2e509fa02e6be7ae636fc06e94737494be92d4dagainst base474030e58424fefdb65e5df9f3820810fbb4553c; the live merge preview is clean. Environment: Linux x86_64, Python 3.11.2, Git 2.39.5. I did not invoke a compiler or build locally.I also inspected the exact one-line diff and
MakeCaseTable/ConvertCharacterat the PR head. Negative values are returned before indexing; values 0–255 map to indices 1–256 of the 257-entry table.Results
474030e58424fefdb65e5df9f3820810fbb4553cconventionsandlabelspassed on the exact head; no build or test job ranUnedited local precheck output
Conventions stdout:
ABI helper stderr:
Test-quality helper stderr:
The precheck recorded
diff_check,conventions_and_pr_template, andlive_dependency_and_mergeability_checkas passed. The successful diff check produced no output.Findings
Blocking
None found in the updated head.
Non-blocking
None.
Sources
Not verified