aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-06-30 12:50:11 +0100
committerbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-06-30 12:50:11 +0100
commit79298b97228f09e0c5c51799700d8350f5468ed5 (patch)
tree74cde977e61652f9bd0af6c62449037ac100e94f /crates/ra_hir
parent2ad8220f58675193860337a00fed87162a98dc1a (diff)
parentd70520eb38c3f39823186c3b352efe4c910417f1 (diff)
Merge #1463
1463: print memory usage for queries r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir')
-rw-r--r--crates/ra_hir/src/db.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_hir/src/db.rs b/crates/ra_hir/src/db.rs
index 8f4de1c85..b7d5ab5c6 100644
--- a/crates/ra_hir/src/db.rs
+++ b/crates/ra_hir/src/db.rs
@@ -57,17 +57,21 @@ pub trait InternDatabase: SourceDatabase {
57pub trait AstDatabase: InternDatabase { 57pub trait AstDatabase: InternDatabase {
58 #[salsa::invoke(crate::source_id::AstIdMap::ast_id_map_query)] 58 #[salsa::invoke(crate::source_id::AstIdMap::ast_id_map_query)]
59 fn ast_id_map(&self, file_id: HirFileId) -> Arc<AstIdMap>; 59 fn ast_id_map(&self, file_id: HirFileId) -> Arc<AstIdMap>;
60
60 #[salsa::transparent] 61 #[salsa::transparent]
61 #[salsa::invoke(crate::source_id::AstIdMap::file_item_query)] 62 #[salsa::invoke(crate::source_id::AstIdMap::file_item_query)]
62 fn ast_id_to_node(&self, file_id: HirFileId, ast_id: ErasedFileAstId) -> TreeArc<SyntaxNode>; 63 fn ast_id_to_node(&self, file_id: HirFileId, ast_id: ErasedFileAstId) -> TreeArc<SyntaxNode>;
64
63 #[salsa::transparent] 65 #[salsa::transparent]
64 #[salsa::invoke(crate::ids::HirFileId::parse_or_expand_query)] 66 #[salsa::invoke(crate::ids::HirFileId::parse_or_expand_query)]
65 fn parse_or_expand(&self, file_id: HirFileId) -> Option<TreeArc<SyntaxNode>>; 67 fn parse_or_expand(&self, file_id: HirFileId) -> Option<TreeArc<SyntaxNode>>;
68
66 #[salsa::invoke(crate::ids::HirFileId::parse_macro_query)] 69 #[salsa::invoke(crate::ids::HirFileId::parse_macro_query)]
67 fn parse_macro(&self, macro_file: ids::MacroFile) -> Option<TreeArc<SyntaxNode>>; 70 fn parse_macro(&self, macro_file: ids::MacroFile) -> Option<TreeArc<SyntaxNode>>;
68 71
69 #[salsa::invoke(crate::ids::macro_def_query)] 72 #[salsa::invoke(crate::ids::macro_def_query)]
70 fn macro_def(&self, macro_id: MacroDefId) -> Option<Arc<mbe::MacroRules>>; 73 fn macro_def(&self, macro_id: MacroDefId) -> Option<Arc<mbe::MacroRules>>;
74
71 #[salsa::invoke(crate::ids::macro_arg_query)] 75 #[salsa::invoke(crate::ids::macro_arg_query)]
72 fn macro_arg(&self, macro_call: ids::MacroCallId) -> Option<Arc<tt::Subtree>>; 76 fn macro_arg(&self, macro_call: ids::MacroCallId) -> Option<Arc<tt::Subtree>>;
73 77