incr.comp.: Cache type_of and some other queries.
This commit is contained in:
parent
47a8eb7c4e
commit
a084cd0ed2
3 changed files with 10 additions and 2 deletions
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -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)?;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue