feat: Document AST node structure across compiler stages
Add a new Markdown document detailing the AST node structure as it evolves through the compiler's different stages. This includes a diagram illustrating the data flow and relationships between the generic `Node<K, T>` structure and its specialized forms (`UntypedNode`, `BoundNode`, `TypedNode`, `AnalyzedNode`). The document explains the `kind` and `ty` payloads for each stage and their significance. Also removes a deleted file related to a previous optimization plan and adds new files for future optimization plans.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
;; Benchmark: 1.7ms
|
||||
;; Benchmark-Repeat: 3
|
||||
;; Benchmark: TBD
|
||||
;; Tests the effect of record inlining and field lookup optimization
|
||||
;; Output: 10000
|
||||
(do
|
||||
(macro while [cond body]
|
||||
`(do
|
||||
(def _while_loop (fn []
|
||||
(if ~cond
|
||||
(do ~body (_while_loop))
|
||||
...)))
|
||||
(_while_loop)))
|
||||
|
||||
(def config {:start 0 :limit 10000 :step 2})
|
||||
(def x (.start config))
|
||||
|
||||
(while (< x (.limit config))
|
||||
(assign x (+ x (.step config))))
|
||||
x
|
||||
)
|
||||
Reference in New Issue
Block a user