Parent: #496 Related: #538, #547, #608, #609, #611
Problem
After #610/#611 removed source-location and impossible parameter-conflict work, Lexer.lexIdentNameWithOwnedPrefix is the largest leaf in the current ReleaseFast Unicode-identifier profile. Every raw continuation byte executes the escape check, ASCII/non-ASCII split, first-versus-part conditional, scalar identifier-part classification, and loop update. The frozen ASCII and Unicode 4K parameter names contain long ASCII suffixes after their already-validated start, so this byte-serial control work dominates even though no escape or delimiter occurs inside each suffix.
The first state is also redundant on the raw path after #608: a zero validated-start length denotes a leading \\u escape and can enter the owned decoder immediately; every non-zero raw start has already been consumed and all remaining scalars use IdentifierPart.
Proposed resolution
Split the leading-escape path from raw identifier continuation scanning. Consume complete 8-byte ASCII blocks only when every lane is an ECMAScript ASCII IdentifierPart; otherwise return to the exact scalar boundary so backslash escapes, non-ASCII UTF-8, invalid bytes, and delimiters follow their existing validation paths. Keep the scalar tail and Unicode 17 authority unchanged.
Acceptance
- ASCII blocks stop at the first delimiter, backslash, non-ASCII lead byte, invalid ASCII punctuation, and EOF without overread or token-boundary drift.
- Leading and embedded Unicode escapes retain decoded text, escape provenance, allocation behavior, and failure offsets.
- Raw Unicode IdentifierStart/IdentifierContinue and malformed UTF-8 behavior remain governed by the existing Unicode 17 tables and decoder.
- Numeric adjacency and private-name tokenization remain exact.
- Exact-parent evidence covers ASCII, escaped, Unicode, raw private, and escaped-private 4K controls with unchanged checksums and bounded allocations.
- Focused lexer/frontend Debug/TSan, full units, identifier/private/numeric test262, and forced tree-walker/required-bytecode witnesses remain exact.
Security boundary
Identifier length, byte alignment, escape placement, UTF-8 validity, and delimiter position are attacker-controlled. Block loads must prove the complete width is in bounds, may advance only when every lane is valid, and must fall back at the original byte when any lane fails.
No-workaround rules
No ASCII-only grammar, skipped Unicode validation, permissive malformed UTF-8, approximate delimiter search, source/benchmark recognition, token/AST widening, or job/Promise/microtask/Worker lifecycle changes.