feat: Implement closure cracking and inlining

Introduces a new optimizer pass that can "crack" closures, allowing for
more aggressive specialization. It also enables inlining of upvalues
that point to immutable global variables. This removes overhead for
higher-order functions and currying when arguments are statically
resolvable.
This commit is contained in:
Michael Schimmel
2026-02-21 18:49:55 +01:00
parent 74ea38248e
commit 0bbe35eeec
11 changed files with 386 additions and 286 deletions
+5
View File
@@ -0,0 +1,5 @@
;; Output: 5
(do
(def f (fn [x] (fn [] x)))
((f 5))
)