docs: PRD Performance Architecture + ADR 0007 (tiered execution)Verified

Integrates the JVM/HotSpot lessons from JVM-IDEAS.md into the
PRD as a major "Performance Architecture" section, with the
specific architectural decisions pinned in
decisions/0007-tiered-execution-and-speculation.md.

v1.0 commits to two-tier execution: baseline native compiler
with profile counters and inline caches for generic dispatch,
slot access, and funcall; optimizing compiler with type
speculation, generic-function speculation, and escape analysis
on locally-scoped allocations. Dependency tracking per code
object from day one. The IR + safepoint design leaves room for
deopt (v1.1) and OSR (v2.0).

v1.1 adds the deoptimization walker (in-flight frame
materialization), escape-analysis extensions (closures across
iteration macros, multi-function escape, dynamic-extent
inference), and code-cache aging.

v2.0 adds on-stack replacement, an optional third tier, and
Truffle/Graal-style partial evaluation as a reserved direction.

G3 (≤15% off SBCL on CL-bench) is scoped to tier-2-warm
measurement, with CL-bench's runtime long enough that hot
functions tier-2-compile before the benchmark records numbers.

JVM-IDEAS.md moved to docs/jvm-ideas.md as a reference for the
source thinking.

Phasing table updated with 3.5 (IR + dependency tracking) and
4.5 (tier-2 optimizing compiler) as explicit phases. ADR 0005
(representation-aware unboxing) and ADR 0006 (self-hosting) are
cross-referenced from ADR 0007 — they share the IR as the
upstream gating dependency.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Anthony Green2026-05-31 07:47:22 -0400 85ccb402c0a98779a9a71409e6c1b364dba73239
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>