Commit 1929b01
committed
feat: integrate memory safety infrastructure into compilation pipeline
- Add LinearTypeChecker integration to all compilation entry points
- commands.rs, zyn_grammar.rs, typed_ast_json.rs
- Can be bypassed with SKIP_LINEAR_CHECK=1 env var
- Create HIR-level borrow checking pass (borrow_check.rs)
- HirBorrowChecker for traversing HIR and validating borrow rules
- BorrowError enum for various violations (UseAfterMove, MutableBorrowConflict, etc.)
- Integrated into compile_to_hir() via enable_borrow_check config option
- Add operands() method to HirInstruction for analysis passes
- Add run_linear_type_check() function to compiler lib.rs1 parent 79906ae commit 1929b01
6 files changed
Lines changed: 679 additions & 0 deletions
File tree
- crates
- compiler/src
- zyntax_cli/src
- formats
0 commit comments