6c81da05559fe18c928b6a59c61d09a5882ff586
[cacao.git] / src / native / vm / nativevm.c
1 /* src/native/vm/nativevm.c - register the native functions
2
3    Copyright (C) 2007 R. Grafl, A. Krall, C. Kruegel,
4    C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
5    E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
6    J. Wenninger, Institut f. Computersprachen - TU Wien
7
8    This file is part of CACAO.
9
10    This program is free software; you can redistribute it and/or
11    modify it under the terms of the GNU General Public License as
12    published by the Free Software Foundation; either version 2, or (at
13    your option) any later version.
14
15    This program is distributed in the hope that it will be useful, but
16    WITHOUT ANY WARRANTY; without even the implied warranty of
17    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18    General Public License for more details.
19
20    You should have received a copy of the GNU General Public License
21    along with this program; if not, write to the Free Software
22    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23    02110-1301, USA.
24
25    $Id: native.c 7906 2007-05-14 17:25:33Z twisti $
26
27 */
28
29
30 #include "config.h"
31 #include "vm/types.h"
32
33 #include "native/vm/nativevm.h"
34
35
36 /* nativevm_init ***************************************************************
37
38    Initialize the implementation specific native stuff.
39
40 *******************************************************************************/
41
42 bool nativevm_init(void)
43 {
44         /* register native methods of all classes implemented */
45
46 #if defined(ENABLE_JAVASE)
47
48 # if defined(WITH_CLASSPATH_GNU)
49
50         _Jv_gnu_classpath_VMStackWalker_init();
51         _Jv_gnu_classpath_VMSystemProperties_init();
52         _Jv_gnu_java_lang_management_VMClassLoadingMXBeanImpl_init();
53         _Jv_gnu_java_lang_management_VMMemoryMXBeanImpl_init();
54         _Jv_gnu_java_lang_management_VMRuntimeMXBeanImpl_init();
55         _Jv_gnu_java_lang_management_VMThreadMXBeanImpl_init();
56         _Jv_java_lang_VMClass_init();
57         _Jv_java_lang_VMClassLoader_init();
58         _Jv_java_lang_VMObject_init();
59         _Jv_java_lang_VMRuntime_init();
60         _Jv_java_lang_VMSystem_init();
61         _Jv_java_lang_VMString_init();
62         _Jv_java_lang_VMThread_init();
63         _Jv_java_lang_VMThrowable_init();
64         _Jv_java_lang_management_VMManagementFactory_init();
65         _Jv_java_lang_reflect_Constructor_init();
66         _Jv_java_lang_reflect_Field_init();
67         _Jv_java_lang_reflect_Method_init();
68         _Jv_java_lang_reflect_VMProxy_init();
69         _Jv_java_security_VMAccessController_init();
70         _Jv_java_util_concurrent_atomic_AtomicLong_init();
71         _Jv_sun_misc_Unsafe_init();
72
73 # else
74
75 #  error unknown classpath configuration
76
77 # endif
78
79 #elif defined(ENABLE_JAVAME_CLDC1_1)
80
81         _Jv_com_sun_cldc_io_ResourceInputStream_init();
82         _Jv_com_sun_cldc_io_j2me_socket_Protocol_init();
83         _Jv_com_sun_cldchi_io_ConsoleOutputStream_init();
84         _Jv_com_sun_cldchi_jvm_JVM_init();
85         _Jv_java_lang_Class_init();
86         _Jv_java_lang_Double_init();
87         _Jv_java_lang_Float_init();
88         _Jv_java_lang_Math_init();
89         _Jv_java_lang_Object_init();
90         _Jv_java_lang_Runtime_init();
91         _Jv_java_lang_String_init();
92         _Jv_java_lang_System_init();
93         _Jv_java_lang_Thread_init();
94         _Jv_java_lang_Throwable_init();
95
96 #else
97
98 # error unknown Java configuration
99
100 #endif
101
102         /* everything's ok */
103
104         return true;
105 }
106
107
108 /*
109  * These are local overrides for various environment variables in Emacs.
110  * Please do not remove this and leave it at the end of the file, where
111  * Emacs will automagically detect them.
112  * ---------------------------------------------------------------------
113  * Local variables:
114  * mode: c
115  * indent-tabs-mode: t
116  * c-basic-offset: 4
117  * tab-width: 4
118  * End:
119  */