Repository navigation
feat(libSceJson2): implement Array::iterator assignment, postfix increment and Object::Pair - #4476
ahmedmakroum wants to merge 2 commits into
Conversation
…and add parameter validation - libSceJson2: Drop 5 functions overlapping with boykopovar#4476 (Array::iterator ctor/op++/op=, Pair ctor/dtor) Fix Value::clear to keep notifyError call Fix MemAllocator::notifyError signature (3 params) Fix Value callbacks signatures with self parameter Fix Object::insert, Array::iterator operators with proper signatures - libSceBluetoothHid: Add parameter validation to GetDeviceName, GetInputReport, SetOutputReport - All functions follow project pattern: validation + NotImplemented_nid_no_patch
…and add parameter validation - libSceJson2: Drop 5 functions overlapping with boykopovar#4476 (Array::iterator ctor/op++/op=, Pair ctor/dtor) Fix Value::clear to keep notifyError call Fix MemAllocator::notifyError signature (3 params) Fix Value callbacks signatures with self parameter Fix Object::insert, Array::iterator operators with proper signatures - libSceBluetoothHid: Add parameter validation to GetDeviceName, GetInputReport, SetOutputReport - All functions follow project pattern: validation + NotImplemented_nid_no_patch
…and add parameter validation - libSceJson2: Drop 5 functions overlapping with boykopovar#4476 (Array::iterator ctor/op++/op=, Pair ctor/dtor) Fix Value::clear to keep notifyError call Fix MemAllocator::notifyError signature (3 params) Fix Value callbacks signatures with self parameter Fix Object::insert, Array::iterator operators with proper signatures - libSceBluetoothHid: Add parameter validation to GetDeviceName, GetInputReport, SetOutputReport - All functions follow project pattern: validation + NotImplemented_nid_no_patch
Implement iterator construction/assignment and Pair construction/destruction. Pairs retain independent copies of nested data, and partial construction cleans up owned state on failure. Keep postfix increment unimplemented because its return ABI is not established; VitaSDK declares void, unlike PR boykopovar#4476. Adapted from boykopovar/AnyPS5 PR boykopovar#4476 at 93ad413 by ahmedmakroum, co-authored with Claude Opus 5.5. Added nested ownership, guards, self-assignment and invalid-source regression checks locally. Windows Release: full build and libs passed; module runner passed all six registered module suites (nine CTests); ten integration CTests passed. The extended guest_json test failed on unchanged sources at the missing iterator constructor, then passed with the implementation. PC validation; remaining ABI assumptions are recorded in TechnicalDebt.md.
|
Does PPSA30601 stop at one of these five on main? With the log line this can go in; without one I'll close it until a title gets there. The PPSA30601 line in |
|
Windows build check (Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release, |
…ement and Object::Pair Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
93ad413 to
f4f34a0
Compare
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
|
|
Thanks for the Windows check. No log line from me: I don’t have PPSA30601, so I can’t show it stopping at one of these five. I implemented them from the debt entry, which only says the title fails to load without them. @xXPBSXx brought PPSA30601 up in #3814; if a run of yours reaches libSceJson2, a log line would settle it. I’ve pushed the debt fix: docs/dev/debt/libSceJson2.md now lists only Object::insert as left. If there’s no log, closing this until a title gets there is fine with me. |
|
The new overlap with #5004 is only neighbouring lines in docs/dev/debt/libSceJson2.md, no shared exports; whichever merges second can rebase it. |
Reviewer fixes: debt entry for the inferred postfix ++ return convention, value-initialised default iterator and zeroed Pair reserved bytes; drop the test assertion that only checked our own Pair layout.
|
Thanks for the work on this. Closing for now: no title reaches these five on main yet, as agreed above. You are welcome to reopen it with the title ID and the log line if PPSA30601 or another title stops at one of them. |
What
Implements five libSceJson2 exports that were NotImplemented stubs:
Array::iterator::iterator()(placement new on guest memory)Array::iterator::operator=(const iterator&)Array::iterator::operator++(int)(returns the old position through the hidden result pointer, likeArray::begin())Object::Pair::Pair(const String&, const Value&)(deep copies key and value with the existing Construct and CopyInto helpers, sets the reserved field to 0)Object::Pair::~Pair()(destroys key and value)The other Json2 stubs are left as they are:
Object::inserthas no return type in its mangled name, and the handler setters andoperator boolhave unknown behaviour.Tested
Linux (WSL2), no title. Added
IteratorAssignmentAndPairto the guest_json test: default construction followed by assignment, postfix increment returning the old position and advancing the iterator, Pair deep copy (changing and destroying the source String and Value leaves the pair unchanged), and the Pair destructor.ctest -R '^guest_json$'passes andpython3 tools/check_conventions.pypasses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)