@@ -53,6 +53,7 @@ use core::prelude::*;
53
53
use middle:: resolve;
54
54
use middle:: ty:: { ty_param_substs_and_ty, vstore_uniq} ;
55
55
use middle:: ty;
56
+ use util:: common:: time;
56
57
use util:: ppaux;
57
58
58
59
use core:: result;
@@ -329,17 +330,24 @@ pub fn check_crate(tcx: ty::ctxt,
329
330
trait_map : resolve:: TraitMap ,
330
331
crate : @ast:: crate )
331
332
-> ( method_map , vtable_map ) {
333
+ let time_passes = tcx. sess . time_passes ( ) ;
332
334
let ccx = @mut CrateCtxt {
333
335
trait_map : trait_map,
334
336
method_map : oldmap:: HashMap ( ) ,
335
337
vtable_map : oldmap:: HashMap ( ) ,
336
338
coherence_info : @coherence:: CoherenceInfo ( ) ,
337
339
tcx : tcx
338
340
} ;
339
- collect:: collect_item_types ( ccx, crate ) ;
340
- coherence:: check_coherence ( ccx, crate ) ;
341
341
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
+
343
351
check_for_main_fn ( ccx) ;
344
352
tcx. sess . abort_if_errors ( ) ;
345
353
( ccx. method_map , ccx. vtable_map )
0 commit comments