Explain why ensure
of a red node == the query
This commit is contained in:
parent
f03af1b8f1
commit
d0cb4d09cd
@ -363,6 +363,12 @@ macro_rules! define_maps {
|
||||
tcx.dep_graph.read_index(dep_node_index);
|
||||
}
|
||||
Some(DepNodeColor::Red) => {
|
||||
// A DepNodeColor::Red DepNode means that this query was executed
|
||||
// before. We can not call `dep_graph.read()` here as we don't have
|
||||
// the DepNodeIndex. Instead, We call the query again to issue the
|
||||
// appropriate `dep_graph.read()` call. The performance cost this
|
||||
// introduces should be negligible as we'll immediately hit the
|
||||
// in-memory cache.
|
||||
let _ = tcx.$name(key);
|
||||
}
|
||||
None => {
|
||||
|
Loading…
Reference in New Issue
Block a user