Parent: #496 Related: #493, #460, #461, #537, #538
Problem
The lexer already borrows ordinary IdentifierName source slices, but every private name takes a separate unconditional allocPrint("#{s}") path. Plain #field declarations, reads, writes, brand checks, methods, and accessors therefore allocate and copy bytes even though their exact token spelling is already a stable slice of Context-owned source. Private-heavy generated classes amplify this into proportional parse-arena traffic.
Scope
- Add parser-only 1K/2K/4K plain private-field growth rows with frozen source construction, exact member-name/index validation, warmup, and timed parse boundary; retain an escaped-private control.
- Return the exact
#namesource slice when the underlying IdentifierName contains no escape. - Preserve owned
#+ decoded-name construction for escaped private names. - Preserve private declaration/use matching, duplicate/accessor rules, brand checks, source positions, Unicode, diagnostics, and source lifetime.
Security and correctness
- Borrowed private-name slices may not outlive Context-owned source.
- Escaped names must remain exact decoded bytes with failure-atomic OOM propagation.
- Do not special-case benchmark names, weaken private-name early errors, globally intern attacker-controlled names, or change class element ordering.
Acceptance
- Benchmark source and exact member-name structural checks land before lexer changes.
- Pointer/allocation witnesses prove plain private tokens are source-backed and escaped private tokens remain owned/decoded.
- 1K/2K/4K rows show bounded near-linear work and materially lower allocation/instruction cost versus the exact parent; escaped control remains semantically exact.
- Lexer/parser/frontend suites, private field/method/accessor/brand/eval cases, malformed/OOM diagnostics, forced execution paths, full units, and affected test262 private-name subtrees pass with no regressions.