OSDN Git Service

am 813a3a2d: Merge "If dalvik wants ASCII casing, it needs to ask for it."
[android-x86/dalvik.git] / vm / Init.h
index 63051a2..1b585fa 100644 (file)
--- a/vm/Init.h
+++ b/vm/Init.h
 /*
  * VM initialization and shutdown.
  */
-#ifndef _DALVIK_INIT
-#define _DALVIK_INIT
+#ifndef DALVIK_INIT_H_
+#define DALVIK_INIT_H_
 
 /*
  * Standard VM initialization, usually invoked through JNI.
  */
-int dvmStartup(int argc, const char* const argv[], bool ignoreUnrecognized,
-    JNIEnv* pEnv);
+std::string dvmStartup(int argc, const char* const argv[],
+        bool ignoreUnrecognized, JNIEnv* pEnv);
 void dvmShutdown(void);
 bool dvmInitAfterZygote(void);
 
@@ -41,6 +41,24 @@ int dvmPrepForDexOpt(const char* bootClassPath, DexOptimizerMode dexOptMode,
     DexClassVerifyMode verifyMode, int dexoptFlags);
 
 /*
+ * Look up the set of classes and members used directly by the VM,
+ * storing references to them into the globals instance. See
+ * Globals.h. This function is exposed so that dex optimization may
+ * call it (while avoiding doing other unnecessary VM initialization).
+ *
+ * The function returns a success flag (true == success).
+ */
+bool dvmFindRequiredClassesAndMembers(void);
+
+/*
+ * Look up required members of the class Reference, and set the global
+ * reference to Reference itself too. This needs to be done separately
+ * from dvmFindRequiredClassesAndMembers(), during the course of
+ * linking the class Reference (which is done specially).
+ */
+bool dvmFindReferenceMembers(ClassObject* classReference);
+
+/*
  * Replacement for fprintf() when we want to send a message to the console.
  * This defaults to fprintf(), but will use the JNI fprintf callback if
  * one was provided.
@@ -51,4 +69,4 @@ int dvmFprintf(FILE* fp, const char* format, ...)
 #endif
     ;
 
-#endif /*_DALVIK_INIT*/
+#endif  // DALVIK_INIT_H_