Commit 373c0b51 authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[heap] Remove obsolete Heap::sweep_generation field.

R=mlippautz@chromium.org

Review URL: https://codereview.chromium.org/1289963006

Cr-Commit-Position: refs/heads/master@{#30253}
parent 20ab9b12
......@@ -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
......
......@@ -949,7 +949,7 @@ class Heap {
Object* encountered_weak_cells() const { return encountered_weak_cells_; }
// Number of mark-sweeps.
unsigned int ms_count() { return ms_count_; }
int ms_count() const { return ms_count_; }
// Iterates over all roots in the heap.
void IterateRoots(ObjectVisitor* v, VisitMode mode);
......@@ -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.
......
......@@ -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),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment