Re-assign an identifier to each `Let`. Under the assumption that `id_gen` produces identifiers in order, this process maintains in-orderness of `LetRec` identifiers.
(
relation: &mut MirRelationExpr,
id_gen: &mut IdGen,
)
| 948 | /// Under the assumption that `id_gen` produces identifiers in order, this process |
| 949 | /// maintains in-orderness of `LetRec` identifiers. |
| 950 | pub fn renumber_bindings( |
| 951 | relation: &mut MirRelationExpr, |
| 952 | id_gen: &mut IdGen, |
| 953 | ) -> Result<(), crate::TransformError> { |
| 954 | let mut renaming = BTreeMap::new(); |
| 955 | determine(&*relation, &mut renaming, id_gen)?; |
| 956 | implement(relation, &renaming)?; |
| 957 | Ok(()) |
| 958 | } |
| 959 | |
| 960 | /// Performs an in-order traversal of the AST, assigning identifiers as it goes. |
| 961 | fn determine( |
no test coverage detected