Support for unresolved types in new-instance during verification.

Also, ensure that classes that don't load are erroneous, warn early
about exceptions left on a thread by the verifier/compiler, factor out
slowpath checks for the compiler and fix the slowpath selector for
const-class.

This change causes more dex cache misses at runtime (more slowpath
execution). It also requires a "mm clean-oat".

Change-Id: I014b49ebdd7d8f7dd2e39cc0958fc0b708d58c4c
diff --git a/src/object.h b/src/object.h
index 58c6ba7..1051985 100644
--- a/src/object.h
+++ b/src/object.h
@@ -1463,6 +1463,9 @@
   bool IsObjectClass() const {
     return !IsPrimitive() && GetSuperClass() == NULL;
   }
+  bool IsInstantiable() const {
+    return !IsPrimitive() && !IsInterface() && !IsAbstract();
+  }
 
   // Creates a raw object instance but does not invoke the default constructor.
   Object* AllocObject();
@@ -2022,8 +2025,7 @@
   Class* super_class_;
 
   // If class verify fails, we must return same error on subsequent tries.
-  // Update with SetVerifyErrorClass to ensure a write barrier is used.
-  const Class* verify_error_class_;
+  Class* verify_error_class_;
 
   // virtual methods defined in this class; invoked through vtable
   ObjectArray<Method>* virtual_methods_;