File tree Expand file tree Collapse file tree 6 files changed +6
-27
lines changed Expand file tree Collapse file tree 6 files changed +6
-27
lines changed Original file line number Diff line number Diff line change @@ -273,22 +273,10 @@ bool Heap::Contains(uword addr) const {
273273  return  new_space_.Contains (addr) || old_space_.Contains (addr);
274274}
275275
276- bool  Heap::NewContains (uword addr) const  {
277-   return  new_space_.Contains (addr);
278- }
279- 
280- bool  Heap::OldContains (uword addr) const  {
281-   return  old_space_.Contains (addr);
282- }
283- 
284276bool  Heap::CodeContains (uword addr) const  {
285277  return  old_space_.CodeContains (addr);
286278}
287279
288- bool  Heap::DataContains (uword addr) const  {
289-   return  old_space_.DataContains (addr);
290- }
291- 
292280void  Heap::VisitObjects (ObjectVisitor* visitor) {
293281  new_space_.VisitObjects (visitor);
294282  old_space_.VisitObjects (visitor);
Original file line number Diff line number Diff line change @@ -92,10 +92,7 @@ class Heap {
9292
9393  //  Heap contains the specified address.
9494  bool  Contains (uword addr) const ;
95-   bool  NewContains (uword addr) const ;
96-   bool  OldContains (uword addr) const ;
9795  bool  CodeContains (uword addr) const ;
98-   bool  DataContains (uword addr) const ;
9996
10097  void  NotifyIdle (int64_t  deadline);
10198  void  NotifyDestroyed ();
Original file line number Diff line number Diff line change @@ -624,15 +624,6 @@ bool PageSpace::CodeContains(uword addr) const {
624624  return  false ;
625625}
626626
627- bool  PageSpace::DataContains (uword addr) const  {
628-   for  (ExclusivePageIterator it (this ); !it.Done (); it.Advance ()) {
629-     if  (!it.page ()->is_executable () && it.page ()->Contains (addr)) {
630-       return  true ;
631-     }
632-   }
633-   return  false ;
634- }
635- 
636627void  PageSpace::AddRegionsToObjectSet (ObjectSet* set) const  {
637628  ASSERT ((pages_ != nullptr ) || (exec_pages_ != nullptr ) ||
638629         (large_pages_ != nullptr ));
Original file line number Diff line number Diff line change @@ -227,8 +227,6 @@ class PageSpace {
227227  bool  Contains (uword addr) const ;
228228  bool  ContainsUnsafe (uword addr) const ;
229229  bool  CodeContains (uword addr) const ;
230-   bool  DataContains (uword addr) const ;
231-   bool  IsValidAddress (uword addr) const  { return  Contains (addr); }
232230
233231  void  VisitObjects (ObjectVisitor* visitor) const ;
234232  void  VisitObjectsNoImagePages (ObjectVisitor* visitor) const ;
Original file line number Diff line number Diff line change @@ -804,6 +804,11 @@ Scavenger::~Scavenger() {
804804  ASSERT (blocks_ == nullptr );
805805}
806806
807+ bool  Scavenger::Contains (uword addr) const  {
808+   MutexLocker ml (&space_lock_);
809+   return  to_->Contains (addr);
810+ }
811+ 
807812intptr_t  Scavenger::NewSizeInWords (intptr_t  old_size_in_words,
808813                                   GCReason reason) const  {
809814  intptr_t  num_mutators = heap_->isolate_group ()->MutatorCount ();
Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ class Scavenger {
132132  //  During scavenging both the to and from spaces contain "legal" objects.
133133  //  During a scavenge this function only returns true for addresses that will
134134  //  be part of the surviving objects.
135-   bool  Contains (uword addr) const  {  return  to_-> Contains (addr); } 
135+   bool  Contains (uword addr) const ; 
136136
137137  uword TryAllocate (Thread* thread, intptr_t  size) {
138138    uword addr = TryAllocateFromTLAB (thread, size);
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments