Implement LLVM version of jni_compiler to pass 17 jni_compiler tests.

Because we now have both shadow_frame and sirt (which is just for SirtRef<>
in the LLVM version), we define a new function NumStackReferences() as follows:
  NumStackReferences() = NumSirtReferences() + NumShadowFrameReferences().

(cherry picked from commit 18fe89a14d212da9ec6841f4d19d08482a9610b7)

Change-Id: Idd95ee4276801b1555be87934cd9c4f33ab8a88a
diff --git a/src/thread.h b/src/thread.h
index 6f91b31..6c29af2 100644
--- a/src/thread.h
+++ b/src/thread.h
@@ -265,12 +265,26 @@
     return jni_env_;
   }
 
-  // Number of references allocated in SIRTs on this thread
+  // Number of references in SIRTs on this thread
   size_t NumSirtReferences();
 
+  // Number of references allocated in ShadowFrames on this thread
+  size_t NumShadowFrameReferences();
+
+  // Number of references allocated in SIRTs & shadow frames on this thread
+  size_t NumStackReferences() {
+    return NumSirtReferences() + NumShadowFrameReferences();
+  };
+
   // Is the given obj in this thread's stack indirect reference table?
   bool SirtContains(jobject obj);
 
+  // Is the given obj in this thread's ShadowFrame?
+  bool ShadowFrameContains(jobject obj);
+
+  // Is the given obj in this thread's Sirts & ShadowFrames?
+  bool StackReferencesContain(jobject obj);
+
   void SirtVisitRoots(Heap::RootVisitor* visitor, void* arg);
 
   void ShadowFrameVisitRoots(Heap::RootVisitor* visitor, void* arg);