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

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
« no previous file with comments | « src/objects.cc ('k') | src/optimizing-compiler-thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-debug.cc
diff --git a/src/objects-debug.cc b/src/objects-debug.cc
index b24d5def04945628e11a83720a39a1c57c96d6fd..82c34020a69ac565b1c423c9b4adcdd267450fef 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;
@@ -1191,6 +1195,7 @@ bool DescriptorArray::IsSortedNoDuplicates(int valid_entries) {
}
+#ifdef ENABLE_SLOW_DCHECKS
bool LayoutDescriptor::IsConsistentWithMap(Map* map) {
if (FLAG_unbox_double_fields) {
DescriptorArray* descriptors = map->instance_descriptors();
@@ -1210,6 +1215,7 @@ bool LayoutDescriptor::IsConsistentWithMap(Map* map) {
}
return true;
}
+#endif
bool TransitionArray::IsSortedNoDuplicates(int valid_entries) {
@@ -1219,15 +1225,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 +1258,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 +1279,6 @@ void Code::VerifyEmbeddedObjectsInFullCode() {
}
}
-
#endif // DEBUG
} } // namespace v8::internal
« no previous file with comments | « src/objects.cc ('k') | src/optimizing-compiler-thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698