修改拨动开关
[mytuuics.git] / dalvik / vm / Init.h
blob1b585fa1952355665041fc6c5c856ff6918ad55e
1 /*
2 * Copyright (C) 2008 The Android Open Source Project
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * VM initialization and shutdown.
20 #ifndef DALVIK_INIT_H_
21 #define DALVIK_INIT_H_
24 * Standard VM initialization, usually invoked through JNI.
26 std::string dvmStartup(int argc, const char* const argv[],
27 bool ignoreUnrecognized, JNIEnv* pEnv);
28 void dvmShutdown(void);
29 bool dvmInitAfterZygote(void);
32 * Enable Java programming language assert statements after the Zygote fork.
34 void dvmLateEnableAssertions(void);
37 * Partial VM initialization; only used as part of "dexopt", which may be
38 * asked to optimize a DEX file holding fundamental classes.
40 int dvmPrepForDexOpt(const char* bootClassPath, DexOptimizerMode dexOptMode,
41 DexClassVerifyMode verifyMode, int dexoptFlags);
44 * Look up the set of classes and members used directly by the VM,
45 * storing references to them into the globals instance. See
46 * Globals.h. This function is exposed so that dex optimization may
47 * call it (while avoiding doing other unnecessary VM initialization).
49 * The function returns a success flag (true == success).
51 bool dvmFindRequiredClassesAndMembers(void);
54 * Look up required members of the class Reference, and set the global
55 * reference to Reference itself too. This needs to be done separately
56 * from dvmFindRequiredClassesAndMembers(), during the course of
57 * linking the class Reference (which is done specially).
59 bool dvmFindReferenceMembers(ClassObject* classReference);
62 * Replacement for fprintf() when we want to send a message to the console.
63 * This defaults to fprintf(), but will use the JNI fprintf callback if
64 * one was provided.
66 int dvmFprintf(FILE* fp, const char* format, ...)
67 #if defined(__GNUC__)
68 __attribute__ ((format(printf, 2, 3)))
69 #endif
72 #endif // DALVIK_INIT_H_