@@ -367,7 +367,7 @@ impl QueryRevisionsExtra {
367367 Some ( Box :: new ( QueryRevisionsExtraInner {
368368 accumulated,
369369 cycle_heads,
370- tracked_struct_ids,
370+ tracked_struct_ids : tracked_struct_ids . into_vec ( ) ,
371371 } ) )
372372 } ;
373373
@@ -396,7 +396,7 @@ struct QueryRevisionsExtraInner {
396396 /// previous revision. To handle this, `diff_outputs` compares
397397 /// the structs from the old/new revision and retains
398398 /// only entries that appeared in the new revision.
399- tracked_struct_ids : IdentityMap ,
399+ tracked_struct_ids : Vec < ( Identity , Id ) > ,
400400
401401 /// This result was computed based on provisional values from
402402 /// these cycle heads. The "cycle head" is the query responsible
@@ -416,7 +416,7 @@ const _: [(); std::mem::size_of::<QueryRevisions>()] = [(); std::mem::size_of::<
416416#[ cfg( not( feature = "shuttle" ) ) ]
417417#[ cfg( target_pointer_width = "64" ) ]
418418const _: [ ( ) ; std:: mem:: size_of :: < QueryRevisionsExtraInner > ( ) ] =
419- [ ( ) ; std:: mem:: size_of :: < [ usize ; 9 ] > ( ) ] ;
419+ [ ( ) ; std:: mem:: size_of :: < [ usize ; 8 ] > ( ) ] ;
420420
421421impl QueryRevisions {
422422 pub ( crate ) fn fixpoint_initial ( query : DatabaseKeyIndex ) -> Self {
@@ -475,16 +475,16 @@ impl QueryRevisions {
475475 }
476476
477477 /// Returns a reference to the `IdentityMap` for this query, or `None` if the map is empty.
478- pub fn tracked_struct_ids ( & self ) -> Option < & IdentityMap > {
478+ pub fn tracked_struct_ids ( & self ) -> Option < & [ ( Identity , Id ) ] > {
479479 self . extra
480480 . 0
481481 . as_ref ( )
482- . map ( |extra| & extra. tracked_struct_ids )
482+ . map ( |extra| & * extra. tracked_struct_ids )
483483 . filter ( |tracked_struct_ids| !tracked_struct_ids. is_empty ( ) )
484484 }
485485
486486 /// Returns a mutable reference to the `IdentityMap` for this query, or `None` if the map is empty.
487- pub fn tracked_struct_ids_mut ( & mut self ) -> Option < & mut IdentityMap > {
487+ pub fn tracked_struct_ids_mut ( & mut self ) -> Option < & mut Vec < ( Identity , Id ) > > {
488488 self . extra
489489 . 0
490490 . as_mut ( )
@@ -836,15 +836,15 @@ pub(crate) struct ActiveQueryGuard<'me> {
836836
837837impl ActiveQueryGuard < ' _ > {
838838 /// Initialize the tracked struct ids with the values from the prior execution.
839- pub ( crate ) fn seed_tracked_struct_ids ( & self , tracked_struct_ids : & IdentityMap ) {
839+ pub ( crate ) fn seed_tracked_struct_ids ( & self , tracked_struct_ids : & [ ( Identity , Id ) ] ) {
840840 self . local_state . with_query_stack_mut ( |stack| {
841841 #[ cfg( debug_assertions) ]
842842 assert_eq ! ( stack. len( ) , self . push_len) ;
843843 let frame = stack. last_mut ( ) . unwrap ( ) ;
844844 assert ! ( frame. tracked_struct_ids( ) . is_empty( ) ) ;
845845 frame
846846 . tracked_struct_ids_mut ( )
847- . clone_from ( tracked_struct_ids) ;
847+ . from_slice ( tracked_struct_ids) ;
848848 } )
849849 }
850850
0 commit comments