Add internal compiler option to control defaulting of boot.art

Change-Id: I92a46cbd25cfc51c5c5d16fd8ae24c50195bf1d4
diff --git a/src/object.cc b/src/object.cc
index e8aeecd..81c646e 100644
--- a/src/object.cc
+++ b/src/object.cc
@@ -376,7 +376,8 @@
 }
 
 Class* Method::GetReturnType() const {
-  DCHECK(GetDeclaringClass()->IsResolved() || GetDeclaringClass()->IsErroneous());
+  DCHECK(GetDeclaringClass()->IsResolved() || GetDeclaringClass()->IsErroneous())
+      << PrettyMethod(this);
   // Short-cut
   Class* result = GetDexCacheResolvedTypes()->Get(GetReturnTypeIdx());
   if (result == NULL) {
@@ -587,7 +588,7 @@
 uint32_t Method::ToDexPC(const uintptr_t pc) const {
   const uint32_t* mapping_table = GetMappingTable();
   if (mapping_table == NULL) {
-    DCHECK(IsNative());
+    DCHECK(IsNative()) << PrettyMethod(this);
     return DexFile::kDexNoIndex;   // Special no mapping case
   }
   size_t mapping_table_length = GetMappingTableLength();
@@ -698,14 +699,14 @@
 }
 
 void Method::RegisterNative(const void* native_method) {
-  CHECK(IsNative());
-  CHECK(native_method != NULL);
+  CHECK(IsNative()) << PrettyMethod(this);
+  CHECK(native_method != NULL) << PrettyMethod(this);
   SetFieldPtr<const void*>(OFFSET_OF_OBJECT_MEMBER(Method, native_method_),
                            native_method, false);
 }
 
 void Method::UnregisterNative() {
-  CHECK(IsNative());
+  CHECK(IsNative()) << PrettyMethod(this);
   // restore stub to lookup native pointer via dlsym
   RegisterNative(Runtime::Current()->GetJniStubArray()->GetData());
 }