ReviewOS

zig-utils/zig-js

Implement proper tail-call stack reuse for test262 PTC coverage

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

Context

The configured test262 runner now has zero metadata skips, but 35 proper-tail-call files are excluded before enumeration because zig-js does not implement proper-tail-call stack reuse. These are listed in docs/.data/test262-excluded.tsv with reason proper-tail-calls.

Current behavior

Focused PTC probes recurse to the test262 $MAX_ITERATIONS depth and currently end in stack exhaustion rather than constant-stack tail calls.

Done when

  • The interpreter/VM implements strict-mode proper tail calls where required by ECMAScript.
  • The focused PTC paths in test/language and Proxy revocable PTC coverage pass without stack growth failures.
  • The 35 proper-tail-calls entries are removed from conformance/test262.zig exclusions and docs/.data/test262-excluded.tsv.
  • zig build test262 stays green with the promoted cases included in the scored denominator.
9 days ago

Implemented and pushed in 1fa9e65.\n\nPTC exclusions are removed from the configured runner. The focused PTC probes now pass:\n- test/language/expressions tco: 0 fail, 16 pass\n- test/language/statements tco: 0 fail, 18 pass\n- test/language/expressions/call tco: 0 fail, 6 pass\n- test/built-ins/Proxy revocable PTC was also verified during the work.\n\nThe full regenerated docs data is green at VALID 48,486/48,486 and NEGATIVE 4,669/4,669. This promoted 35 proper-tail-call cases from excluded to scored-passing.

Sign in to comment on this issue.