Shorten the namespace and re-normalize include guards.
Change-Id: I93af4c1f19edf31098abd20ded1fcca6c5d83854
diff --git a/src/art.cc b/src/art.cc
index 17c5aae..08ae34d 100644
--- a/src/art.cc
+++ b/src/art.cc
@@ -1,7 +1,8 @@
+// Copyright 2011 Google Inc. All Rights Reserved.
+
#include "art.h"
-namespace android {
-namespace runtime {
+namespace art {
bool Art::Startup() {
return true;
@@ -10,4 +11,4 @@
void Art::Shutdown() {
}
-} } // namespace
+} // namespace art
diff --git a/src/art.h b/src/art.h
index 417e296..b02c1a5 100644
--- a/src/art.h
+++ b/src/art.h
@@ -1,8 +1,9 @@
-#ifndef ART_ART_H_
-#define ART_ART_H_
+// Copyright 2011 Google Inc. All Rights Reserved.
-namespace android {
-namespace runtime {
+#ifndef ART_SRC_ART_H_
+#define ART_SRC_ART_H_
+
+namespace art {
class Art {
public:
@@ -10,8 +11,8 @@
static void Shutdown();
};
-} } // namespace android::runtime
+} // namespace art
-namespace r = android::runtime;
+namespace r = art;
-#endif // ART_ART_H_
+#endif // ART_SRC_ART_H_
diff --git a/src/assembler.cc b/src/assembler.cc
index f6ca690..d0a8aa4 100644
--- a/src/assembler.cc
+++ b/src/assembler.cc
@@ -6,8 +6,7 @@
#include "src/globals.h"
#include "src/memory_region.h"
-namespace android {
-namespace runtime {
+namespace art {
static byte* NewContents(size_t capacity) {
byte* result = new byte[capacity];
@@ -134,4 +133,4 @@
}
#endif
-} } // namespace android::runtime
+} // namespace art
diff --git a/src/assembler.h b/src/assembler.h
index d211b6f..228612e 100644
--- a/src/assembler.h
+++ b/src/assembler.h
@@ -7,8 +7,7 @@
#include "src/macros.h"
#include "src/memory_region.h"
-namespace android {
-namespace runtime {
+namespace art {
class Assembler;
class AssemblerBuffer;
@@ -227,7 +226,7 @@
friend class AssemblerFixup;
};
-} } // namespace android::runtime
+} // namespace art
#if defined(__i386__)
#include "src/assembler_x86.h"
diff --git a/src/assembler_arm.cc b/src/assembler_arm.cc
index 79b89c3..dd189e5 100644
--- a/src/assembler_arm.cc
+++ b/src/assembler_arm.cc
@@ -2,7 +2,6 @@
#include "src/assembler.h"
-namespace android {
-namespace runtime {
+namespace art {
-} } // namespace android::runtime
+} // namespace art
diff --git a/src/assembler_arm.h b/src/assembler_arm.h
index 1ac5a82..8ba9906 100644
--- a/src/assembler_arm.h
+++ b/src/assembler_arm.h
@@ -3,12 +3,11 @@
#ifndef ART_SRC_ASSEMBLER_ARM_H_
#define ART_SRC_ASSEMBLER_ARM_H_
-namespace android {
-namespace runtime {
+namespace art {
class Assembler {
};
-} } // namespace android::runtime
+} // namespace art
#endif // ART_SRC_ASSEMBLER_ARM_H_
diff --git a/src/assembler_x86.cc b/src/assembler_x86.cc
index de2219c..ce7f104 100644
--- a/src/assembler_x86.cc
+++ b/src/assembler_x86.cc
@@ -7,8 +7,7 @@
#include "src/assembler.h"
#include "src/memory_region.h"
-namespace android {
-namespace runtime {
+namespace art {
class DirectCallRelocation : public AssemblerFixup {
public:
@@ -1347,4 +1346,4 @@
EmitOperand(rm, Operand(operand));
}
-} } // namespace android::runtime
+} // namespace art
diff --git a/src/assembler_x86.h b/src/assembler_x86.h
index 05dfe31..c1c16c7 100644
--- a/src/assembler_x86.h
+++ b/src/assembler_x86.h
@@ -9,8 +9,7 @@
#include "src/macros.h"
#include "src/utils.h"
-namespace android {
-namespace runtime {
+namespace art {
class Immediate {
public:
@@ -474,6 +473,6 @@
EmitUint8(0x66);
}
-} } // namespace android::runtime
+} // namespace art
#endif // ART_SRC_ASSEMBLER_X86_H_
diff --git a/src/casts.h b/src/casts.h
index f9f3c6b..15852cf 100644
--- a/src/casts.h
+++ b/src/casts.h
@@ -6,8 +6,7 @@
#include <string.h>
#include "src/macros.h"
-namespace android {
-namespace runtime {
+namespace art {
template <class Dest, class Source>
inline Dest bit_cast(const Source& source) {
@@ -19,6 +18,6 @@
return dest;
}
-} } // namespace android::runtime
+} // namespace art
#endif // ART_SRC_CASTS_H_
diff --git a/src/constants_x86.h b/src/constants_x86.h
index 477bef8..70a79e9 100644
--- a/src/constants_x86.h
+++ b/src/constants_x86.h
@@ -7,8 +7,7 @@
#include "src/logging.h"
#include "src/macros.h"
-namespace android {
-namespace runtime {
+namespace art {
enum Register {
EAX = 0,
@@ -107,6 +106,6 @@
DISALLOW_IMPLICIT_CONSTRUCTORS(Instr);
};
-} } // namespace android::runtime
+} // namespace art
-#endif // ART_CONSTANTS_IA32_H_
+#endif // ART_SRC_CONSTANTS_X86_H_
diff --git a/src/globals.h b/src/globals.h
index 2f85270..92d0cf7 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -5,8 +5,7 @@
#include <stdint.h>
-namespace android {
-namespace runtime {
+namespace art {
typedef uint8_t byte;
typedef intptr_t word;
@@ -32,6 +31,6 @@
const int kBitsPerWord = kWordSize * kBitsPerWord;
const int kBitsPerInt = kIntSize * kBitsPerByte;
-} } // namespace android::runtime
+} // namespace art
#endif // ART_SRC_GLOBALS_H_
diff --git a/src/logging.h b/src/logging.h
index c1896e9..ccab249 100644
--- a/src/logging.h
+++ b/src/logging.h
@@ -11,8 +11,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef ART_LOGGING_H_
-#define ART_LOGGING_H_
+#ifndef ART_SRC_LOGGING_H_
+#define ART_SRC_LOGGING_H_
#include <cstdlib>
#include <iostream> // NOLINT
@@ -99,4 +99,4 @@
DISALLOW_COPY_AND_ASSIGN(LogMessageFatal);
};
-#endif // ART_LOGGING_H_
+#endif // ART_SRC_LOGGING_H_
diff --git a/src/macros.h b/src/macros.h
index c2a474e..90a446b 100644
--- a/src/macros.h
+++ b/src/macros.h
@@ -11,8 +11,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef ART_MACROS_H_
-#define ART_MACROS_H_
+#ifndef ART_SRC_MACROS_H_
+#define ART_SRC_MACROS_H_
// The COMPILE_ASSERT macro can be used to verify that a compile time
// expression is true. For example, you could use it to verify the
@@ -59,4 +59,4 @@
&reinterpret_cast<t*>(16)->f) - \
reinterpret_cast<char*>(16))
-#endif // ART_MACROS_H_
+#endif // ART_SRC_MACROS_H_
diff --git a/src/main.cc b/src/main.cc
index b87a8fe..6f277d1 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -1,3 +1,5 @@
+// Copyright 2011 Google Inc. All Rights Reserved.
+
#include <iostream>
int main(int argc, char** argv) {
diff --git a/src/memory_region.cc b/src/memory_region.cc
index 1fa5d1f..a10516f 100644
--- a/src/memory_region.cc
+++ b/src/memory_region.cc
@@ -6,8 +6,7 @@
#include "src/logging.h"
#include "src/memory_region.h"
-namespace android {
-namespace runtime {
+namespace art {
void MemoryRegion::CopyFrom(size_t offset, const MemoryRegion& from) const {
CHECK_NE(from.pointer(), NULL);
@@ -18,4 +17,4 @@
from.pointer(), from.size());
}
-} } // namespace android::runtime
+} // namespace art
diff --git a/src/memory_region.h b/src/memory_region.h
index da79fbd..f5382cd 100644
--- a/src/memory_region.h
+++ b/src/memory_region.h
@@ -9,8 +9,7 @@
#include "src/macros.h"
#include "src/memory_region.h"
-namespace android {
-namespace runtime {
+namespace art {
// Memory regions are useful for accessing memory with bounds check in
// debug mode. They can be safely passed by value and do not assume ownership
@@ -81,6 +80,6 @@
DISALLOW_COPY_AND_ASSIGN(MemoryRegion);
};
-} } // namespace android::runtime
+} // namespace art
#endif // ART_MEMORY_REGION_H_
diff --git a/src/utils.h b/src/utils.h
index 6f38e7f..96ce02f 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -5,8 +5,7 @@
#include "src/globals.h"
-namespace android {
-namespace runtime {
+namespace art {
// Check whether an N-bit two's-complement representation can hold value.
static inline bool IsInt(int N, word value) {
@@ -40,6 +39,6 @@
return static_cast<int32_t>(value >> 32);
}
-} } // namespace android::runtime
+} // namespace art
#endif // ART_SRC_UTILS_H_