(almost) encansulate Runtime into Zalsa

The distinction is dumb and should go away.
But we still need it for a bit.
This commit is contained in:
Niko Matsakis 2024-07-27 10:53:15 +00:00
parent 596461c213
commit 1842b1dfbb
21 changed files with 136 additions and 111 deletions

View file

@ -27,8 +27,7 @@ where
opt_old_memo: Option<Arc<Memo<C::Output<'_>>>>,
) -> StampedValue<&C::Output<'db>> {
let zalsa = db.zalsa();
let runtime = zalsa.runtime();
let revision_now = runtime.current_revision();
let revision_now = zalsa.current_revision();
let database_key_index = active_query.database_key_index;
tracing::info!("{:?}: executing query", database_key_index);
@ -68,16 +67,7 @@ where
}
}
};
let mut revisions = active_query.pop(runtime);
// We assume that query is side-effect free -- that is, does
// not mutate the "inputs" to the query system. Sanity check
// that assumption here, at least to the best of our ability.
assert_eq!(
runtime.current_revision(),
revision_now,
"revision altered during query execution",
);
let mut revisions = active_query.pop();
// If the new value is equal to the old one, then it didn't
// really change, even if some of its inputs have. So we can