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

Unified Diff: src/hydrogen-instructions.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/hydrogen-instructions.h ('k') | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.cc
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
index 50103662f562034538ae9eaa23be51297b577460..d2aa5f4962ea7769056e569957d4e06141ca1c7d 100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -200,7 +200,7 @@ void Range::AddConstant(int32_t value) {
Representation r = Representation::Integer32();
lower_ = AddWithoutOverflow(r, lower_, value, &may_overflow);
upper_ = AddWithoutOverflow(r, upper_, value, &may_overflow);
-#ifdef DEBUG
+#if DCHECK_IS_ON
Verify();
#endif
}
@@ -263,7 +263,7 @@ bool Range::AddAndCheckOverflow(const Representation& r, Range* other) {
lower_ = AddWithoutOverflow(r, lower_, other->lower(), &may_overflow);
upper_ = AddWithoutOverflow(r, upper_, other->upper(), &may_overflow);
KeepOrder();
-#ifdef DEBUG
+#if DCHECK_IS_ON
Verify();
#endif
return may_overflow;
@@ -275,7 +275,7 @@ bool Range::SubAndCheckOverflow(const Representation& r, Range* other) {
lower_ = SubWithoutOverflow(r, lower_, other->upper(), &may_overflow);
upper_ = SubWithoutOverflow(r, upper_, other->lower(), &may_overflow);
KeepOrder();
-#ifdef DEBUG
+#if DCHECK_IS_ON
Verify();
#endif
return may_overflow;
@@ -291,7 +291,7 @@ void Range::KeepOrder() {
}
-#ifdef DEBUG
+#if DCHECK_IS_ON
void Range::Verify() const {
DCHECK(lower_ <= upper_);
}
@@ -306,7 +306,7 @@ bool Range::MulAndCheckOverflow(const Representation& r, Range* other) {
int v4 = MulWithoutOverflow(r, upper_, other->upper(), &may_overflow);
lower_ = Min(Min(v1, v2), Min(v3, v4));
upper_ = Max(Max(v1, v2), Max(v3, v4));
-#ifdef DEBUG
+#if DCHECK_IS_ON
Verify();
#endif
return may_overflow;
@@ -735,7 +735,7 @@ bool HInstruction::Dominates(HInstruction* other) {
}
-#ifdef DEBUG
+#if DCHECK_IS_ON
void HInstruction::Verify() {
// Verify that input operands are defined before use.
HBasicBlock* cur_block = block();
@@ -4549,8 +4549,8 @@ bool HValue::HasNonSmiUse() {
}
-// Node-specific verification code is only included in debug mode.
-#ifdef DEBUG
+// Node-specific verification code is only included when DCHECKs are enabled.
+#if DCHECK_IS_ON
void HPhi::Verify() {
DCHECK(OperandCount() == block()->predecessors()->length());
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698