Refactor: Remove explicit upvalue analysis pass

The `UpvalueAnalyzer` pass is no longer necessary as the binder now
directly tracks captures. This commit removes the `UpvalueAnalyzer`
struct and associated logic from `src/ast/compiler/upvalues.rs`.

The `Binder::bind_root` function now returns the `captures` map, which
is then processed by a new `CapturePass` in `src/ast/environment.rs`
before type checking. This consolidates capture logic within the binder
and its subsequent processing steps.
This commit is contained in:
Michael Schimmel
2026-02-25 12:15:59 +01:00
parent 82daf03522
commit 0371c21523
5 changed files with 92 additions and 204 deletions
+2 -2
View File
@@ -1,6 +1,7 @@
pub mod analyzer;
pub mod binder;
pub mod bound_nodes;
pub mod captures;
pub mod dumper;
pub mod lambda_collector;
pub mod macros;
@@ -8,14 +9,13 @@ pub mod optimizer;
pub mod specializer;
pub mod tco;
pub mod type_checker;
pub mod upvalues;
pub use binder::*;
pub use bound_nodes::*;
pub use captures::*;
pub use dumper::*;
pub use macros::*;
pub use optimizer::*;
pub use specializer::*;
pub use tco::*;
pub use type_checker::*;
pub use upvalues::*;