ReviewOS

zig-utils/zig-js

GC relocation: add native-private payload rewrite hooks

#347
Closed chris opened this 9 days ago ·
9 days ago

Parent: #345 Depends on: #346 Roadmap: #335, #144, #134

Every engine-owned Object.private_data tracer needs a matching mutating relocation hook.

Acceptance:

  • Promise resolving closures rewrite target/state links.
  • Interpreter native closures rewrite every Value, Promise, Object, iterator, combine, and capability payload currently traced.
  • VM async-resume closures rewrite Generator/result links.
  • Thread lock/condition/TLS/release records rewrite every currently traced root without changing host-opaque payloads.
  • Tracing and relocation dispatch stay structurally paired with distinct-target tests.
  • Focused normal and TSan runs report zero failures and leaks.
  • Production movement remains disabled and #345/#335 are updated.
9 days ago

Implemented and pushed in 6c8ba4a2.

Delivered:

  • paired relocation hooks beside Promise, interpreter, VM, and jsthread native-private tracers;
  • resolving closure state/Promise links, finally/iterator/combinator/capability captures, async resume links, and Lock/Condition/TLS/Release queues all rewrite;
  • wrapper-owner back-pointers used by barriers also rewrite even where marking the already-live owner would be redundant;
  • host-opaque private_data tags remain untouched;
  • audit fixed a real marker omission: the captured constructor used by Promise.prototype.finally is now marked and rewritten.

Local gates:

  • filtered normal: 6/6 passed, 0 failed, 0 leaked;
  • filtered TSan: 6/6 passed, 0 failed, 0 leaked.

Production movement remains disabled. #345 now only lacks Wasm callback-owned roots.

9 days ago

Completed and accepted. The implementation-specific local evidence is recorded above, and descendant full CI at https://github.com/zig-utils/zig-js/actions/runs/29716788619 completed with 42 successful jobs, one intentional nightly skip, zero failures, and zero cancellations.

Sign in to comment on this issue.