aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_db/src/change.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_db/src/change.rs')
-rw-r--r--crates/ra_ide_db/src/change.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/crates/ra_ide_db/src/change.rs b/crates/ra_ide_db/src/change.rs
index 2504d7a33..d8da3f949 100644
--- a/crates/ra_ide_db/src/change.rs
+++ b/crates/ra_ide_db/src/change.rs
@@ -147,21 +147,21 @@ impl RootDatabase {
147 147
148 let sweep = SweepStrategy::default().discard_values().sweep_all_revisions(); 148 let sweep = SweepStrategy::default().discard_values().sweep_all_revisions();
149 149
150 self.query(ra_db::ParseQuery).sweep(sweep); 150 ra_db::ParseQuery.in_db(self).sweep(sweep);
151 self.query(hir::db::ParseMacroQuery).sweep(sweep); 151 hir::db::ParseMacroQuery.in_db(self).sweep(sweep);
152 152
153 // Macros do take significant space, but less then the syntax trees 153 // Macros do take significant space, but less then the syntax trees
154 // self.query(hir::db::MacroDefQuery).sweep(sweep); 154 // self.query(hir::db::MacroDefQuery).sweep(sweep);
155 // self.query(hir::db::MacroArgQuery).sweep(sweep); 155 // self.query(hir::db::MacroArgQuery).sweep(sweep);
156 // self.query(hir::db::MacroExpandQuery).sweep(sweep); 156 // self.query(hir::db::MacroExpandQuery).sweep(sweep);
157 157
158 self.query(hir::db::AstIdMapQuery).sweep(sweep); 158 hir::db::AstIdMapQuery.in_db(self).sweep(sweep);
159 159
160 self.query(hir::db::BodyWithSourceMapQuery).sweep(sweep); 160 hir::db::BodyWithSourceMapQuery.in_db(self).sweep(sweep);
161 161
162 self.query(hir::db::ExprScopesQuery).sweep(sweep); 162 hir::db::ExprScopesQuery.in_db(self).sweep(sweep);
163 self.query(hir::db::InferQueryQuery).sweep(sweep); 163 hir::db::InferQueryQuery.in_db(self).sweep(sweep);
164 self.query(hir::db::BodyQuery).sweep(sweep); 164 hir::db::BodyQuery.in_db(self).sweep(sweep);
165 } 165 }
166 166
167 pub fn per_query_memory_usage(&mut self) -> Vec<(String, Bytes)> { 167 pub fn per_query_memory_usage(&mut self) -> Vec<(String, Bytes)> {
@@ -170,14 +170,14 @@ impl RootDatabase {
170 macro_rules! sweep_each_query { 170 macro_rules! sweep_each_query {
171 ($($q:path)*) => {$( 171 ($($q:path)*) => {$(
172 let before = memory_usage().allocated; 172 let before = memory_usage().allocated;
173 self.query($q).sweep(sweep); 173 $q.in_db(self).sweep(sweep);
174 let after = memory_usage().allocated; 174 let after = memory_usage().allocated;
175 let q: $q = Default::default(); 175 let q: $q = Default::default();
176 let name = format!("{:?}", q); 176 let name = format!("{:?}", q);
177 acc.push((name, before - after)); 177 acc.push((name, before - after));
178 178
179 let before = memory_usage().allocated; 179 let before = memory_usage().allocated;
180 self.query($q).sweep(sweep.discard_everything()); 180 $q.in_db(self).sweep(sweep.discard_everything());
181 let after = memory_usage().allocated; 181 let after = memory_usage().allocated;
182 let q: $q = Default::default(); 182 let q: $q = Default::default();
183 let name = format!("{:?} (deps)", q); 183 let name = format!("{:?} (deps)", q);
@@ -252,7 +252,7 @@ impl RootDatabase {
252 // write. 252 // write.
253 // We do this after collecting the non-interned queries to correctly attribute memory used 253 // We do this after collecting the non-interned queries to correctly attribute memory used
254 // by interned data. 254 // by interned data.
255 self.runtime.synthetic_write(Durability::HIGH); 255 self.salsa_runtime_mut().synthetic_write(Durability::HIGH);
256 256
257 sweep_each_query![ 257 sweep_each_query![
258 // AstDatabase 258 // AstDatabase