Parents: #493 Related: #761, #770, #847
Problem
ClassDefinitionEvaluation builds an immutable runtime map from source-controlled raw private identifiers (for example, #field) to per-evaluation storage identities. The map and the transient nested-class shadowing clone currently use default-context std.StringHashMapUnmanaged, so hostile source can precompute collision-heavy private-name sets after parser/compiler name tables have already been hardened.
This map is lexical execution metadata: it is retained by methods, constructors, field initializers, suspended VM activations, exception handlers, and direct eval. Its lookup behavior must remain identical across every carrier.
Scope
- Introduce one exact-byte, unpredictable hash context for each newly created runtime PrivateEnvironment.
- Preserve that context in the immutable map and reuse it for transient nested-class shadowing clones; do not request entropy per name, lookup, clone, or inherited outer entry.
- Rehash flattened outer PrivateEnvironment entries into the new class environment while preserving innermost-name shadowing.
- Carry the hardened map type unchanged through the tree walker, bytecode VM, functions, generators/async activations, exception unwinding, computed-name preparation, and direct-eval early-error validation.
- Keep classes with no new private bound identifiers allocation- and entropy-free by reusing the outer environment exactly.
- Make entropy/allocation failure publish no partial PrivateEnvironment and preserve exact JavaScript error ordering.
No-workaround rules
- No private-name count/length/depth cap, source rewriting beyond the existing semantic identity rewrite, blacklist, public/address/time-derived seed, deterministic fallback, hash-only equality, linear-search fallback presented as hardening, or weakened private-name early errors.
- No per-name/per-lookup OS entropy request, duplicate runtime map, parser/compiler behavior change, or public API/ABI change.
Acceptance
- Every runtime PrivateEnvironment lookup/insertion/removal/iteration uses its installed secure exact-byte context, including nested-class shadow filtering and flattened outer entries.
- Candidate-free classes reuse the outer map without entropy or allocation; first-map failure is atomic.
- Focused wide, duplicate accessor, nested shadowing, computed-name, closure, direct-eval, generator/async, abrupt-unwind, moving-GC, and required-VM witnesses pass.
- Focused normal, ReleaseSafe, and TSan/no-GIL coverage passes with zero leaks/races.
- Exact-parent relevant Test262 class/private-name inventories have nonzero accounting and zero regressions.
- Full unit and threadfuzz gates pass.