slightly optimize modified tracking

This commit is contained in:
Folkert 2024-06-29 13:51:07 +02:00
parent f4bd41352b
commit 90b70c3df0
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
2 changed files with 22 additions and 17 deletions

View file

@ -734,13 +734,11 @@ fn insert_refcount_operations_stmt<'v, 'a>(
body,
remainder,
} => {
// Assuming that the values in the closure of the body of this jointpoint are already bound.
// Assuming that all symbols are still owned. (So that we can determine what symbols got consumed in the join point.)
// NOTE: Assuming that the values in the closure of the body of this jointpoint are already bound.
// debug_assert!(environment
// .symbols_ownership
// .iter()
// .all(|(_, ownership)| ownership.is_owned()));
// NOTE: this code previously assumed that all symbols bound by the join point are owned.
// With borrow inference, that is no longer true but the analysis here _should_ mirror
// borrow inference and yield the same result.
let mut body_env = environment.clone();