feat: Add typed lambda registry to Optimizer
The Optimizer now accepts a typed lambda registry, allowing it to perform more aggressive inlining and beta-reduction on globally defined functions. This is a significant step towards optimizing recursive and globally defined lambdas more effectively.
This commit is contained in:
+2
-2
@@ -1,6 +1,6 @@
|
||||
---
|
||||
source: src/ast/compiler/optimizer.rs
|
||||
assertion_line: 720
|
||||
assertion_line: 844
|
||||
expression: dump
|
||||
---
|
||||
Lambda (Upvalues: 0) <Metadata: Metadata { ty: Function(Signature { params: Tuple([]), ret: Int }), is_tail: true }>
|
||||
@@ -11,4 +11,4 @@ Lambda (Upvalues: 0) <Metadata: Metadata { ty: Function(Signature { params: Tupl
|
||||
Constant: 10 <Metadata: Metadata { ty: Int, is_tail: false }>
|
||||
Set: Local(0) <Metadata: Metadata { ty: Int, is_tail: false }>
|
||||
Constant: 20 <Metadata: Metadata { ty: Int, is_tail: false }>
|
||||
Constant: 20 <Metadata: Metadata { ty: Int, is_tail: true }>
|
||||
Get: x (Local(0)) <Metadata: Metadata { ty: Int, is_tail: true }>
|
||||
|
||||
Reference in New Issue
Block a user