From 8876f44054f57c1f4ee305eb47340609683bd566 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 4 May 2019 15:26:55 +0300 Subject: [PATCH] Revert "eagarly clean astd maps" This reverts commit 6c63a59425e256ce46d058807b64149297231982. This causes massive slowdowns: looks like we accidentally have some source-depndent --- crates/ra_hir/src/db.rs | 2 +- crates/ra_hir/src/source_id.rs | 2 +- crates/ra_syntax/src/grammar.ron | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ra_hir/src/db.rs b/crates/ra_hir/src/db.rs index 3ac3c79a32f..8af0a317612 100644 --- a/crates/ra_hir/src/db.rs +++ b/crates/ra_hir/src/db.rs @@ -60,7 +60,7 @@ pub trait DefDatabase: SourceDatabase { #[salsa::invoke(crate::source_id::AstIdMap::ast_id_map_query)] fn ast_id_map(&self, file_id: HirFileId) -> Arc; - #[salsa::invoke(crate::source_id::AstIdMap::ast_id_to_node_query)] + #[salsa::invoke(crate::source_id::AstIdMap::file_item_query)] fn ast_id_to_node(&self, file_id: HirFileId, ast_id: ErasedFileAstId) -> TreeArc; #[salsa::invoke(RawItems::raw_items_query)] diff --git a/crates/ra_hir/src/source_id.rs b/crates/ra_hir/src/source_id.rs index a2bc9a79986..0a8fb6d3285 100644 --- a/crates/ra_hir/src/source_id.rs +++ b/crates/ra_hir/src/source_id.rs @@ -92,7 +92,7 @@ pub(crate) fn ast_id_map_query(db: &impl DefDatabase, file_id: HirFileId) -> Arc Arc::new(AstIdMap::from_source_file(&source_file)) } - pub(crate) fn ast_id_to_node_query( + pub(crate) fn file_item_query( db: &impl DefDatabase, file_id: HirFileId, ast_id: ErasedFileAstId, diff --git a/crates/ra_syntax/src/grammar.ron b/crates/ra_syntax/src/grammar.ron index cae5d877473..011ef0616fc 100644 --- a/crates/ra_syntax/src/grammar.ron +++ b/crates/ra_syntax/src/grammar.ron @@ -674,7 +674,7 @@ Grammar( "LifetimeArg": (), "MacroItems": ( - traits: [ "ModuleItemOwner", "FnDefOwner" ], + traits: [ "ModuleItemOwner", "FnDefOwner" ], ), "MacroStmts" : (