Skip to content

Commit 7b41ca8

Browse files
committed
---
yaml --- r: 272103 b: refs/heads/master c: a5236e9 h: refs/heads/master i: 272101: f977488 272099: 0a9dff7 272095: f935abe
1 parent 0208d6b commit 7b41ca8

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 068142a2e6d8a72e52091ccebd3368ffaf267643
2+
refs/heads/master: a5236e9da03fe58c4db8f011880c74a6911ed5e7
33
refs/heads/snap-stage3: 235d77457d80b549dad3ac36d94f235208a1eafb
44
refs/heads/try: 49312a405e14a449b98fe0056b12a40ac128be4a
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
This is the code to load/save the dependency graph. Loading is assumed
2+
to run early in compilation, and saving at the very end. When loading,
3+
the basic idea is that we will load up the dependency graph from the
4+
previous compilation and compare the hashes of our HIR nodes to the
5+
hashes of the HIR nodes that existed at the time. For each node whose
6+
hash has changed, or which no longer exists in the new HIR, we can
7+
remove that node from the old graph along with any nodes that depend
8+
on it. Then we add what's left to the new graph (if any such nodes or
9+
edges already exist, then there would be no effect, but since we do
10+
this first thing, they do not).
11+
12+
13+

trunk/src/librustc_incremental/persist/load.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
//! Code to save/load the dep-graph from files.
1212
13-
1413
use calculate_svh::SvhCalculate;
1514
use rbml::{self, Doc};
1615
use rbml::reader::{self, DecodeResult, Decoder};
@@ -32,6 +31,12 @@ type DirtyNodes = FnvHashSet<DepNode<DefId>>;
3231

3332
type CleanEdges = Vec<(DepNode<DefId>, DepNode<DefId>)>;
3433

34+
/// If we are in incremental mode, and a previous dep-graph exists,
35+
/// then load up those nodes/edges that are still valid into the
36+
/// dep-graph for this session. (This is assumed to be running very
37+
/// early in compilation, before we've really done any work, but
38+
/// actually it doesn't matter all that much.) See `README.md` for
39+
/// more general overview.
3540
pub fn load_dep_graph<'tcx>(tcx: &ty::TyCtxt<'tcx>) {
3641
let _ignore = tcx.dep_graph.in_ignore();
3742

0 commit comments

Comments
 (0)