Subzero: Do class definition cleanups for assembler files too.
Similar to https://codereview.chromium.org/656123003/, but cover some of
the assembler files which were avoided to avoid conflicts.
BUG=none
R=stichnot@chromium.org
Review URL: https://codereview.chromium.org/643903006
diff --git a/src/assembler.cpp b/src/assembler.cpp
index a169aff..6f2ec81 100644
--- a/src/assembler.cpp
+++ b/src/assembler.cpp
@@ -1,10 +1,11 @@
+//===- subzero/src/assembler.cpp - Assembler base class -------------------===//
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
// Modified by the Subzero authors.
//
-//===- subzero/src/assembler.cpp - Assembler base class -------------------===//
+//===----------------------------------------------------------------------===//
//
// The Subzero Code Generator
//
@@ -27,7 +28,7 @@
return result;
}
-#if defined(DEBUG)
+#ifndef NDEBUG
AssemblerBuffer::EnsureCapacity::EnsureCapacity(AssemblerBuffer *buffer) {
if (buffer->cursor() >= buffer->limit())
buffer->ExtendCapacity();
@@ -53,7 +54,7 @@
intptr_t delta = gap_ - ComputeGap();
assert(delta <= kMinimumGap);
}
-#endif
+#endif // !NDEBUG
AssemblerBuffer::AssemblerBuffer(Assembler &assembler) : assembler_(assembler) {
const intptr_t OneKB = 1024;
@@ -61,10 +62,10 @@
contents_ = NewContents(assembler_, kInitialBufferCapacity);
cursor_ = contents_;
limit_ = ComputeLimit(contents_, kInitialBufferCapacity);
-#if defined(DEBUG)
+#ifndef NDEBUG
has_ensured_capacity_ = false;
fixups_processed_ = false;
-#endif
+#endif // !NDEBUG
// Verify internal state.
assert(Capacity() == kInitialBufferCapacity);
@@ -93,9 +94,9 @@
// Process fixups in the instructions.
ProcessFixups(instructions);
-#if defined(DEBUG)
+#ifndef NDEBUG
fixups_processed_ = true;
-#endif
+#endif // !NDEBUG
}
void AssemblerBuffer::ExtendCapacity() {