1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//! Visitor traits for traversing and lowering vyre IR.
//!
//! # Why this module exists
//!
//! Vyre's IR is `#[non_exhaustive]`. Silent default visitor bodies are
//! therefore a soundness bug: a new `Expr` or `Node` variant can compile
//! while downstream analyses quietly skip it. The visitor contracts in
//! this module are intentionally abstract-by-default so rustc forces an
//! explicit decision at every implementation site.
//!
//! Traversal order is explicit:
//! - `*_preorder` visits the current node before its children.
//! - `*_postorder` visits children before the current node.
//!
//! Visitors may short-circuit traversal by returning `ControlFlow::Break`.
/// Expr visitor contract + recursive traversal entry points.
/// Owning child-recursive `Node` map + descendant-search helpers shared
/// by the cleanup catalog (`empty_block_collapse`,
/// `region_promote_singleton_block`, `if_constant_branch_eliminate`,
/// `noop_assign_eliminate`, `loop_trip_zero_eliminate`,
/// `loops::loop_redundant_bound_check_elide`).
/// Cross-cutting visitor contracts: `NodeVisitor`, `Lowerable`, `Evaluatable`.
/// Recursive traversal order for visitor entry points and default child walking.
pub use ;
pub use ;