@@ -233,22 +233,24 @@ impl DepGraph {
233
233
|data, key, _| data. borrow_mut ( ) . alloc_node ( key, Vec :: new ( ) ) )
234
234
}
235
235
236
- fn with_task_impl < ' gcx , C , A , R > ( & self ,
237
- key : DepNode ,
238
- cx : C ,
239
- arg : A ,
240
- no_tcx : bool ,
241
- task : fn ( C , A ) -> R ,
242
- get_task : fn ( DepNode ) -> OpenTask ,
243
- get_index : fn ( & Lock < CurrentDepGraph > ,
244
- DepNode ,
245
- OpenTask ) -> DepNodeIndex )
246
- -> ( R , DepNodeIndex )
247
- where C : DepGraphSafe + StableHashingContextProvider < ' gcx > ,
248
- R : HashStable < StableHashingContext < ' gcx > > ,
236
+ fn with_task_impl < ' gcx , C , A , R > (
237
+ & self ,
238
+ key : DepNode ,
239
+ cx : C ,
240
+ arg : A ,
241
+ no_tcx : bool ,
242
+ task : fn ( C , A ) -> R ,
243
+ create_task : fn ( DepNode ) -> OpenTask ,
244
+ finish_task_and_alloc_depnode : fn ( & Lock < CurrentDepGraph > ,
245
+ DepNode ,
246
+ OpenTask ) -> DepNodeIndex
247
+ ) -> ( R , DepNodeIndex )
248
+ where
249
+ C : DepGraphSafe + StableHashingContextProvider < ' gcx > ,
250
+ R : HashStable < StableHashingContext < ' gcx > > ,
249
251
{
250
252
if let Some ( ref data) = self . data {
251
- let open_task = get_task ( key) ;
253
+ let open_task = create_task ( key) ;
252
254
253
255
// In incremental mode, hash the result of the task. We don't
254
256
// do anything with the hash yet, but we are computing it
@@ -286,7 +288,7 @@ impl DepGraph {
286
288
profq_msg ( hcx. sess ( ) , ProfileQueriesMsg :: TaskEnd )
287
289
} ;
288
290
289
- let dep_node_index = get_index ( & data. current , key, open_task) ;
291
+ let dep_node_index = finish_task_and_alloc_depnode ( & data. current , key, open_task) ;
290
292
291
293
let mut stable_hasher = StableHasher :: new ( ) ;
292
294
result. hash_stable ( & mut hcx, & mut stable_hasher) ;
@@ -983,7 +985,7 @@ impl CurrentDepGraph {
983
985
}
984
986
}
985
987
986
- pub ( super ) fn complete_task ( & mut self , key : DepNode , task : OpenTask ) -> DepNodeIndex {
988
+ fn complete_task ( & mut self , key : DepNode , task : OpenTask ) -> DepNodeIndex {
987
989
if let OpenTask :: Regular {
988
990
node,
989
991
read_set : _,
0 commit comments