librustc: Speed up moves a lot. r=nmatsakis

This commit is contained in:
Patrick Walton 2013-02-12 16:16:23 -08:00
parent bc2d147847
commit a165f88272

View File

@ -1932,6 +1932,10 @@ pub fn type_contents(cx: ctxt, ty: t) -> TypeContents {
Some(tc) => { return *tc; }
None => {}
}
match cx.tc_cache.find(&ty_id) { // Must check both caches!
Some(tc) => { return *tc; }
None => {}
}
cache.insert(ty_id, TC_NONE);
debug!("computing contents of %s", ty_to_str(cx, ty));