Parents: #498, #502
Related: #705, #491
Problem
Program-mode bytecode runs without a frame. Compiler lowering that must retain private intermediate state across observable calls cannot safely use synthesized global/environment bindings: nested evaluation can collide on the same hidden name, and shared-realm parallel execution can race or corrupt another invocation. Plain functions have frame slots and suspendable functions have activation environments; programs need an equivalent native per-execution facility.
Scope
- Add bounded activation-local scratch storage for program bytecode, with explicit load/store/release operations or an equivalent verified operand-stack contract.
- Root managed Values across GC relocation and preserve them across debugger checkpoints, exceptions, and native-tier fallback.
- Keep scratch state private from global lexical/object reflection and separate across recursive, nested-eval, and parallel shared-realm executions.
- Give the compiler a backend-neutral way to retain resolved references and other short-lived intermediates without heap wrappers or global names.
No-workaround rules
- No process/global mutable scratch, hidden global properties/bindings, guessed NUL-name isolation, repeated observable evaluation, heap wrapper per reference, GIL-only serialization, or tree-walker callback presented as program lowering.
Acceptance
Parents: #498, #502
Related: #705, #491
Problem
Program-mode bytecode runs without a frame. Compiler lowering that must retain private intermediate state across observable calls cannot safely use synthesized global/environment bindings: nested evaluation can collide on the same hidden name, and shared-realm parallel execution can race or corrupt another invocation. Plain functions have frame slots and suspendable functions have activation environments; programs need an equivalent native per-execution facility.
Scope
No-workaround rules
Acceptance