stage1: memoize strings in the AST

Currently, stage1 runs astgen for every comptime function call,
resulting in identifier strings being allocated multiple times,
wasting memory. As a workaround until the code is adjusted to
make astgen run only once per source node, we memoize the
result into the AST.

 * Rename `ir_gen_*` to `astgen_*`
   - Oops, meant to do this in a separate commit. My bad.
 * tokenizer: avoid using designated initializer syntax.
   MSVC does not support it.
This commit is contained in:
Andrew Kelley
2021-05-28 15:22:03 -07:00
parent 52b3daa90e
commit f5d4fe3e17
5 changed files with 489 additions and 467 deletions

File diff suppressed because it is too large Load Diff