@@ -709,7 +709,7 @@ impl DepGraphData {
709709 // side effect.
710710 std:: iter:: once ( DepNodeIndex :: FOREVER_RED_NODE ) . collect ( ) ,
711711 ) ;
712- tcx. store_side_effect ( dep_node_index, side_effect) ;
712+ tcx. query_system . side_effects . borrow_mut ( ) . insert ( dep_node_index, side_effect) ;
713713 dep_node_index
714714 }
715715
@@ -718,7 +718,13 @@ impl DepGraphData {
718718 #[ inline]
719719 fn force_side_effect < ' tcx > ( & self , tcx : TyCtxt < ' tcx > , prev_index : SerializedDepNodeIndex ) {
720720 with_deps ( TaskDepsRef :: Ignore , || {
721- let side_effect = tcx. load_side_effect ( prev_index) . unwrap ( ) ;
721+ let side_effect = tcx
722+ . query_system
723+ . on_disk_cache
724+ . as_ref ( )
725+ . unwrap ( )
726+ . load_side_effect ( tcx, prev_index)
727+ . unwrap ( ) ;
722728
723729 // Use `send_and_color` as `promote_node_and_deps_to_current` expects all
724730 // green dependencies. `send_and_color` will also prevent multiple nodes
@@ -745,7 +751,7 @@ impl DepGraphData {
745751 }
746752
747753 // This will just overwrite the same value for concurrent calls.
748- tcx. store_side_effect ( dep_node_index, side_effect) ;
754+ tcx. query_system . side_effects . borrow_mut ( ) . insert ( dep_node_index, side_effect) ;
749755 } )
750756 }
751757
@@ -1549,23 +1555,4 @@ impl<'tcx> TyCtxt<'tcx> {
15491555 fn is_eval_always ( self , kind : DepKind ) -> bool {
15501556 self . dep_kind_vtable ( kind) . is_eval_always
15511557 }
1552-
1553- // Interactions with on_disk_cache
1554- fn load_side_effect (
1555- self ,
1556- prev_dep_node_index : SerializedDepNodeIndex ,
1557- ) -> Option < QuerySideEffect > {
1558- self . query_system
1559- . on_disk_cache
1560- . as_ref ( )
1561- . and_then ( |c| c. load_side_effect ( self , prev_dep_node_index) )
1562- }
1563-
1564- #[ inline( never) ]
1565- #[ cold]
1566- fn store_side_effect ( self , dep_node_index : DepNodeIndex , side_effect : QuerySideEffect ) {
1567- if let Some ( c) = self . query_system . on_disk_cache . as_ref ( ) {
1568- c. store_side_effect ( dep_node_index, side_effect)
1569- }
1570- }
15711558}
0 commit comments