feat(libSceNKWebKit): implement WTF printInternal for the remaining integer widths, float and ClockType #19841
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/19841"
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 B-Howell on 2026-11-14T02:14:48Z.
What
Implements eight existing throwing
libSceNKWebKitstubs on top of #19839, reusing itsPrintStream::printfand vtable slots:printInternal(PrintStream&, signed char),short:printf("%d", static_cast<int>(value));unsigned char,unsigned short:printf("%u", static_cast<unsigned>(value))long long:"%lld";unsigned long long:"%llu"float: forwards to thedoubleoverload ("%lf")ClockType:Wall,MonotonicandApproximateare printed throughbegin(),printInternal(const char*),end(); any other value throws where WebKit hitsRELEASE_ASSERT_NOT_REACHED()Source: pinned PrintStream.cpp, ClockType.cpp and ClockType.h.
ClockTypereuses the existingWTF::ClockTypefromWtfTimeTypes.hpp. Thebooloverload now shares the same begin/print/end helper.tools/progress.pylibraries done: 15796 to 15804 (+8, 40.15% to 40.17%).Tested
Ubuntu (WSL2), GCC, Release, Ninja.
tests/WtfPrintInternal.cppis extended: format and promoted value for each width (-128 signed char, 0xFF unsigned char, -32768 short, 0xFFFF unsigned short, INT64_MIN, UINT64_MAX), float 1.5f and 0.1f arrive as doubles with"%lf",ClockType0, 1 and 2 give"%s"withWall,MonotonicandApproximateon the streambegin()returned with onebeginand oneendcall, andClockType3 throwsstd::invalid_argumentwithout touching the stream.Without the implementation (#19839 head plus this test): the test does not build,
error: conflicting declaration of C function 'void _ZN3WTF13printInternalERNS_11PrintStreamEa(NKWebKit::WtfAbi::PrintStream&, signed char)'against the throwing stub.With it:
ctest -R '^nkwebkit_wtfprintinternal$'passed 3/3;ctest -R '^public_headers'65/65 passed.48ab60a8b3: comment-only changes to theWtfPrintStream.cppnotice (trailing space removed,git diff -wempty; source lines added).git diff --check origin/main...HEADclean andcheck_conventions.py --base origin/mainpassed.@JJenkx, Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release,
48ab60a8b3merged onto main955f51545f(report):nkwebkit_wtfprintinternalpassed 3/3, none skipped.@ycbuzi, full ctest on Windows Server 2022 and 2025 (GitHub-hosted, WinLibs GCC 15.2.0),
9487ff0c94merged into main (report): no failures beyond those on main on the same machine.e3e87ff47a: merged maind4a1472af9and removed the stale5913count line indocs/dev/debt/libSceNKWebKit.mdthat the78a67cc9b1merge kept; doc-only, not rebuilt.git diff --check origin/main...HEADclean andcheck_conventions.py --base origin/mainpassed.Debt fragment
d0a3548e35: merged mainc3d38470e0cand moved this PR's debt edits intodocs/dev/debt/changes/claude-nkwebkit-wtf-print-internal-widths.md; the debt files match main, and the fragment applied to main gives the same debt lines as the previous head.debt_fold.py --checkandcheck_conventions.py --base origin/mainpass. Documentation only, no build.Main merge
19184ba244conto main1d3c669c843: conflict only inExport.cppandinclude/InventoryExports.hpp, where #19380 removed the adjacentPrintStream::endandStackBoundsstubs and this PR removes thePrintStream::printfstub; all three stubs are dropped. WSL2 Ubuntu, GCC, Release:nkwebkit_wtf_testsandnkwebkit_wtfprintinternal_testsbuilt andctest -R '^(nkwebkit_wtf|nkwebkit_wtfprintinternal)$' --repeat until-fail:3passed.debt_fold.py --checkandcheck_conventions.py --base origin/mainpass; the debt files match main.Main merge
4a37dd6f1b1onto maine4936123117: conflict only inExport.cppandinclude/InventoryExports.hpp, where #24896 removed the adjacentprintInternal(PrintStream&, const StringImpl*)stub and this PR removes theRawPointer,ClockTypeandconst char*ones; all four stubs are dropped. #24896 also broughtWtfDumpAbi::PrintStream(src/WtfDumpStreamAbi.hpp, from #21957), sosrc/WtfPrintStreamAbi.hppnow reuses that struct and its slot numbers instead of declaring a secondPrintStream. Windows 11, WinLibs GCC 15.2.0 r7, Release:nkwebkit_wtfprintinternal_tests,nkwebkit_wtfstringdump_testsandnkwebkit_wtftimedump_testsbuilt and passed 3/3.debt_fold.py --checkandcheck_conventions.py --base origin/mainpass; the debt files match main.3fa83936ae0: merged #1983922bbab3beca(main29b14e4c5e4). Conflicts only inExport.cppandinclude/InventoryExports.hpp, where main removed theReadWriteLockstubs and this PR removes theClockTypeone; all are dropped. The merged base fragmentclaude-nkwebkit-wtf-print-internal.mdis removed on this branch, since this PR's fragment already removes all of its rows, sodebt_fold.py --checksees one fragment per entry. Windows 11, WinLibs GCC 15.2.0 r7, Release:nkwebkit_wtfprintinternal,nkwebkit_wtfstringdump,nkwebkit_wtftimedumpandnkwebkit_jscdumpsbuilt and passed 3/3.check_conventions.py --base origin/mainpasses; the debt files match main.d3e00afff1d: merged #19839d730f676242(main700fae94382), no conflicts; it trial-merges cleanly onto main6ef4f2f73b0. Windows 11, WinLibs GCC 15.2.0 r7, Release:nkwebkit_wtfprintinternal,nkwebkit_wtfmetaallocator,nkwebkit_wtfstringdump,nkwebkit_wtftextandnkwebkit_wtfbuilt and passed.debt_fold.py --checkandcheck_conventions.py --base origin/mainpass; the debt files match main.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)Summary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-14T02:21:06Z.
Review: CHANGES_REQUESTED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
a0e4fb84e3:tools/check_conventions.pypassed;git diff --checkreported whitespace errors.nkwebkit_wtfprintinternal_testsbuilt cleanly.nkwebkit_wtfprintinternal):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,core/libs/prx/libSceNKWebKit/include/WtfExports.hpp,core/libs/prx/libSceNKWebKit/src/WtfString.cpp,core/libs/prx/libSceNKWebKit/src/WtfStringAbi.hppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Requesting changes for the points above.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-14T23:54:24Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
9487ff0c94:tools/check_conventions.pypassed;git diff --checkclean.nkwebkit_wtfprintinternal_testsbuilt cleanly.nkwebkit_wtfprintinternal):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,core/libs/prx/libSceNKWebKit/include/WtfExports.hpp,core/libs/prx/libSceNKWebKit/src/WtfString.cpp,core/libs/prx/libSceNKWebKit/src/WtfStringAbi.hppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-15T04:48:45Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
36d4928e64:tools/check_conventions.pypassed;git diff --checkclean.nkwebkit_wtfprintinternal_testsbuilt cleanly.nkwebkit_wtfprintinternal):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,core/libs/prx/libSceNKWebKit/include/WtfExports.hpp,core/libs/prx/libSceNKWebKit/src/WtfString.cpp,core/libs/prx/libSceNKWebKit/src/WtfStringAbi.hppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-15T08:37:13Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
78a67cc9b1:tools/check_conventions.pypassed;git diff --checkclean.nkwebkit_wtfprintinternal_testsbuilt cleanly.nkwebkit_wtfprintinternal):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,core/libs/prx/libSceNKWebKit/include/WtfExports.hpp,core/libs/prx/libSceNKWebKit/src/WtfString.cpp,core/libs/prx/libSceNKWebKit/src/WtfStringAbi.hppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-15T21:27:38Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
e3e87ff47a:tools/check_conventions.pypassed;git diff --checkclean.nkwebkit_wtfprintinternal_testsbuilt cleanly.nkwebkit_wtfprintinternal):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,core/libs/prx/libSceNKWebKit/include/WtfExports.hpp,core/libs/prx/libSceNKWebKit/src/WtfString.cpp,core/libs/prx/libSceNKWebKit/src/WtfStringAbi.hppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.e3e87ff47a) cleanly resolves the merge conflict in docs/dev/debt/libSceNKWebKit.md and passes tools/check_conventions.py, git diff --check, and nkwebkit_wtfprintinternal CTest (including negative control).Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-15T23:07:31Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
d0a3548e35:tools/check_conventions.pypassed;git diff --checkclean.nkwebkit_wtfprintinternal_testsbuilt cleanly.nkwebkit_wtfprintinternal):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,core/libs/prx/libSceNKWebKit/include/WtfExports.hpp,core/libs/prx/libSceNKWebKit/src/WtfString.cpp,core/libs/prx/libSceNKWebKit/src/WtfStringAbi.hppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.d0a3548e35) cleanly moves the technical debt entry and inventory row removals into docs/dev/debt/changes/claude-nkwebkit-wtf-print-internal-widths.md and passes tools/check_conventions.py, git diff --check, and nkwebkit_wtfprintinternal CTest (including negative control).Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-16T21:14:54Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the review bundle documents successful targeted and cross-platform checks, and the inspected implementation matches the stated scalar formatting behavior.
What I ran
Reviewed head
d0a3548e35649fb0e68fbea255889f19b75ef789. No commands or tests were run in this review session. The author reportsnkwebkit_wtfprintinternalpassing on Ubuntu and Windows, and broader checks in the PR description; those results were not independently run here.Results
Findings
Blocking
None found in the inspected code.
Non-blocking
None.
Not verified
core/libs/prx/libSceNKWebKit/Export.cppandcore/libs/prx/libSceNKWebKit/include/InventoryExports.hppwere excluded from the review bundle because they were too large; their diff hunks were inspected, but their complete head contents were not read. No repository checks were run. Read:WtfExports.hpp,WtfPrintStream.cpp,WtfPrintStreamAbi.hpp,WtfString.cpp,WtfStringAbi.hpp,tests/WtfPrintInternal.cpp,WtfTimeTypes.hpp, plus the prepared description, commits, manifest, and diff. The author-reported test and build outcomes were not independently verified.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-16T22:18:39Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
19184ba244:tools/check_conventions.pypassed.nkwebkit_wtfprintinternal_testsbuilt cleanly.nkwebkit_wtfprintinternal):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,core/libs/prx/libSceNKWebKit/include/WtfExports.hpp,core/libs/prx/libSceNKWebKit/src/WtfString.cpp,core/libs/prx/libSceNKWebKit/src/WtfStringAbi.hpp,core/libs/prx/libSceNKWebKit/src/WtfPrintStream.cppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-16T22:24:05Z.
Review: COMMENTED
Reviewed — no blocking findings
The inspected changes are consistent with the stated goal, but I could not run the reported checks on this head.
What I ran
Inspected head
19184ba244cd6ccdd147b136cfee304a6f6c2191using the review reader. Read the prepared description, commits, manifest and full diff, plus targeted code in every changed file. No build or test command was run.Results
Negative Control
Not run; no test execution environment was available.
Findings
Blocking
None.
Non-blocking
None.
Sources
Behavior and implementation reviewed at the pinned head: WtfPrintStream.cpp, WtfPrintStreamAbi.hpp, and WtfPrintInternal.cpp.
Not verified
The author-reported Linux and Windows checks were not run by me; console behavior was not tested. Read the changed files listed in the manifest:
Export.cpp,InventoryExports.hpp,WtfExports.hpp,WtfPrintStream.cpp,WtfPrintStreamAbi.hpp,WtfString.cpp,WtfStringAbi.hpp,WtfPrintInternal.cpp, and the debt change fragment. No changed files were excluded from review; large repository files were read around the changed regions.To get this to a good state
Nothing is required. Optionally, rerun the reported checks on this exact head before merge.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T12:31:11Z.
Review: COMMENTED
Reviewed — comments
The implementation and targeted tests look consistent with the stated behavior; I could not verify two changed files excluded from the review folder or run checks on this revision.
What I ran
4a37dd6f1b1ac64f9b0728701def156bb541e6b3usingrepo_read.py.Results
Findings
Blocking
None identified in the inspected source.
Non-blocking
None.
Not verified
core/libs/prx/libSceNKWebKit/Export.cppandcore/libs/prx/libSceNKWebKit/include/InventoryExports.hppare excluded as too large; their diff hunks were read, but their full text was not.review/description.md,review/commits.md,review/manifest.json,review/diff.patch,core/libs/prx/libSceNKWebKit/src/WtfPrintStream.cpp,core/libs/prx/libSceNKWebKit/src/WtfPrintStreamAbi.hpp,core/libs/prx/libSceNKWebKit/src/WtfDumpStreamAbi.hpp,core/libs/prx/libSceNKWebKit/src/WtfString.cpp(targeted range),core/libs/prx/libSceNKWebKit/include/WtfExports.hpp(targeted range), andcore/libs/prx/libSceNKWebKit/tests/WtfPrintInternal.cpp.core/libs/prx/libSceNKWebKit/src/WtfStringAbi.hppanddocs/dev/debt/changes/claude-nkwebkit-wtf-print-internal-widths.mdwere not read from the repository head. Manifest-listed exclusions:Export.cppandInventoryExports.hpp.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-27T14:16:15Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
4a37dd6f1b:tools/check_conventions.pypassed.nkwebkit_wtfprintinternal_testsbuilt cleanly.nkwebkit_wtfprintinternal):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,core/libs/prx/libSceNKWebKit/include/WtfExports.hpp,core/libs/prx/libSceNKWebKit/src/WtfString.cpp,core/libs/prx/libSceNKWebKit/src/WtfStringAbi.hpp,core/libs/prx/libSceNKWebKit/src/WtfPrintStream.cppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-28T09:50:07Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
3fa83936ae:tools/check_conventions.pypassed.nkwebkit_wtfprintinternal_testsbuilt cleanly.nkwebkit_wtfprintinternal):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,core/libs/prx/libSceNKWebKit/include/WtfExports.hpp,core/libs/prx/libSceNKWebKit/src/WtfString.cpp,core/libs/prx/libSceNKWebKit/src/WtfStringAbi.hpp,core/libs/prx/libSceNKWebKit/src/WtfPrintStream.cppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-28T10:00:02Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this change; the inspected implementation and reported checks support merging.
What I ran
Reviewed head
3fa83936ae0185f1a1bbeeb0ab4018882858939e. I read the prepared description, commits, manifest, and diff, then inspected the implementation, ABI declarations, related string code, test, and target registration usingrepo_read.py. No commands or tests were run in this review.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The
files.jsonexclusion list was unavailable through the reader.Export.cppis marked excluded in the manifest and was read only around the affected stub region;InventoryExports.hppwas read only around the changed declarations. I did not read the full text of every file listed as reviewed in the manifest, inspect other changed-file context beyond the targeted ranges, or independently run the reported tests and checks. The cited Ubuntu and Windows results are author reported.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T13:00:49Z.
Review: COMMENTED
Built the exact changed sources and ran
WtfPrintInternalon Linux against the existing WebKit runtime. The fixture passed, including the format and value checks for the new scalar variants.AI-assisted: yes.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-03T22:21:30Z.
Review: APPROVED
Reviewed — looks good
The reviewed change at
d3e00afff1d9e0312fa4dc730fe830f34f7adddfimplements the listed WTF print overloads, and the inspected code supports approval.What I ran
Read the prepared diff and review metadata, then inspected the changed code and relevant ABI types through
repo_read.py. No tests, builds, or merged-preview checks were run; no local toolchain was invoked.Results
Negative control
Not run; no source changes or tests were performed during this review.
Findings
Blocking
None.
Non-blocking
None.
Sources
Not verified
Tests reported in the description, Windows and console behavior, and a merged preview were not independently verified. No files were excluded by the prepared review manifest.
To get this to a good state
Nothing is required.
Pull request closed