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

Unified Diff: src/assembler.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/assembler.h ('k') | src/assert-scope.h » ('j') | src/codegen.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/assembler.cc
diff --git a/src/assembler.cc b/src/assembler.cc
index c73b470c28cb47592e502879253901488ce9483f..78ea639bcbd7dde3858dc6ff32e92497076cab21 100644
--- a/src/assembler.cc
+++ b/src/assembler.cc
@@ -177,7 +177,7 @@ PredictableCodeSizeScope::~PredictableCodeSizeScope() {
// -----------------------------------------------------------------------------
// Implementation of CpuFeatureScope
-#ifdef DEBUG
+#if DCHECK_IS_ON
CpuFeatureScope::CpuFeatureScope(AssemblerBase* assembler, CpuFeature f)
: assembler_(assembler) {
DCHECK(CpuFeatures::IsSupported(f));
@@ -289,7 +289,7 @@ int Label::pos() const {
// dropped, and last non-zero chunk tagged with 1.)
-#ifdef DEBUG
+#if DCHECK_IS_ON
const int kMaxStandardNonCompactModes = 14;
#endif
@@ -408,7 +408,7 @@ void RelocInfoWriter::WriteExtraTaggedData(intptr_t data_delta, int top_tag) {
void RelocInfoWriter::Write(const RelocInfo* rinfo) {
-#ifdef DEBUG
+#if DCHECK_IS_ON
byte* begin_pos = pos_;
#endif
DCHECK(rinfo->rmode() < RelocInfo::NUMBER_OF_MODES);
@@ -474,7 +474,7 @@ void RelocInfoWriter::Write(const RelocInfo* rinfo) {
WriteExtraTaggedPC(pc_delta, saved_mode);
}
last_pc_ = rinfo->pc();
-#ifdef DEBUG
+#if DCHECK_IS_ON
Jakob Kummerow 2014/12/03 10:53:53 nit: just drop this #if
DCHECK(begin_pos - pos_ <= kMaxSize);
#endif
}
@@ -732,7 +732,7 @@ RelocIterator::RelocIterator(const CodeDesc& desc, int mode_mask) {
// Implementation of RelocInfo
-#ifdef DEBUG
+#if DCHECK_IS_ON
bool RelocInfo::RequiresRelocation(const CodeDesc& desc) {
// Ensure there are no code targets or embedded objects present in the
// deoptimization entries, they would require relocation after code
« no previous file with comments | « src/assembler.h ('k') | src/assert-scope.h » ('j') | src/codegen.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698