tree-sitter.tree-sitter/test/fixtures
Will Lillis fb2052f02d perf(generate): represent the grammar IR as a flat, pooled arena
Replace the owned `Rule`-tree grammar with a flat, pooled representation. `Rule`
nodes live in a `RulePool` arena and reference their children and params by
index (`RuleId`). Strings are interned in a `StrPool` and referred to by `StrId`.
Productions are stored as flat `ProductionStep`/`Production` slices indexed per
variable, rather than as nested vectors hanging off each `SyntaxVariable`. This
drops the per-rule heap allocation of the owned-tree form and is the groundwork
for the later table-building optimizations.

`parse_grammar` builds the pool, the prepare passes rewrite nodes in place, and
`prepare_grammar` returns a `PreparedGrammar` bundle that owns the run's `StrPool`
alongside the grammars. `build_tables`, `node_types`, and `render` borrow that
pool and resolve `StrId`s only at the output boundary.

Shows an average ~10% walltime reduction when combined with the previous
commit, with nearly all of the savings in `build_tables`. The `prepare`
stage is also ~70% faster and much more stable, but this contributes
much less to overall generate time. Improving early stages such as
`prepare` will be important for future interactive uses.
2026-08-09 12:28:50 -05:00
..
error_corpus chore: update javascript error trees 2024-02-02 03:06:38 -05:00
grammars Rename spec -> test 2017-03-09 20:40:01 -08:00
template_corpus Add tests that randomly edit files with disjoint included ranges 2022-11-14 16:04:37 -08:00
test_grammars perf(generate): represent the grammar IR as a flat, pooled arena 2026-08-09 12:28:50 -05:00
fixtures.json test: bump c test fixture to v0.24.2 2026-04-23 03:31:00 -04:00