Flattening ASTs (and Other Compiler Data Structures) [May 2023]
Arenas, a.k.a. regions, are everywhere in modern language implementations. One form of arenas is both super simple and surprisingly effective for compilers and compiler-like things. Maybe because of its simplicity, I haven’t seen the basic technique in many compiler courses—or anywhere else in a CS curriculum for that matter. This post is an introduction to the idea and its many virtues.
https://www.cs.cornell.edu/~asampson/blog/flattening.htmlOpen linkView original on programming.dev