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

Unified Diff: src/assembler.cpp

Issue 643903006: Subzero: Do class definition cleanups for assembler files too. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: stuff Created 6 years, 2 months 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/assembler_ia32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/assembler.cpp
diff --git a/src/assembler.cpp b/src/assembler.cpp
index a169aff5d4a2be543bc43ef5e73dc93b08b2ada5..6f2ec8118c92545f98bdbdefc21853828eb820d6 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 @@ static uintptr_t NewContents(Assembler &assembler, intptr_t capacity) {
return result;
}
-#if defined(DEBUG)
+#ifndef NDEBUG
AssemblerBuffer::EnsureCapacity::EnsureCapacity(AssemblerBuffer *buffer) {
if (buffer->cursor() >= buffer->limit())
buffer->ExtendCapacity();
@@ -53,7 +54,7 @@ AssemblerBuffer::EnsureCapacity::~EnsureCapacity() {
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 @@ AssemblerBuffer::AssemblerBuffer(Assembler &assembler) : assembler_(assembler) {
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 @@ void AssemblerBuffer::FinalizeInstructions(const MemoryRegion &instructions) {
// Process fixups in the instructions.
ProcessFixups(instructions);
-#if defined(DEBUG)
+#ifndef NDEBUG
fixups_processed_ = true;
-#endif
+#endif // !NDEBUG
}
void AssemblerBuffer::ExtendCapacity() {
« no previous file with comments | « src/assembler.h ('k') | src/assembler_ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698