feat(libSceNKWebKit): implement the WTF time and literal dump methods #14947

Closed
w4rc0n wants to merge 2 commits from upstream-pr/14947 into main
w4rc0n commented 2026-11-02 03:14:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by w4rc0n on 2026-11-02T03:14:57Z.


What

Five WTF dump(PrintStream&) methods were NotImplemented stubs. They now print as the pinned PS5 WebKit 11.x source does, through #14946's PrintStream:

Each one is the inline out.print(...) template: begin(), a printInternal for each value, then end(). All three go through the stream's vtable, so a guest subclass sees the same calls in the same order. The this layouts are the existing time types and the one-pointer ASCIILiteral.

URL::dump, BitVector::dump (#14152's class), MediaTime::dump (#13992) and Thread::dump are left out.

tools/pr_overlap.py on this head, with main at 0eba5db30d: no other open PR changes these exports or adds the same files. For the PRs it couldn't compare because they no longer merge with main, GitHub's file lists show none of them changing these exports either. #13992, #14172 and #15241 change nearby lines in the same files; whichever merges later keeps both sides. The only exports it shares are with #14948, in the same stack.

Tested

Debian 12, GCC 12.2, Linux 6.18, Release, at the head f5dc0a08b885f353c7ef0b6ea35331945fcc84aa, which is on #14946's head 59a53bbfcbd5eadd60fe1711a5157d57ca5bb3b2. No local changes.

  • guest_nkwebkit_dates, guest_nkwebkit_numbers, nkwebkit_base, nkwebkit_config, nkwebkit_constants, nkwebkit_fastbitvector, nkwebkit_jsc, nkwebkit_palsessionid, nkwebkit_preferences, nkwebkit_resourceresponse, nkwebkit_webcoregeometry, nkwebkit_wtf, guest_nkwebkit_urls and public_headers pass. The new nkwebkit_wtf cases cover:
    • each dump printed into a StringPrintStream, using the source's double formatting;
    • a guest-style subclass, checking the exact nested begin/end order for the dynamic-clock dump and a redirected begin.
  • tools/progress.py: the five exports count as implemented (libSceNKWebKit 1351, against 1346 with #14946).
  • tools/check_conventions.py passes.
  • Windows (GitHub-hosted CI in the author's fork): run 41385234882 built this branch's previous head ce247d6dbe042c0616a02eb8117efe060b1cda2f. It is AnyPS5's Build workflow, dispatched in the author's fork with select=true: the branch merged into main at 926f7dd492b0b432d9287f4d6faaaf1c9d3c86c5, built on windows-latest with WinLibs GCC 15.2 (MinGW-w64, UCRT). None of the 672 selected tests failed; 6 AGC tests were skipped, which check_skips.py accepts. That includes the nine NKWebKit tests, public_headers and patched_libraries. The later rebases onto main (now 0eba5db30d8a3d03789e52e5c1a9ff853e4e33e4, after #14479, #13766, #14925 and #15911) changed only docs/dev/debt/libSceNKWebKit.md, so git range-diff shows the code and tests under test are the same as at that run. A fork-internal pull request existed only to give the workflow a number.

Not built or run: macOS. No title or homebrew was run.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: #14946
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5114387019 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14947). Originally posted by [w4rc0n](https://github.com/w4rc0n) on 2026-11-02T03:14:57Z. --- ### What Five WTF `dump(PrintStream&)` methods were `NotImplemented` stubs. They now print as the pinned PS5 WebKit 11.x source does, through #14946's `PrintStream`: - [`MonotonicTime::dump`](https://github.com/neonmodder123/PS5-WebKit-11.x/blob/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/WTF/wtf/MonotonicTime.cpp#L41-L44) prints `Monotonic(<seconds> sec)`. - [`Seconds::dump`](https://github.com/neonmodder123/PS5-WebKit-11.x/blob/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/WTF/wtf/Seconds.cpp#L80-L83) prints `<seconds> sec`. - [`WallTime::dump`](https://github.com/neonmodder123/PS5-WebKit-11.x/blob/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/WTF/wtf/WallTime.cpp#L41-L44) prints `Wall(<seconds> sec)`. - [`TimeWithDynamicClockType::dump`](https://github.com/neonmodder123/PS5-WebKit-11.x/blob/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/WTF/wtf/TimeWithDynamicClockType.cpp#L131-L134) prints `<clock>(<seconds> sec)`, using #14946's `ClockType` printing. - [`ASCIILiteral::dump`](https://github.com/neonmodder123/PS5-WebKit-11.x/blob/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/WTF/wtf/text/ASCIILiteral.cpp#L33-L36) prints the literal's characters. Each one is the inline `out.print(...)` template: `begin()`, a `printInternal` for each value, then `end()`. All three go through the stream's vtable, so a guest subclass sees the same calls in the same order. The `this` layouts are the existing time types and the one-pointer `ASCIILiteral`. `URL::dump`, `BitVector::dump` (#14152's class), `MediaTime::dump` (#13992) and `Thread::dump` are left out. `tools/pr_overlap.py` on this head, with `main` at `0eba5db30d`: no other open PR changes these exports or adds the same files. For the PRs it couldn't compare because they no longer merge with `main`, GitHub's file lists show none of them changing these exports either. #13992, #14172 and #15241 change nearby lines in the same files; whichever merges later keeps both sides. The only exports it shares are with #14948, in the same stack. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Debian 12, GCC 12.2, Linux 6.18, Release, at the head `f5dc0a08b885f353c7ef0b6ea35331945fcc84aa`, which is on #14946's head `59a53bbfcbd5eadd60fe1711a5157d57ca5bb3b2`. No local changes. - `guest_nkwebkit_dates`, `guest_nkwebkit_numbers`, `nkwebkit_base`, `nkwebkit_config`, `nkwebkit_constants`, `nkwebkit_fastbitvector`, `nkwebkit_jsc`, `nkwebkit_palsessionid`, `nkwebkit_preferences`, `nkwebkit_resourceresponse`, `nkwebkit_webcoregeometry`, `nkwebkit_wtf`, `guest_nkwebkit_urls` and `public_headers` pass. The new `nkwebkit_wtf` cases cover: - each dump printed into a `StringPrintStream`, using the source's `double` formatting; - a guest-style subclass, checking the exact nested `begin`/`end` order for the dynamic-clock dump and a redirected `begin`. - `tools/progress.py`: the five exports count as implemented (libSceNKWebKit 1351, against 1346 with #14946). - `tools/check_conventions.py` passes. - **Windows (GitHub-hosted CI in the author's fork):** [run 41385234882](https://github.com/w4rc0n/AnyPS5/actions/runs/41385234882) built this branch's previous head `ce247d6dbe042c0616a02eb8117efe060b1cda2f`. It is AnyPS5's `Build` workflow, dispatched in the author's fork with `select=true`: the branch merged into `main` at `926f7dd492b0b432d9287f4d6faaaf1c9d3c86c5`, built on `windows-latest` with WinLibs GCC 15.2 (MinGW-w64, UCRT). None of the 672 selected tests failed; 6 AGC tests were skipped, which `check_skips.py` accepts. That includes the nine NKWebKit tests, `public_headers` and `patched_libraries`. The later rebases onto `main` (now `0eba5db30d8a3d03789e52e5c1a9ff853e4e33e4`, after #14479, #13766, #14925 and #15911) changed only `docs/dev/debt/libSceNKWebKit.md`, so `git range-diff` shows the code and tests under test are the same as at that run. A fork-internal pull request existed only to give the workflow a number. Not built or run: macOS. No title or homebrew was run. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: #14946 - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!14947
No description provided.