Parent: #496 Related: #479, #493, #608, #461
Problem
After #608 removes duplicate IdentifierStart decoding, the current-main parser-only representative_frontend_unicode_identifiers_4096 profile still records 654 top-of-stack samples in byte equality and 290 in Parser.isForbiddenBindingName. Every ordinary non-keyword binding walks up to 38 unconditional reserved spellings, then up to nine strict-only spellings, even when its length cannot match any keyword. Long ASCII and Unicode parameter names therefore pay repeated function/equality dispatch after lexing has already produced their exact slice.
The repository already has a standard-library compile-time static string map designed for small disparate key sets: it rejects outside the exact keyword length range and compares only equal-length candidates.
Scope
- Replace the three duplicated linear reserved-word lists with one compile-time, immutable classification table carrying the exact unconditional, grammar-reserved, and strict-only memberships.
- Perform one classification per binding/label decision and reuse its flags across active grammar modes.
- Preserve escaped contextual-keyword handling,
await/yieldasync-generator rules, stricteval/arguments, property-name permissions, labels, import/export bindings, and all early-error locations. - Add exhaustive equivalence coverage for every classified spelling plus ordinary long/Unicode controls.
Constraints
- No lexer keyword tokenization change, hash seed/global mutable state, runtime allocation, generated-data edit, accepted/rejected grammar shortcut, or case folding.
- Exact bytes decide classification; escaped-identifier context rules remain parser-owned.
- Do not touch stacks, queues, jobs, Promise/microtasks, Worker lifecycle, or scheduler code.
Acceptance
- The new table is exhaustively equivalent to all three current word sets and has no duplicate/missing entries.
- Non-keyword identifiers outside keyword lengths reject in O(1) without byte comparisons.
- ASCII/Unicode/escaped/private frontend rows retain exact checksums/allocations and show causal CPU-work reduction or the change is rejected.
- Reserved-word, strict-mode, module, async/generator, label, property-name, OOM, TSan, full-unit, and affected test262 gates pass with quantified flips.
- No process-global mutable state or cache is added.