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

Unified Diff: src/objects-debug.cc

Issue 769263002: Add support for enabling DCHECKs in release mode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 6 years 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
Index: src/objects-debug.cc
diff --git a/src/objects-debug.cc b/src/objects-debug.cc
index b24d5def04945628e11a83720a39a1c57c96d6fd..f91d939878ded9b12293227abcc83a4b43078eb4 100644
--- a/src/objects-debug.cc
+++ b/src/objects-debug.cc
@@ -1069,7 +1069,7 @@ void BreakPointInfo::BreakPointInfoVerify() {
}
#endif // VERIFY_HEAP
-#ifdef DEBUG
+#if DCHECK_IS_ON
void JSObject::IncrementSpillStatistics(SpillInformation* info) {
info->number_of_objects_++;
@@ -1174,15 +1174,19 @@ bool DescriptorArray::IsSortedNoDuplicates(int valid_entries) {
for (int i = 0; i < number_of_descriptors(); i++) {
Name* key = GetSortedKey(i);
if (key == current_key) {
+#ifdef OBJECT_PRINT
OFStream os(stdout);
PrintDescriptors(os);
+#endif
return false;
}
current_key = key;
uint32_t hash = GetSortedKey(i)->Hash();
if (hash < current) {
+#ifdef OBJECT_PRINT
OFStream os(stdout);
PrintDescriptors(os);
+#endif
return false;
}
current = hash;
@@ -1219,15 +1223,19 @@ bool TransitionArray::IsSortedNoDuplicates(int valid_entries) {
for (int i = 0; i < number_of_transitions(); i++) {
Name* key = GetSortedKey(i);
if (key == current_key) {
+#ifdef OBJECT_PRINT
OFStream os(stdout);
PrintTransitions(os);
+#endif
return false;
}
current_key = key;
uint32_t hash = GetSortedKey(i)->Hash();
if (hash < current) {
+#ifdef OBJECT_PRINT
OFStream os(stdout);
PrintTransitions(os);
+#endif
return false;
}
current = hash;
@@ -1248,6 +1256,9 @@ bool TransitionArray::IsConsistentWithBackPointers(Map* current_map) {
return true;
}
+#endif // DCHECK_IS_ON
+
+#ifdef DEBUG
void Code::VerifyEmbeddedObjectsInFullCode() {
// Check that no context-specific object has been embedded.
@@ -1266,7 +1277,6 @@ void Code::VerifyEmbeddedObjectsInFullCode() {
}
}
-
#endif // DEBUG
} } // namespace v8::internal
« src/objects.cc ('K') | « src/objects.cc ('k') | src/optimizing-compiler-thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698