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

Unified Diff: runtime/vm/scavenger.cc

Issue 12754003: Remove some assertion code in the GC from the release build. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/scavenger.cc
===================================================================
--- runtime/vm/scavenger.cc (revision 19860)
+++ runtime/vm/scavenger.cc (working copy)
@@ -75,8 +75,10 @@
delayed_weak_stack_(),
growth_policy_(PageSpace::kControlGrowth),
bytes_promoted_(0),
- visiting_old_pointers_(false),
- in_scavenge_pointer_(false) {}
+#ifdef DEBUG
+ in_scavenge_pointer_(false),
+#endif
+ visiting_old_pointers_(false) { }
void VisitPointers(RawObject** first, RawObject** last) {
for (RawObject** current = first; current <= last; current++) {
@@ -125,8 +127,10 @@
void ScavengePointer(RawObject** p) {
// ScavengePointer cannot be called recursively.
+#ifdef DEBUG
ASSERT(!in_scavenge_pointer_);
BoolScope bs(&in_scavenge_pointer_, true);
+#endif
RawObject* raw_obj = *p;
@@ -251,8 +255,10 @@
// new space growth policy.
intptr_t bytes_promoted_;
+#ifdef DEBUG
+ bool in_scavenge_pointer_;
+#endif
bool visiting_old_pointers_;
- bool in_scavenge_pointer_;
DISALLOW_COPY_AND_ASSIGN(ScavengerVisitor);
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698