Skip to main contentModule helpers
Source - count_free_occurrences
- Count how many times
var appears free in expr. - count_nodes
- Count total nodes in an expression tree.
- expr_depth
- Compute the depth (height) of an expression tree.
- is_constant_binding
- Returns
true if expr is a constant literal (Constant(_)). - is_simple_binding
- Returns
true if expr is a “simple” binding worth inlining regardless
of use count: either a constant or a variable alias. - is_var_binding
- Returns
true if expr is a zero-argument predicate (variable alias).