File tree Expand file tree Collapse file tree 3 files changed +20
-2
lines changed
branches/beta/src/librustc_incremental/persist Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
23
23
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
24
24
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
25
25
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26
- refs/heads/beta: 068142a2e6d8a72e52091ccebd3368ffaf267643
26
+ refs/heads/beta: a5236e9da03fe58c4db8f011880c74a6911ed5e7
27
27
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
28
28
refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
29
29
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
Original file line number Diff line number Diff line change
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
+
Original file line number Diff line number Diff line change 10
10
11
11
//! Code to save/load the dep-graph from files.
12
12
13
-
14
13
use calculate_svh:: SvhCalculate ;
15
14
use rbml:: { self , Doc } ;
16
15
use rbml:: reader:: { self , DecodeResult , Decoder } ;
@@ -32,6 +31,12 @@ type DirtyNodes = FnvHashSet<DepNode<DefId>>;
32
31
33
32
type CleanEdges = Vec < ( DepNode < DefId > , DepNode < DefId > ) > ;
34
33
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.
35
40
pub fn load_dep_graph < ' tcx > ( tcx : & ty:: TyCtxt < ' tcx > ) {
36
41
let _ignore = tcx. dep_graph . in_ignore ( ) ;
37
42
You can’t perform that action at this time.
0 commit comments