Add access check slow paths to field accesses

This check makes the verifier, compiler and runtime agree with who
should perform access checks and fixes compliance for these
instructions.

Introduce new "fast" sget/sput that just get the static storage base
from a method's declaring class when the static field is within the same
class. Saves a load and branch in the common case.

Fold gen routines for wide and not wide together.

Fix bug where sub-classes could appear intialized in the image but their
parents were only verified.

Extra debug output for test case 075.

Change-Id: I934da3624ed8fa8e026b2c95d936d04b1af022ef
diff --git a/src/class_linker.cc b/src/class_linker.cc
index 9d53f93..17e4f4e 100644
--- a/src/class_linker.cc
+++ b/src/class_linker.cc
@@ -2237,9 +2237,9 @@
     clinit = klass->FindDeclaredDirectMethod("<clinit>", "()V");
     if (clinit != NULL && !can_run_clinit) {
       // if the class has a <clinit> but we can't run it during compilation,
-      // don't bother going to kStatusInitializing. We return true to maintain
-      // the invariant that a false result implies there is a pending exception.
-      return true;
+      // don't bother going to kStatusInitializing. We return false so that
+      // sub-classes don't believe this class is initialized.
+      return false;
     }
 
     // If the class is kStatusInitializing, either this thread is
@@ -2271,7 +2271,14 @@
   uint64_t t0 = NanoTime();
 
   if (!InitializeSuperClass(klass, can_run_clinit)) {
-    CHECK(klass->IsErroneous());
+    // Super class initialization failed, this can be because we can't run
+    // super-class class initializers in which case we'll be verified.
+    // Otherwise this class is erroneous.
+    if (!can_run_clinit) {
+      CHECK(klass->IsVerified());
+    } else {
+      CHECK(klass->IsErroneous());
+    }
     return false;
   }
 
@@ -2471,7 +2478,7 @@
   ScopedThreadStateChange tsc(self, Thread::kRunnable);
   bool success = InitializeClass(c, can_run_clinit);
   if (!success) {
-    CHECK(self->IsExceptionPending()) << PrettyClass(c);
+    CHECK(self->IsExceptionPending() || !can_run_clinit) << PrettyClass(c);
   }
   return success;
 }