Add comments
This commit is contained in:
parent
453b51a65a
commit
9a847b1ea5
1 changed files with 9 additions and 0 deletions
|
@ -533,6 +533,8 @@ impl<D: Deps> DepGraph<D> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// This encodes a diagnostic by creating a node with an unique index and assoicating
|
||||||
|
/// `diagnostic` with it, for use in the next session.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn record_diagnostic<Qcx: QueryContext>(&self, qcx: Qcx, diagnostic: &DiagInner) {
|
pub fn record_diagnostic<Qcx: QueryContext>(&self, qcx: Qcx, diagnostic: &DiagInner) {
|
||||||
if let Some(ref data) = self.data {
|
if let Some(ref data) = self.data {
|
||||||
|
@ -540,6 +542,8 @@ impl<D: Deps> DepGraph<D> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// This forces a diagnostic node green by running its side effect. `prev_index` would
|
||||||
|
/// refer to a node created used `encode_diagnostic` in the previous session.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn force_diagnostic_node<Qcx: QueryContext>(
|
pub fn force_diagnostic_node<Qcx: QueryContext>(
|
||||||
&self,
|
&self,
|
||||||
|
@ -673,12 +677,15 @@ impl<D: Deps> DepGraphData<D> {
|
||||||
self.debug_loaded_from_disk.lock().insert(dep_node);
|
self.debug_loaded_from_disk.lock().insert(dep_node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// This encodes a diagnostic by creating a node with an unique index and assoicating
|
||||||
|
/// `diagnostic` with it, for use in the next session.
|
||||||
#[inline]
|
#[inline]
|
||||||
fn encode_diagnostic<Qcx: QueryContext>(
|
fn encode_diagnostic<Qcx: QueryContext>(
|
||||||
&self,
|
&self,
|
||||||
qcx: Qcx,
|
qcx: Qcx,
|
||||||
diagnostic: &DiagInner,
|
diagnostic: &DiagInner,
|
||||||
) -> DepNodeIndex {
|
) -> DepNodeIndex {
|
||||||
|
// Use `send` so we get an unique index, even though the dep node is not.
|
||||||
let dep_node_index = self.current.encoder.send(
|
let dep_node_index = self.current.encoder.send(
|
||||||
DepNode {
|
DepNode {
|
||||||
kind: D::DEP_KIND_SIDE_EFFECT,
|
kind: D::DEP_KIND_SIDE_EFFECT,
|
||||||
|
@ -694,6 +701,8 @@ impl<D: Deps> DepGraphData<D> {
|
||||||
dep_node_index
|
dep_node_index
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// This forces a diagnostic node green by running its side effect. `prev_index` would
|
||||||
|
/// refer to a node created used `encode_diagnostic` in the previous session.
|
||||||
#[inline]
|
#[inline]
|
||||||
fn force_diagnostic_node<Qcx: QueryContext>(
|
fn force_diagnostic_node<Qcx: QueryContext>(
|
||||||
&self,
|
&self,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue