Reviewers: Michael Lippautz,

Description:
[heap] Remove obsolete Heap::sweep_generation field.

[email protected]

Please review this at https://codereview.chromium.org/1289963006/

Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-includes-everywhere

Affected files (+2, -10 lines):
  M src/heap/heap.h
  M src/heap/heap.cc
  M src/heap/mark-compact.cc


Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 6e6da98d31e2842f202bd0c74132b77323c065b1..0da371e9d5ff85b85638c33275978f1bc422b839 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -71,7 +71,6 @@ Heap::Heap()
       maximum_committed_(0),
       survived_since_last_expansion_(0),
       survived_last_scavenge_(0),
-      sweep_generation_(0),
       always_allocate_scope_depth_(0),
       contexts_disposed_(0),
       global_ic_age_(0),
@@ -1208,7 +1207,6 @@ bool Heap::PerformGarbageCollection(
     UpdateOldGenerationAllocationCounter();
     // Perform mark-sweep with optional compaction.
     MarkCompact();
-    sweep_generation_++;
     old_gen_exhausted_ = false;
     old_generation_size_configured_ = true;
// This should be updated before PostGarbageCollectionProcessing, which can
Index: src/heap/heap.h
diff --git a/src/heap/heap.h b/src/heap/heap.h
index 4b26b6c5169a59ca6dfc61ea63f86a4795b3d543..842c195c3630dfc585f4dac7a515a44cdd16b0cd 100644
--- a/src/heap/heap.h
+++ b/src/heap/heap.h
@@ -1419,9 +1419,6 @@ class Heap {
     return &external_string_table_;
   }

-  // Returns the current sweep generation.
-  int sweep_generation() { return sweep_generation_; }
-
bool concurrent_sweeping_enabled() { return concurrent_sweeping_enabled_; }

   inline Isolate* isolate();
@@ -1702,9 +1699,6 @@ class Heap {
   // ... and since the last scavenge.
   int survived_last_scavenge_;

-  // For keeping track on when to flush RegExp code.
-  int sweep_generation_;
-
   int always_allocate_scope_depth_;

   // For keeping track of context disposals.
Index: src/heap/mark-compact.cc
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
index 49bf1040b0bbc8270470717cb2ed9878042a6e07..6a0c9d58cd3d852f7a8f4228d339b3127a1e99fa 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -1337,7 +1337,7 @@ class MarkCompactMarkingVisitor

       // Set a number in the 0-255 range to guarantee no smi overflow.
       re->SetDataAt(JSRegExp::code_index(is_one_byte),
-                    Smi::FromInt(heap->sweep_generation() & 0xff));
+                    Smi::FromInt(heap->ms_count() & 0xff));
     } else if (code->IsSmi()) {
       int value = Smi::cast(code)->value();
// The regexp has not been compiled yet or there was a compilation error.
@@ -1347,7 +1347,7 @@ class MarkCompactMarkingVisitor
       }

       // Check if we should flush now.
- if (value == ((heap->sweep_generation() - kRegExpCodeThreshold) & 0xff)) {
+      if (value == ((heap->ms_count() - kRegExpCodeThreshold) & 0xff)) {
         re->SetDataAt(JSRegExp::code_index(is_one_byte),
                       Smi::FromInt(JSRegExp::kUninitializedValue));
         re->SetDataAt(JSRegExp::saved_code_index(is_one_byte),


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to