diff options
| author | Michael Woerister <michaelwoerister@posteo> | 2018-01-15 16:38:04 +0100 |
|---|---|---|
| committer | Michael Woerister <michaelwoerister@posteo> | 2018-01-23 10:28:17 +0100 |
| commit | a084cd0ed2ec8f4c4706e843c3b4ed2e07ac3b7f (patch) | |
| tree | bd0acb326c2bacbb8c8290761e0c087790a6df28 /src | |
| parent | 47a8eb7c4e24b61a8a9ab4eaff60ef65291aaa56 (diff) | |
| download | rust-a084cd0ed2ec8f4c4706e843c3b4ed2e07ac3b7f.tar.gz rust-a084cd0ed2ec8f4c4706e843c3b4ed2e07ac3b7f.zip | |
incr.comp.: Cache type_of and some other queries.
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc/ty/maps/config.rs | 3 | ||||
| -rw-r--r-- | src/librustc/ty/maps/on_disk_cache.rs | 6 | ||||
| -rw-r--r-- | src/librustc/ty/maps/plumbing.rs | 3 |
3 files changed, 10 insertions, 2 deletions
diff --git a/src/librustc/ty/maps/config.rs b/src/librustc/ty/maps/config.rs index 8dedcb24c2f..1dad74fb28e 100644 --- a/src/librustc/ty/maps/config.rs +++ b/src/librustc/ty/maps/config.rs @@ -662,3 +662,6 @@ impl_disk_cacheable_query!(mir_const_qualif, |def_id| def_id.is_local()); impl_disk_cacheable_query!(check_match, |def_id| def_id.is_local()); impl_disk_cacheable_query!(contains_extern_indicator, |_| true); impl_disk_cacheable_query!(def_symbol_name, |_| true); +impl_disk_cacheable_query!(type_of, |def_id| def_id.is_local()); +impl_disk_cacheable_query!(predicates_of, |def_id| def_id.is_local()); +impl_disk_cacheable_query!(used_trait_imports, |def_id| def_id.is_local()); diff --git a/src/librustc/ty/maps/on_disk_cache.rs b/src/librustc/ty/maps/on_disk_cache.rs index 4e2421dad21..a489bec5b27 100644 --- a/src/librustc/ty/maps/on_disk_cache.rs +++ b/src/librustc/ty/maps/on_disk_cache.rs @@ -204,8 +204,11 @@ impl<'sess> OnDiskCache<'sess> { let enc = &mut encoder; let qri = &mut query_result_index; - // Encode TypeckTables + encode_query_results::<type_of, _>(tcx, enc, qri)?; + encode_query_results::<predicates_of, _>(tcx, enc, qri)?; + encode_query_results::<used_trait_imports, _>(tcx, enc, qri)?; encode_query_results::<typeck_tables_of, _>(tcx, enc, qri)?; + encode_query_results::<trans_fulfill_obligation, _>(tcx, enc, qri)?; encode_query_results::<optimized_mir, _>(tcx, enc, qri)?; encode_query_results::<unsafety_check_result, _>(tcx, enc, qri)?; encode_query_results::<borrowck, _>(tcx, enc, qri)?; @@ -215,7 +218,6 @@ impl<'sess> OnDiskCache<'sess> { encode_query_results::<const_is_rvalue_promotable_to_static, _>(tcx, enc, qri)?; encode_query_results::<contains_extern_indicator, _>(tcx, enc, qri)?; encode_query_results::<symbol_name, _>(tcx, enc, qri)?; - encode_query_results::<trans_fulfill_obligation, _>(tcx, enc, qri)?; encode_query_results::<check_match, _>(tcx, enc, qri)?; } diff --git a/src/librustc/ty/maps/plumbing.rs b/src/librustc/ty/maps/plumbing.rs index d670ecc2691..a0db3c7bca8 100644 --- a/src/librustc/ty/maps/plumbing.rs +++ b/src/librustc/ty/maps/plumbing.rs @@ -982,4 +982,7 @@ impl_load_from_cache!( ConstIsRvaluePromotableToStatic => const_is_rvalue_promotable_to_static, ContainsExternIndicator => contains_extern_indicator, CheckMatch => check_match, + TypeOfItem => type_of, + PredicatesOfItem => predicates_of, + UsedTraitImports => used_trait_imports, ); |
