@@ -53,6 +53,7 @@ use core::prelude::*;
5353use middle:: resolve;
5454use middle:: ty:: { ty_param_substs_and_ty, vstore_uniq} ;
5555use middle:: ty;
56+ use util:: common:: time;
5657use util:: ppaux;
5758
5859use core:: result;
@@ -329,17 +330,24 @@ pub fn check_crate(tcx: ty::ctxt,
329330 trait_map : resolve:: TraitMap ,
330331 crate : @ast:: crate )
331332 -> ( method_map , vtable_map ) {
333+ let time_passes = tcx. sess . time_passes ( ) ;
332334 let ccx = @mut CrateCtxt {
333335 trait_map : trait_map,
334336 method_map : oldmap:: HashMap ( ) ,
335337 vtable_map : oldmap:: HashMap ( ) ,
336338 coherence_info : @coherence:: CoherenceInfo ( ) ,
337339 tcx : tcx
338340 } ;
339- collect:: collect_item_types ( ccx, crate ) ;
340- coherence:: check_coherence ( ccx, crate ) ;
341341
342- check:: check_item_types ( ccx, crate ) ;
342+ time ( time_passes, ~"type collecting", ||
343+ collect:: collect_item_types ( ccx, crate ) ) ;
344+
345+ time ( time_passes, ~"method resolution", ||
346+ coherence:: check_coherence ( ccx, crate ) ) ;
347+
348+ time ( time_passes, ~"type checking", ||
349+ check:: check_item_types ( ccx, crate ) ) ;
350+
343351 check_for_main_fn ( ccx) ;
344352 tcx. sess . abort_if_errors ( ) ;
345353 ( ccx. method_map , ccx. vtable_map )
0 commit comments