Problem
JsonParser.parseArray appends every completed child with the public Object.appendElement path even though the entire parsed graph remains private until parsing succeeds. appendElement always calls lockElements; a default single-owner process pays the enable-gate atomic load per element, while any process that has enabled parallel synchronization takes a full object mutex for these still-unpublished arrays.
The frozen representative_json row parses 2,200 jobs x 90 rounds x 3 array elements = exactly 594,000 private appends per invocation. This is separate from #1006 and follows the unpublished object-field boundary established by #994.
Change boundary
Add an explicit unpublished dense-element append primitive that preserves the GC barrier, indexed-own publication bit, element allocator ownership, append ordering, and exact OOM behavior but does not enter elements_lock. Use it only from JSON array construction before the result can escape. Keep array literals, public Array methods, reviver mutation, Proxy/exotic behavior, and every published/shared append on the existing synchronized path.
Parent: #473.
Completion
- Pin disabled/enabled lock-counter behavior: unpublished parse construction acquires zero element mutexes even after parallel synchronization is enabled, while the public append remains synchronized.
- Preserve allocation-failure rollback, nested/deep parse behavior, reviver source records, GC relocation, and no-GIL/TSan safety.
- Keep JSON Test262 and required VM/tree agreement exact.
- Run seven alternating exact-parent pairs on both frozen JSON rows plus parse-heavy and stringify-only controls, with exact checksums and no hidden control regression.
- Land only with measured instruction/CPU improvement or close with the executed negative result.