Various bits of cleanup.

Most notable: PrettyField now includes the type (but, like PrettyMethod,
lets you turn this off), and there's a new PrettyClass, and PrettyType
has been renamed to PrettyTypeOf.

I've also moved the dalvik "sync" stuff into files named "monitor", and
made some of the implementation details private.

Change-Id: I39ea79b45e173f9ebbf9878bcead207766a5653f
diff --git a/src/compiler/Dalvik.h b/src/compiler/Dalvik.h
index b2c62bf..d57b72e 100644
--- a/src/compiler/Dalvik.h
+++ b/src/compiler/Dalvik.h
@@ -20,17 +20,18 @@
 #ifndef DALVIK_COMMON_H_
 #define DALVIK_COMMON_H_
 
+#include <assert.h>
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdio.h>
-#include <assert.h>
-#include "logging.h"
-#include "object.h"
-#include "thread.h"
+
 #include "class_linker.h"
 #include "compiler.h"
 #include "dex_cache.h"
-#include "sync.h"
+#include "logging.h"
+#include "monitor.h"
+#include "object.h"
+#include "thread.h"
 #include "utils.h"
 
 // From Common.h
diff --git a/src/compiler/codegen/arm/Thumb2/Gen.cc b/src/compiler/codegen/arm/Thumb2/Gen.cc
index fbdfb2e..59aadcf 100644
--- a/src/compiler/codegen/arm/Thumb2/Gen.cc
+++ b/src/compiler/codegen/arm/Thumb2/Gen.cc
@@ -926,7 +926,7 @@
     loadValueDirectFixed(cUnit, rlSrc, r1);  // Get obj
     oatLockCallTemps(cUnit);  // Prepare for explicit register usage
     genNullCheck(cUnit, rlSrc.sRegLow, r1, mir);
-    loadWordDisp(cUnit, rSELF, Thread::IdOffset().Int32Value(), r3);
+    loadWordDisp(cUnit, rSELF, Thread::ThinLockIdOffset().Int32Value(), r3);
     newLIR3(cUnit, kThumb2Ldrex, r2, r1,
             Object::MonitorOffset().Int32Value() >> 2); // Get object->lock
     // Align owner
@@ -976,7 +976,7 @@
     oatLockCallTemps(cUnit);  // Prepare for explicit register usage
     genNullCheck(cUnit, rlSrc.sRegLow, r1, mir);
     loadWordDisp(cUnit, r1, Object::MonitorOffset().Int32Value(), r2); // Get lock
-    loadWordDisp(cUnit, rSELF, Thread::IdOffset().Int32Value(), r3);
+    loadWordDisp(cUnit, rSELF, Thread::ThinLockIdOffset().Int32Value(), r3);
     // Is lock unheld on lock or held by us (==threadId) on unlock?
     opRegRegImm(cUnit, kOpAnd, r12, r2, (LW_HASH_STATE_MASK << LW_HASH_STATE_SHIFT));
     // Align owner