Normalize some enumerations.

This change pulls a few enumeration types to the top of their header
file alongside other types.  It also eliminates the use of the now
redundant enum qualifier.

Change-Id: I6f853bed09176cde9a83faccea7a76f595f60f2b
diff --git a/vm/alloc/Alloc.h b/vm/alloc/Alloc.h
index a36a6b5..6637cd6 100644
--- a/vm/alloc/Alloc.h
+++ b/vm/alloc/Alloc.h
@@ -21,6 +21,12 @@
 
 #include <stddef.h>
 
+/* flags for dvmMalloc */
+enum {
+    ALLOC_DEFAULT = 0x00,
+    ALLOC_DONT_TRACK = 0x01,  /* don't add to internal tracking list */
+};
+
 /*
  * Initialization.
  */
@@ -56,12 +62,6 @@
  */
 extern "C" Object* dvmAllocObject(ClassObject* clazz, int flags);
 
-/* flags for dvmMalloc */
-enum {
-    ALLOC_DEFAULT       = 0x00,
-    ALLOC_DONT_TRACK    = 0x01,     /* don't add to internal tracking list */
-};
-
 /*
  * Track an object reference that is currently only visible internally.
  * This is called automatically by dvmMalloc() unless ALLOC_DONT_TRACK
diff --git a/vm/alloc/Copying.cpp b/vm/alloc/Copying.cpp
index f36fc89..a1e503a 100644
--- a/vm/alloc/Copying.cpp
+++ b/vm/alloc/Copying.cpp
@@ -685,7 +685,7 @@
     }
 }
 
-bool dvmHeapSourceGetPtrFlag(const void *ptr, enum HeapSourcePtrFlag flag)
+bool dvmHeapSourceGetPtrFlag(const void *ptr, HeapSourcePtrFlag flag)
 {
     assert(!"implemented");
     return false;
diff --git a/vm/alloc/HeapSource.cpp b/vm/alloc/HeapSource.cpp
index f9a1b2d..d944560 100644
--- a/vm/alloc/HeapSource.cpp
+++ b/vm/alloc/HeapSource.cpp
@@ -1012,7 +1012,7 @@
  * Returns the value of the requested flag.
  */
 bool
-dvmHeapSourceGetPtrFlag(const void *ptr, enum HeapSourcePtrFlag flag)
+dvmHeapSourceGetPtrFlag(const void *ptr, HeapSourcePtrFlag flag)
 {
     if (ptr == NULL) {
         return false;
diff --git a/vm/alloc/HeapSource.h b/vm/alloc/HeapSource.h
index be6d2e5..64008b3 100644
--- a/vm/alloc/HeapSource.h
+++ b/vm/alloc/HeapSource.h
@@ -28,6 +28,18 @@
  */
 #define HEAP_SOURCE_MAX_HEAP_COUNT 2
 
+enum HeapSourceValueSpec {
+    HS_FOOTPRINT,
+    HS_ALLOWED_FOOTPRINT,
+    HS_BYTES_ALLOCATED,
+    HS_OBJECTS_ALLOCATED
+};
+
+enum HeapSourcePtrFlag {
+    HS_CONTAINS,    // identical to dvmHeapSourceContains()
+    HS_ALLOCATED_IN_ZYGOTE
+};
+
 /*
  * Initializes the heap source; must be called before any other
  * dvmHeapSource*() functions.
@@ -90,13 +102,7 @@
  * Returns the requested value. If the per-heap stats are requested, fill
  * them as well.
  */
-enum HeapSourceValueSpec {
-    HS_FOOTPRINT,
-    HS_ALLOWED_FOOTPRINT,
-    HS_BYTES_ALLOCATED,
-    HS_OBJECTS_ALLOCATED
-};
-size_t dvmHeapSourceGetValue(enum HeapSourceValueSpec spec,
+size_t dvmHeapSourceGetValue(HeapSourceValueSpec spec,
                              size_t perHeapStats[], size_t arrayLen);
 
 /*
@@ -131,11 +137,7 @@
 /*
  * Returns the value of the requested flag.
  */
-enum HeapSourcePtrFlag {
-    HS_CONTAINS,    // identical to dvmHeapSourceContains()
-    HS_ALLOCATED_IN_ZYGOTE
-};
-bool dvmHeapSourceGetPtrFlag(const void *ptr, enum HeapSourcePtrFlag flag);
+bool dvmHeapSourceGetPtrFlag(const void *ptr, HeapSourcePtrFlag flag);
 
 /*
  * Returns the number of usable bytes in an allocated chunk; the size