feat(libSceNKWebKit): implement floating-point String formatting #14259
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14259"
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 CobaltMoth482 on 2026-11-01T04:53:57Z.
What
Implement five existing
libSceNKWebKitWTF::String floating-point formatting exports:String::number(double)andString::number(float);String::numberToStringFixedWidth(double, unsigned);String::numberToStringFixedPrecision(..., TrailingZerosTruncatingPolicy)overloads.Shortest formatting uses the original floating type with locale-independent
to_chars, then ECMAScript decimal/exponent formatting. Fixed-width and significant-precision formatting round the exact IEEE binary value using integer decimal arithmetic. Existing String allocation/refcount ownership is reused. No new dependency or copied third-party production source is added.Public behavior references: WebKit dtoa.cpp at 0756854 and the older integer policy declaration. This does not establish the console binary's version or ABI.
Progress on base
6fe120d11ba3b92c56ade1bb783e211d5dc0949e: 1152 → 1157 / 11248 implemented functions, 10.24182% → 10.28627%, +0.044452 percentage points. These are proposed changes, not merged totals. Removed the same five stale debt inventory rows and adjusted the inventory throwing count 7573 → 7568.Known limits: native Windows and console execution are unverified. Finite fixed-width requests above INT_MAX safely return an empty String rather than entering the source converter's invalid negative-count path; this is documented separately from source-equivalence claims.
Tested
Linux x86-64, GCC 14.2, pinned real NKWebKit/Jsc/QuickJS module build:
libSceNKWebKittarget was also built successfully. Full-treenkwebkit_wtfnumberformatting_testsand existingnkwebkit_wtf_testspass with the repository's real libc/libkernel/Jsc dependencies. Other optional PRX targets and guest titles were not tested; no console execution is implied.No title/homebrew or GPU execution was performed. Independent source snapshots, hashes, test commands and logs are retained as external evidence, not repository notes.
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 CnRJay on 2026-11-01T19:49:30Z.
Review: COMMENTED
Withdrawn. This review applied a title-ID/log requirement that is not in CONTRIBUTING (
Unblocks: noneis allowed), and it contained no code review.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-02T07:05:22Z.
Review: COMMENTED
Reviewed — no blocking findings; the formatting source was read in part
This implements floating-point
Stringformatting for the NKWebKit WTF exports: a shortest-round-trip digit generator, the special values, and the number-to-string path behind the exports. The hosted Windows run passedguest_nkwebkit_numbers,nkwebkit_wtfandnkwebkit_wtfnumberformatting, which exercise it. The formatting algorithm is large, and I read only its start in this pass, so this review does not verify the digit generation.What I ran
99faad73cb09d60fb324c154f7cdb983f8aca76d; basef1a7b02028ae50adaf6c5aaaef892a51841b25bf. 7 files, +673/-31:src/WtfNumberFormatting.cpp(new),include/WtfNumberFormatting.hpp(new),libSceNKWebKit.hpp,Export.cpp,include/InventoryExports.hpp,include/WtfExports.hpp, andtests/WtfNumberFormatting.cpp(new).WtfNumberFormatting.cpp(the includes, theDecimalstruct,ResultandSpecial). Did not read the digit generation, the exports, or the test.guest_nkwebkit_numbers(Test #2345),nkwebkit_wtf(Test #2352) andnkwebkit_wtfnumberformatting(Test #2353). The run reports 2588 of 2588.Results
nkwebkit_wtfnumberformatting(hosted, Windows)Test #2353, 0.04 sguest_nkwebkit_numbers(hosted, Windows)Test #2345Specialfunction returns the expected textRead-only check output
Precheck was not run: no PR-head code is run here. Diff check: passed. Conventions: passed. ABI audit: passed (10105 symbols). Stack check: passed, no errors. Hosted:
gh api repos/boykopovar/AnyPS5/commits/99faad73cb09d60fb324c154f7cdb983f8aca76d/check-runs, and the Windows job log.Negative control
Not run here. A negative control needs a local build, and code from this head is not run here.
Findings
Blocking
None from the code read.
Non-blocking
Sources
github.com/boykopovar/AnyPS5@99faad73cb/core/libs/prx/libSceNKWebKit/src/WtfNumberFormatting.cppgithub.com/boykopovar/AnyPS5@99faad73cb/core/libs/prx/libSceNKWebKit/tests/WtfNumberFormatting.cppwindowson99faad73cbNot verified
To get this to a good state
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-11-06T16:18:39Z.
Review: CHANGES_REQUESTED
Thanks for the work. The code reads fine (no code comments, inventory rows and stubs removed together, the test pins edge rows), but the branch conflicts with
mainindocs/dev/debt/libSceNKWebKit.mdand "Allow edits from maintainers" is off, so we can't rebase it for you.main. @B-Howell already prepared the resolved merge:git fetch https://github.com/B-Howell/AnyPS5 unstick/pr-14259 && git merge --ff-only FETCH_HEAD.docs/dev/debt/libSceNKWebKit.mdon the merged tree.Enabling "Allow edits from maintainers" would let us do this kind of rebase ourselves next time.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-14T09:43:07Z.
Review: APPROVED
Reviewed — looks good
The formatter implementation and reviewed host-side fixture show no verified blocking defect at head
82ad7e0857746344a4155e7bd28f024145aa0755; native Windows and console behavior remain unverified.What I ran
No commands were run. I inspected the prepared diff and used
repo_read.pyto read targeted source and test ranges at the pinned head. The author reports extensive Linux GCC and Clang builds and tests in the PR description; I did not run those checks.Results
Findings
Blocking
None identified in the files and ranges read.
Non-blocking
None.
Not verified
Did not run builds or tests, verify the author-reported results, or confirm native Windows or console ABI and behavior. Read changed
WtfNumberFormatting.hpp,libSceNKWebKit.hpp,WtfNumberFormatting.cpp,WtfNumberFormattingtests,Export.cpp,InventoryExports.hpp, anddocs/dev/debt/libSceNKWebKit.md, plus relatedWtfStringAbi.hpp,WtfString.cpp,CMakeLists.txt, andWtfExports.hppranges. The full text of the changed export inventory and debt document was excluded from the review bundle; only relevant ranges were read throughrepo_read.py. No other changed files were excluded from review.To get this to a good state
Nothing is required; the PR description already records the outstanding platform and console verification limits.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T13:16:42Z.
Review: COMMENTED
Checked the branch sources and built the focused tests against the existing Linux runtime.
WtfNumberFormattingpassed.AI-assisted: yes.
Pull request closed