rename local_state to zalsa_local

This commit is contained in:
Niko Matsakis 2024-07-28 13:12:58 +00:00
parent 3254f46ca8
commit ab112b7126
25 changed files with 28 additions and 28 deletions

View file

@ -10,7 +10,7 @@ use crate::{
hash::FxDashMap,
ingredient::{fmt_index, Ingredient, Jar},
key::DependencyIndex,
local_state::{QueryOrigin, ZalsaLocal},
zalsa_local::{QueryOrigin, ZalsaLocal},
zalsa::IngredientIndex,
Database, DatabaseKeyIndex, Event, EventKind, Id, Revision,
};

View file

@ -2,12 +2,12 @@ use crate::{
durability::Durability,
hash::{FxIndexMap, FxIndexSet},
key::{DatabaseKeyIndex, DependencyIndex},
local_state::EMPTY_DEPENDENCIES,
zalsa_local::EMPTY_DEPENDENCIES,
tracked_struct::Disambiguator,
Cycle, Revision,
};
use super::local_state::{EdgeKind, QueryEdges, QueryOrigin, QueryRevisions};
use super::zalsa_local::{EdgeKind, QueryEdges, QueryOrigin, QueryRevisions};
#[derive(Debug)]
pub(crate) struct ActiveQuery {

View file

@ -4,7 +4,7 @@ use parking_lot::{Condvar, Mutex};
use crate::{
self as salsa,
local_state::{self, ZalsaLocal},
zalsa_local::{self, ZalsaLocal},
zalsa::Zalsa,
Durability, Event, EventKind, Revision,
};
@ -120,7 +120,7 @@ pub struct DatabaseImpl<U: UserData = ()> {
coordinate: Arc<Coordinate>,
/// Per-thread state
zalsa_local: local_state::ZalsaLocal,
zalsa_local: zalsa_local::ZalsaLocal,
/// The `U` is stored as a `dyn Any` in `zalsa_impl`
phantom: PhantomData<U>,

View file

@ -4,7 +4,7 @@ use crossbeam::atomic::AtomicCell;
use crate::{
cycle::CycleRecoveryStrategy, ingredient::fmt_index, key::DatabaseKeyIndex,
local_state::QueryOrigin, salsa_struct::SalsaStructInDb, zalsa::IngredientIndex,
zalsa_local::QueryOrigin, salsa_struct::SalsaStructInDb, zalsa::IngredientIndex,
AsDynDatabase as _, Cycle, Database, Event, EventKind, Id, Revision,
};

View file

@ -1,4 +1,4 @@
use crate::local_state::QueryRevisions;
use crate::zalsa_local::QueryRevisions;
use super::{memo::Memo, Configuration, IngredientImpl};

View file

@ -1,7 +1,7 @@
use arc_swap::ArcSwap;
use crossbeam::queue::SegQueue;
use crate::{local_state::QueryOrigin, Id};
use crate::{zalsa_local::QueryOrigin, Id};
use super::{memo, Configuration, IngredientImpl};

View file

@ -1,5 +1,5 @@
use crate::{
hash::FxHashSet, key::DependencyIndex, local_state::QueryRevisions, AsDynDatabase as _,
hash::FxHashSet, key::DependencyIndex, zalsa_local::QueryRevisions, AsDynDatabase as _,
DatabaseKeyIndex, Event, EventKind,
};

View file

@ -1,7 +1,7 @@
use std::sync::Arc;
use crate::{
local_state::ActiveQueryGuard, runtime::StampedValue, Cycle, Database, Event, EventKind,
zalsa_local::ActiveQueryGuard, runtime::StampedValue, Cycle, Database, Event, EventKind,
};
use super::{memo::Memo, Configuration, IngredientImpl};

View file

@ -1,7 +1,7 @@
use arc_swap::Guard;
use crate::{
local_state::ZalsaLocal, runtime::StampedValue, AsDynDatabase as _, Database as _, Id,
zalsa_local::ZalsaLocal, runtime::StampedValue, AsDynDatabase as _, Database as _, Id,
};
use super::{Configuration, IngredientImpl};

View file

@ -1,4 +1,4 @@
use crate::{local_state::QueryOrigin, Id};
use crate::{zalsa_local::QueryOrigin, Id};
use super::{Configuration, IngredientImpl};

View file

@ -2,7 +2,7 @@ use arc_swap::Guard;
use crate::{
key::DatabaseKeyIndex,
local_state::{ActiveQueryGuard, EdgeKind, QueryOrigin, ZalsaLocal},
zalsa_local::{ActiveQueryGuard, EdgeKind, QueryOrigin, ZalsaLocal},
runtime::StampedValue,
zalsa::Zalsa,
AsDynDatabase as _, Database, Id, Revision,

View file

@ -4,7 +4,7 @@ use arc_swap::{ArcSwap, Guard};
use crossbeam::atomic::AtomicCell;
use crate::{
hash::FxDashMap, key::DatabaseKeyIndex, local_state::QueryRevisions, zalsa::Zalsa, Event,
hash::FxDashMap, key::DatabaseKeyIndex, zalsa_local::QueryRevisions, zalsa::Zalsa, Event,
EventKind, Id, Revision,
};
@ -78,7 +78,7 @@ impl<C: Configuration> MemoMap<C> {
/// with an equivalent memo that has no value. If the memo is untracked, BaseInput,
/// or has values assigned as output of another query, this has no effect.
pub(super) fn evict(&self, key: Id) {
use crate::local_state::QueryOrigin;
use crate::zalsa_local::QueryOrigin;
use dashmap::mapref::entry::Entry::*;
if let Occupied(entry) = self.map.entry(key) {

View file

@ -1,7 +1,7 @@
use crossbeam::atomic::AtomicCell;
use crate::{
local_state::{QueryOrigin, QueryRevisions},
zalsa_local::{QueryOrigin, QueryRevisions},
tracked_struct::TrackedStructInDb,
AsDynDatabase as _, Database, DatabaseKeyIndex, Id,
};

View file

@ -4,7 +4,7 @@ use crossbeam::atomic::AtomicCell;
use crate::{
durability::Durability,
local_state::{QueryOrigin, QueryRevisions},
zalsa_local::{QueryOrigin, QueryRevisions},
Id, Runtime,
};

View file

@ -4,8 +4,8 @@ use std::{
};
use crate::{
hash::FxDashMap, key::DatabaseKeyIndex, local_state::ZalsaLocal, runtime::WaitResult,
zalsa::Zalsa, Database, Id,
hash::FxDashMap, key::DatabaseKeyIndex, runtime::WaitResult, zalsa::Zalsa,
zalsa_local::ZalsaLocal, Database, Id,
};
#[derive(Default)]

View file

@ -4,7 +4,7 @@ use std::{
};
use crate::{
cycle::CycleRecoveryStrategy, local_state::QueryOrigin, zalsa::IngredientIndex, Database,
cycle::CycleRecoveryStrategy, zalsa_local::QueryOrigin, zalsa::IngredientIndex, Database,
DatabaseKeyIndex, Id,
};

View file

@ -17,7 +17,7 @@ use crate::{
id::{AsId, FromId},
ingredient::{fmt_index, Ingredient},
key::{DatabaseKeyIndex, DependencyIndex},
local_state::QueryOrigin,
zalsa_local::QueryOrigin,
plumbing::{Jar, Stamp},
zalsa::IngredientIndex,
Database, Durability, Id, Revision,

View file

@ -1,7 +1,7 @@
use crate::cycle::CycleRecoveryStrategy;
use crate::ingredient::{fmt_index, Ingredient};
use crate::input::Configuration;
use crate::local_state::QueryOrigin;
use crate::zalsa_local::QueryOrigin;
use crate::zalsa::IngredientIndex;
use crate::{Database, DatabaseKeyIndex, Id, Revision};
use std::fmt;

View file

@ -9,7 +9,7 @@ use crate::durability::Durability;
use crate::id::AsId;
use crate::ingredient::fmt_index;
use crate::key::DependencyIndex;
use crate::local_state::QueryOrigin;
use crate::zalsa_local::QueryOrigin;
use crate::plumbing::Jar;
use crate::zalsa::IngredientIndex;
use crate::{Database, DatabaseKeyIndex, Id};

View file

@ -16,7 +16,7 @@ mod ingredient_list;
mod input;
mod interned;
mod key;
mod local_state;
mod zalsa_local;
mod nonce;
mod revision;
mod runtime;

View file

@ -9,7 +9,7 @@ use parking_lot::Mutex;
use crate::{
active_query::ActiveQuery, cycle::CycleRecoveryStrategy, durability::Durability,
key::DatabaseKeyIndex, local_state::ZalsaLocal, revision::AtomicRevision, Cancelled, Cycle,
key::DatabaseKeyIndex, zalsa_local::ZalsaLocal, revision::AtomicRevision, Cancelled, Cycle,
Database, Event, EventKind, Revision,
};

View file

@ -11,7 +11,7 @@ use crate::{
ingredient::{fmt_index, Ingredient, Jar},
ingredient_list::IngredientList,
key::{DatabaseKeyIndex, DependencyIndex},
local_state::QueryOrigin,
zalsa_local::QueryOrigin,
salsa_struct::SalsaStructInDb,
zalsa::IngredientIndex,
Database, Durability, Event, Id, Revision,

View file

@ -91,7 +91,7 @@ where
field_changed_at > revision
}
fn origin(&self, _key_index: crate::Id) -> Option<crate::local_state::QueryOrigin> {
fn origin(&self, _key_index: crate::Id) -> Option<crate::zalsa_local::QueryOrigin> {
None
}

View file

@ -8,10 +8,10 @@ use rustc_hash::FxHashMap;
use crate::cycle::CycleRecoveryStrategy;
use crate::database::UserData;
use crate::ingredient::{Ingredient, Jar};
use crate::local_state::ZalsaLocal;
use crate::nonce::{Nonce, NonceGenerator};
use crate::runtime::{Runtime, WaitResult};
use crate::views::Views;
use crate::zalsa_local::ZalsaLocal;
use crate::{Database, DatabaseImpl, DatabaseKeyIndex, Durability, Revision};
pub fn views<Db: ?Sized + Database>(db: &Db) -> &Views {