switch interner to use arena

This commit is contained in:
Aleksey Kladov 2019-01-08 15:53:32 +03:00
parent 5603237c06
commit d4c8310d05
6 changed files with 23 additions and 40 deletions

View file

@ -18,23 +18,9 @@ pub use crate::{
FileTextQuery, FileSourceRootQuery, SourceRootQuery, LocalRootsQuery, LibraryRootsQuery, CrateGraphQuery,
FileRelativePathQuery
},
loc2id::{LocationIntener, NumericId},
loc2id::LocationIntener,
};
#[macro_export]
macro_rules! impl_numeric_id {
($id:ident) => {
impl $crate::NumericId for $id {
fn from_u32(id: u32) -> Self {
$id(id)
}
fn to_u32(self) -> u32 {
self.0
}
}
};
}
pub trait BaseDatabase: salsa::Database {
fn check_canceled(&self) -> Cancelable<()> {
if self.salsa_runtime().is_current_revision_canceled() {