fn initial_dirty_nodes<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
                                 incremental_hashes_map: &IncrementalHashesMap,
                                 serialized_hashes: &[SerializedHash],
                                 retraced: &RetracedDefIdDirectory)
                                 -> DirtyNodes {
    let mut hcx = HashContext::new(tcx, incremental_hashes_map);
    let mut dirty_nodes = FxHashMap();

    let print_removed_message = |dep_node: &DepNode<_>| {
        if tcx.sess.opts.debugging_opts.incremental_dump_hash {
            println!("node {:?} is dirty as it was removed", dep_node);
        }

        debug!("initial_dirty_nodes: {:?} is dirty as it was removed", dep_node);
    };

    for hash in serialized_hashes {
        if let Some(dep_node) = retraced.map(&hash.dep_node) {
            if let Some(current_hash) = hcx.hash(&dep_node) {
                if current_hash == hash.hash {
                    debug!("initial_dirty_nodes: {:?} is clean (hash={:?})",
                       dep_node.map_def(|&def_id| Some(tcx.def_path(def_id))).unwrap(),
                       current_hash);
                    continue;
                }

                if tcx.sess.opts.debugging_opts.incremental_dump_hash {
                    println!("node {:?} is dirty as hash is {:?} was {:?}",
                             dep_node.map_def(|&def_id| Some(tcx.def_path(def_id))).unwrap(),
                             current_hash,
                             hash.hash);
                }

                debug!("initial_dirty_nodes: {:?} is dirty as hash is {:?}, was {:?}",
                       dep_node.map_def(|&def_id| Some(tcx.def_path(def_id))).unwrap(),
                       current_hash,
                       hash.hash);
            } else {
                print_removed_message(&hash.dep_node);
            }
        } else {
            print_removed_message(&hash.dep_node);
        }

        dirty_nodes.insert(hash.dep_node.clone(), hash.dep_node.clone());
    }

    dirty_nodes
}
/// Computes which of the original set of def-ids are dirty. Stored in
/// a bit vector where the index is the DefPathIndex.
Computes which of the original set of def-ids are dirty. Stored in
a bit vector where the index is the DefPathIndex.
Computes which of the original set of def - ids are dirty . Stored in a bit vector where the index is the DefPathIndex .
fn initial_dirty_nodes<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
                                 incremental_hashes_map: &IncrementalHashesMap,
                                 serialized_hashes: &[SerializedHash],
                                 retraced: &RetracedDefIdDirectory)
                                 -> DirtyNodes {
    let mut hcx = HashContext::new(tcx, incremental_hashes_map);
    let mut dirty_nodes = FxHashMap();
    let print_removed_message = |dep_node: &DepNode<_>| {
        if tcx.sess.opts.debugging_opts.incremental_dump_hash {
            println!("node {:?} is dirty as it was removed", dep_node);
        }
        debug!("initial_dirty_nodes: {:?} is dirty as it was removed", dep_node);
    };
    for hash in serialized_hashes {
        if let Some(dep_node) = retraced.map(&hash.dep_node) {
            if let Some(current_hash) = hcx.hash(&dep_node) {
                if current_hash == hash.hash {
                    debug!("initial_dirty_nodes: {:?} is clean (hash={:?})",
                       dep_node.map_def(|&def_id| Some(tcx.def_path(def_id))).unwrap(),
                       current_hash);
                    continue;
                }
                if tcx.sess.opts.debugging_opts.incremental_dump_hash {
                    println!("node {:?} is dirty as hash is {:?} was {:?}",
                             dep_node.map_def(|&def_id| Some(tcx.def_path(def_id))).unwrap(),
                             current_hash,
                             hash.hash);
                }
                debug!("initial_dirty_nodes: {:?} is dirty as hash is {:?}, was {:?}",
                       dep_node.map_def(|&def_id| Some(tcx.def_path(def_id))).unwrap(),
                       current_hash,
                       hash.hash);
            } else {
                print_removed_message(&hash.dep_node);
            }
        } else {
            print_removed_message(&hash.dep_node);
        }
        dirty_nodes.insert(hash.dep_node.clone(), hash.dep_node.clone());
    }
    dirty_nodes
}
fn initial_dirty_nodes < ' a , ' tcx > ( tcx : TyCtxt < ' a , ' tcx , ' tcx > , incremental_hashes_map : & IncrementalHashesMap , serialized_hashes : & [ SerializedHash ] , retraced : & RetracedDefIdDirectory ) -> DirtyNodes { let mut hcx = HashContext :: new ( tcx , incremental_hashes_map ) ; let mut dirty_nodes = FxHashMap ( ) ; let print_removed_message = | dep_node : & DepNode < _ > | { if tcx . sess . opts . debugging_opts . incremental_dump_hash { println ! ( " " dep_node ) ; } debug ! ( " " dep_node ) ; } ; for hash in serialized_hashes { if let Some ( dep_node ) = retraced . map ( & hash . dep_node ) { if let Some ( current_hash ) = hcx . hash ( & dep_node ) { if current_hash == hash . hash { debug ! ( " " dep_node map_def ( def_id Some ( tcx def_path ( def_id ) ) ) unwrap ( ) current_hash ) ; continue ; } if tcx . sess . opts . debugging_opts . incremental_dump_hash { println ! ( " " dep_node map_def ( def_id Some ( tcx def_path ( def_id ) ) ) unwrap ( ) current_hash hash hash ) ; } debug ! ( " " dep_node map_def ( def_id Some ( tcx def_path ( def_id ) ) ) unwrap ( ) current_hash hash hash ) ; } else { print_removed_message ( & hash . dep_node ) ; } } else { print_removed_message ( & hash . dep_node ) ; } dirty_nodes . insert ( hash . dep_node . clone ( ) , hash . dep_node . clone ( ) ) ; } dirty_nodes }
Computes which of the original set of def-ids are dirty.
Computes which of the original set of def - ids are dirty .
tcx
TyCtxt<'a, 'tcx, 'tcx>
incremental_hashes_map
&IncrementalHashesMap
serialized_hashes
&[SerializedHash]
retraced
&RetracedDefIdDirectory
tcx
TyCtxt<'a, 'tcx, 'tcx>
incremental_hashes_map
&IncrementalHashesMap
serialized_hashes
&[SerializedHash]
retraced
&RetracedDefIdDirectory