Implement nearest-loop transfers and reachable binding analysis

This commit is contained in:
Codex committed 2026-11-23 19:41:01 +08:00
1 parent 095eef1370
commit 69c5dc8d20
40 files changed
+953 -110

No files matched your search

+5 -1
View File
@@ -213,7 +213,10 @@ fn collect_assigned(stmts: &[Stmt], out: &mut BTreeSet<String>) {
}
}
Stmt::Loop { body, .. } => collect_assigned(body, out),
Stmt::Eval { .. } | Stmt::Return { .. } => {}
Stmt::Eval { .. }
| Stmt::Return { .. }
| Stmt::Break { .. }
| Stmt::Continue { .. } => {}
}
}
}
@@ -257,6 +260,7 @@ impl<'a> Binder<'a> {
self.expr(condition);
self.stmts(body);
}
Stmt::Break { .. } | Stmt::Continue { .. } => {}
}
}
}