Build jump table at runtime.
This commit is contained in:
parent
602d3cbce3
commit
bd5c107672
10 changed files with 112 additions and 131 deletions
|
@ -576,7 +576,7 @@ impl<K: DepKind> DepGraph<K> {
|
|||
"try_mark_previous_green({:?}) --- trying to force dependency {:?}",
|
||||
dep_node, dep_dep_node
|
||||
);
|
||||
if !tcx.dep_context().try_force_from_dep_node(dep_dep_node) {
|
||||
if !tcx.dep_context().try_force_from_dep_node(*dep_dep_node) {
|
||||
// The DepNode could not be forced.
|
||||
debug!(
|
||||
"try_mark_previous_green({:?}) - END - dependency {:?} could not be forced",
|
||||
|
@ -749,7 +749,7 @@ impl<K: DepKind> DepGraph<K> {
|
|||
match data.colors.get(prev_index) {
|
||||
Some(DepNodeColor::Green(_)) => {
|
||||
let dep_node = data.previous.index_to_node(prev_index);
|
||||
tcx.try_load_from_on_disk_cache(&dep_node);
|
||||
tcx.try_load_from_on_disk_cache(dep_node);
|
||||
}
|
||||
None | Some(DepNodeColor::Red) => {
|
||||
// We can skip red nodes because a node can only be marked
|
||||
|
|
|
@ -39,10 +39,10 @@ pub trait DepContext: Copy {
|
|||
fn fingerprint_style(&self, kind: Self::DepKind) -> FingerprintStyle;
|
||||
|
||||
/// Try to force a dep node to execute and see if it's green.
|
||||
fn try_force_from_dep_node(&self, dep_node: &DepNode<Self::DepKind>) -> bool;
|
||||
fn try_force_from_dep_node(&self, dep_node: DepNode<Self::DepKind>) -> bool;
|
||||
|
||||
/// Load data from the on-disk cache.
|
||||
fn try_load_from_on_disk_cache(&self, dep_node: &DepNode<Self::DepKind>);
|
||||
fn try_load_from_on_disk_cache(&self, dep_node: DepNode<Self::DepKind>);
|
||||
}
|
||||
|
||||
pub trait HasDepContext: Copy {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue