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

Unified Diff: src/compiler.cc

Issue 16756013: Add verification code to dependent code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index c6b911feecc8e0d48972e9a57fd046daf84e1421..0ca4212bc77a6296109ece04dfaa4e292177728f 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -147,7 +147,9 @@ void CompilationInfo::CommitDependentMaps(Handle<Code> code) {
group_maps->at(j)->dependent_code()->UpdateToFinishedCode(
static_cast<DependentCode::DependencyGroup>(i), this, *code);
}
+#ifndef DEBUG
dependent_maps_[i] = NULL; // Zone-allocated, no need to delete.
+#endif
}
}
@@ -161,8 +163,29 @@ void CompilationInfo::RollbackDependentMaps() {
group_maps->at(j)->dependent_code()->RemoveCompilationInfo(
static_cast<DependentCode::DependencyGroup>(i), this);
}
+#ifndef DEBUG
dependent_maps_[i] = NULL; // Zone-allocated, no need to delete.
+#endif
}
+
+#ifdef DEBUG
+ // Verify that with sequential recompilation, we don't leave any
+ // compilation wrappers behind.
+ if (!FLAG_parallel_recompilation) {
+ for (int i = 0; i < DependentCode::kGroupCount; i++) {
+ ZoneList<Handle<Map> >* group_maps = dependent_maps_[i];
+ if (group_maps == NULL) continue;
+ for (int j = 0; j < group_maps->length(); j++) {
+ DependentCode* dependent_code = group_maps->at(j)->dependent_code();
+ DependentCode::GroupStartIndexes starts(dependent_code);
+ for (int i = 0; i < starts.number_of_entries(); i++) {
+ ASSERT(dependent_code->object_at(i)->IsCode());
+ }
+ }
+ dependent_maps_[i] = NULL; // Zone-allocated, no need to delete.
+ }
+ }
+#endif // DEBUG
}
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698