separate marking the outputs as verified

There are 3 call-sites to this function:

* One of them has already marked the outputs
* One of them has no outputs
* The third does need to mark the outputs
This commit is contained in:
Niko Matsakis 2024-04-13 06:43:52 -04:00
parent e24ace24eb
commit a32078153b
2 changed files with 9 additions and 2 deletions

View file

@ -127,7 +127,9 @@ where
if memo.check_durability(runtime) {
// No input of the suitable durability has changed since last verified.
memo.mark_as_verified(db.as_salsa_database(), runtime, database_key_index);
let db = db.as_salsa_database();
memo.mark_as_verified(db, runtime, database_key_index);
memo.mark_outputs_as_verified(db, database_key_index);
return true;
}

View file

@ -126,8 +126,13 @@ impl<V> Memo<V> {
});
self.verified_at.store(runtime.current_revision());
}
// Also mark the outputs as verified
pub(super) fn mark_outputs_as_verified(
&self,
db: &dyn crate::Database,
database_key_index: DatabaseKeyIndex,
) {
for output in self.revisions.origin.outputs() {
db.mark_validated_output(database_key_index, output);
}