File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
compiler/rustc_query_system/src/dep_graph Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 1
1
//! The data that we will serialize and deserialize.
2
+ //!
3
+ //! The dep-graph is serialized as a sequence of NodeInfo, with the dependencies
4
+ //! specified inline. The total number of nodes and edges are stored as the last
5
+ //! 16 bytes of the file, so we can find them easily at decoding time.
6
+ //!
7
+ //! The serialisation is performed on-demand when each node is emitted. Using this
8
+ //! scheme, we do not need to keep the current graph in memory.
9
+ //!
10
+ //! The deserisalisation is performed manually, in order to convert from the stored
11
+ //! sequence of NodeInfos to the different arrays in SerializedDepGraph. Since the
12
+ //! node and edge count are stored at the end of the file, all the arrays can be
13
+ //! pre-allocated with the right length.
2
14
3
15
use super :: query:: DepGraphQuery ;
4
16
use super :: { DepKind , DepNode , DepNodeIndex } ;
You can’t perform that action at this time.
0 commit comments