Problem
This is the plan's own AOT answer — home build --target=x64 my.ts (Phase 7 of TS_PARITY_PLAN.md), with an extern "js" escape hatch and a GC-vs-escape-analysis design spike. It is marked blocked on Phase 6, but Phase 6's coarse gate is now saturated (5,907/5,907). Today no code lowers TS or HIR to native — native codegen imports only ast, not hir. With sound types, the checker's types can drive real machine representations instead of JIT speculation. (New direction.)
Evidence (origin/main @ d4b219507)
docs/docs/TS_PARITY_PLAN.md:835docs/docs/TS_PARITY_PLAN.md:2595docs/docs/TS_PARITY_PLAN.md:3251-3268build.zig:924-929packages/hir/src/hir.zig:1-6
Scope
- Write the subset spec: which TS constructs lower (numbers, strings, classes with fixed shape, closures, generics via monomorphization, discriminated unions) and which fall back to the engine via
extern "js". - Decide memory management (tracing GC vs. RC + escape analysis) in a short decision record.
- Spike:
fib.tsand a class/struct sample compile to native without JSC and match Node's output.
Acceptance criteria
- Spec and decision record merged in
docs/. - Spike samples build and run without JSC linked, output identical to Node.