incr.comp.: Make MIR encoding fit for incr.comp. caching.
This commit is contained in:
parent
436ac8928a
commit
8fbc91cfe1
8 changed files with 81 additions and 27 deletions
|
|
@ -21,6 +21,7 @@ use rustc::hir::def::{self, Def, CtorKind};
|
|||
use rustc::hir::def_id::{CrateNum, DefId, DefIndex, CRATE_DEF_INDEX, LOCAL_CRATE};
|
||||
use rustc::ich::Fingerprint;
|
||||
use rustc::middle::lang_items;
|
||||
use rustc::mir;
|
||||
use rustc::session::Session;
|
||||
use rustc::ty::{self, Ty, TyCtxt};
|
||||
use rustc::ty::codec::TyDecoder;
|
||||
|
|
@ -327,6 +328,14 @@ impl<'a, 'tcx> SpecializedDecoder<Span> for DecodeContext<'a, 'tcx> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, 'tcx, T: Decodable> SpecializedDecoder<mir::ClearCrossCrate<T>>
|
||||
for DecodeContext<'a, 'tcx> {
|
||||
#[inline]
|
||||
fn specialized_decode(&mut self) -> Result<mir::ClearCrossCrate<T>, Self::Error> {
|
||||
Ok(mir::ClearCrossCrate::Clear)
|
||||
}
|
||||
}
|
||||
|
||||
implement_ty_decoder!( DecodeContext<'a, 'tcx> );
|
||||
|
||||
impl<'a, 'tcx> MetadataBlob {
|
||||
|
|
|
|||
|
|
@ -157,6 +157,15 @@ impl<'a, 'tcx> SpecializedEncoder<ty::GenericPredicates<'tcx>> for EncodeContext
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, 'tcx, T: Encodable> SpecializedEncoder<mir::ClearCrossCrate<T>>
|
||||
for EncodeContext<'a, 'tcx> {
|
||||
fn specialized_encode(&mut self,
|
||||
_: &mir::ClearCrossCrate<T>)
|
||||
-> Result<(), Self::Error> {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, 'tcx> TyEncoder for EncodeContext<'a, 'tcx> {
|
||||
fn position(&self) -> usize {
|
||||
self.opaque.position()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue