mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-05 11:48:30 +00:00
rustc_query_system: minor cleanup
Remove effectively unused parameter and delete out of date comment.
This commit is contained in:
parent
dd1ab840d2
commit
4f76266295
@ -242,7 +242,6 @@ impl<K: DepKind> DepGraph<K> {
|
|||||||
key,
|
key,
|
||||||
cx,
|
cx,
|
||||||
arg,
|
arg,
|
||||||
false,
|
|
||||||
task,
|
task,
|
||||||
|_key| {
|
|_key| {
|
||||||
Some(TaskDeps {
|
Some(TaskDeps {
|
||||||
@ -262,29 +261,16 @@ impl<K: DepKind> DepGraph<K> {
|
|||||||
key: DepNode<K>,
|
key: DepNode<K>,
|
||||||
cx: Ctxt,
|
cx: Ctxt,
|
||||||
arg: A,
|
arg: A,
|
||||||
no_tcx: bool,
|
|
||||||
task: fn(Ctxt, A) -> R,
|
task: fn(Ctxt, A) -> R,
|
||||||
create_task: fn(DepNode<K>) -> Option<TaskDeps<K>>,
|
create_task: fn(DepNode<K>) -> Option<TaskDeps<K>>,
|
||||||
hash_result: impl FnOnce(&mut Ctxt::StableHashingContext, &R) -> Option<Fingerprint>,
|
hash_result: impl FnOnce(&mut Ctxt::StableHashingContext, &R) -> Option<Fingerprint>,
|
||||||
) -> (R, DepNodeIndex) {
|
) -> (R, DepNodeIndex) {
|
||||||
if let Some(ref data) = self.data {
|
if let Some(ref data) = self.data {
|
||||||
let task_deps = create_task(key).map(Lock::new);
|
let task_deps = create_task(key).map(Lock::new);
|
||||||
|
let result = K::with_deps(task_deps.as_ref(), || task(cx, arg));
|
||||||
// In incremental mode, hash the result of the task. We don't
|
|
||||||
// do anything with the hash yet, but we are computing it
|
|
||||||
// anyway so that
|
|
||||||
// - we make sure that the infrastructure works and
|
|
||||||
// - we can get an idea of the runtime cost.
|
|
||||||
let mut hcx = cx.create_stable_hashing_context();
|
|
||||||
|
|
||||||
let result = if no_tcx {
|
|
||||||
task(cx, arg)
|
|
||||||
} else {
|
|
||||||
K::with_deps(task_deps.as_ref(), || task(cx, arg))
|
|
||||||
};
|
|
||||||
|
|
||||||
let edges = task_deps.map_or_else(|| smallvec![], |lock| lock.into_inner().reads);
|
let edges = task_deps.map_or_else(|| smallvec![], |lock| lock.into_inner().reads);
|
||||||
|
|
||||||
|
let mut hcx = cx.create_stable_hashing_context();
|
||||||
let current_fingerprint = hash_result(&mut hcx, &result);
|
let current_fingerprint = hash_result(&mut hcx, &result);
|
||||||
|
|
||||||
let print_status = cfg!(debug_assertions) && cx.debug_dep_tasks();
|
let print_status = cfg!(debug_assertions) && cx.debug_dep_tasks();
|
||||||
@ -413,7 +399,7 @@ impl<K: DepKind> DepGraph<K> {
|
|||||||
task: fn(Ctxt, A) -> R,
|
task: fn(Ctxt, A) -> R,
|
||||||
hash_result: impl FnOnce(&mut Ctxt::StableHashingContext, &R) -> Option<Fingerprint>,
|
hash_result: impl FnOnce(&mut Ctxt::StableHashingContext, &R) -> Option<Fingerprint>,
|
||||||
) -> (R, DepNodeIndex) {
|
) -> (R, DepNodeIndex) {
|
||||||
self.with_task_impl(key, cx, arg, false, task, |_| None, hash_result)
|
self.with_task_impl(key, cx, arg, task, |_| None, hash_result)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
|
Loading…
Reference in New Issue
Block a user