lex: replay tokens from a direct-mapped cache instead of re-lexing after lookahead

Every lookahead ends with reseek(mark), so scan() ran about 1.5x per distinct token. scan() now checks a 256-entry table (4KiB at LEXC, below the frame stack; DATA_END moves to 7168) keyed by token begin and replays tb/ts/te/tt/tk/tnl. Only scan's own completed results are stored; rescans and needMore results are not, and init() clears the table for each new stream. ab.mjs: erase +22-34% on 3000 OSS files, downlevel +25-26%; 0 output diffs. erase.wasm +190 B raw / +117 B gz, downlevel.wasm +191 B / +123 B.


Author natemoo.re
Date Commit Parent 43e77df7