Files
RustAst/examples/record_optimizations.myc
T
Michael Schimmel 83324a1892 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.
2026-02-27 08:58:38 +01:00

22 lines
491 B
Plaintext

;; 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
)