Index: src/mark-compact.h |
diff --git a/src/mark-compact.h b/src/mark-compact.h |
index b4ee4e75348b73f5051e94084dbaea0054a044f2..469dd29f199c55a284aa108256458a314adb1bfa 100644 |
--- a/src/mark-compact.h |
+++ b/src/mark-compact.h |
@@ -324,6 +324,8 @@ class SlotsBuffer { |
void UpdateSlots(Heap* heap); |
+ void UpdateSlotsWithFilter(Heap* heap); |
+ |
SlotsBuffer* next() { return next_; } |
static int SizeOfChain(SlotsBuffer* buffer) { |
@@ -340,9 +342,15 @@ class SlotsBuffer { |
return idx_ < kNumberOfElements - 1; |
} |
- static void UpdateSlotsRecordedIn(Heap* heap, SlotsBuffer* buffer) { |
+ static void UpdateSlotsRecordedIn(Heap* heap, |
+ SlotsBuffer* buffer, |
+ bool code_slots_filtering_required) { |
while (buffer != NULL) { |
- buffer->UpdateSlots(heap); |
+ if (code_slots_filtering_required) { |
+ buffer->UpdateSlotsWithFilter(heap); |
+ } else { |
+ buffer->UpdateSlots(heap); |
+ } |
buffer = buffer->next(); |
} |
} |
@@ -546,10 +554,17 @@ class MarkCompactCollector { |
encountered_weak_maps_ = weak_map; |
} |
+ void InvalidateCode(Code* code); |
+ |
private: |
MarkCompactCollector(); |
~MarkCompactCollector(); |
+ bool MarkInvalidatedCode(); |
+ void RemoveDeadInvalidatedCode(); |
+ void ProcessInvalidatedCode(ObjectVisitor* visitor); |
+ |
+ |
#ifdef DEBUG |
enum CollectorState { |
IDLE, |
@@ -573,6 +588,8 @@ class MarkCompactCollector { |
// candidates. |
bool compacting_; |
+ bool was_marked_incrementally_; |
+ |
bool collect_maps_; |
// A pointer to the current stack-allocated GC tracer object during a full |
@@ -762,6 +779,7 @@ class MarkCompactCollector { |
Object* encountered_weak_maps_; |
List<Page*> evacuation_candidates_; |
+ List<Code*> invalidated_code_; |
friend class Heap; |
}; |