Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(605)

Unified Diff: src/heap.h

Issue 12094036: Fix clearing of dead dependent codes and verify weak embedded maps on full GC. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.h
diff --git a/src/heap.h b/src/heap.h
index 5db1c954c3ea098fa66a716a0218e35fec270fc3..3cb14fc0ea6ceb8344387821e939c9e35bb16cf7 100644
--- a/src/heap.h
+++ b/src/heap.h
@@ -1322,6 +1322,11 @@ class Heap {
#ifdef VERIFY_HEAP
// Verify the heap is in its normal state before or after a GC.
void Verify();
+
+
+ bool weak_embedded_maps_verification_enabled() {
+ return no_weak_embedded_maps_verification_scope_depth_ == 0;
+ }
#endif
#ifdef DEBUG
@@ -2190,6 +2195,10 @@ class Heap {
unsigned int gc_count_at_last_idle_gc_;
int scavenges_since_last_idle_round_;
+#ifdef VERIFY_HEAP
+ int no_weak_embedded_maps_verification_scope_depth_;
+#endif
+
static const int kMaxMarkSweepsInIdleRound = 7;
static const int kIdleScavengeThreshold = 5;
@@ -2219,6 +2228,9 @@ class Heap {
friend class MarkCompactCollector;
friend class MarkCompactMarkingVisitor;
friend class MapCompact;
+#ifdef VERIFY_HEAP
+ friend class NoWeakEmbeddedMapsVerificationScope;
+#endif
DISALLOW_COPY_AND_ASSIGN(Heap);
};
@@ -2279,6 +2291,14 @@ class AlwaysAllocateScope {
DisallowAllocationFailure disallow_allocation_failure_;
};
+#ifdef VERIFY_HEAP
+class NoWeakEmbeddedMapsVerificationScope {
+ public:
+ inline NoWeakEmbeddedMapsVerificationScope();
+ inline ~NoWeakEmbeddedMapsVerificationScope();
+};
+#endif
+
// Visitor class to verify interior pointers in spaces that do not contain
// or care about intergenerational references. All heap object pointers have to
« no previous file with comments | « no previous file | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698