1 /* src/vm/vm.h - basic JVM functions
3 Copyright (C) 1996-2005, 2006 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
8 This file is part of CACAO.
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.
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.
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
25 Contact: cacao@cacaojvm.org
27 Authors: Christian Thalinger
31 $Id: finalizer.c 4357 2006-01-22 23:33:38Z twisti $
42 #include "native/jni.h"
43 #include "vm/global.h"
46 /* export global variables ****************************************************/
48 extern _Jv_JNIEnv *_Jv_env;
50 extern bool vm_initializing;
51 extern bool vm_exiting;
53 extern u1 *intrp_main_stack;
55 extern void **stackbottom;
57 extern char *mainstring;
58 extern classinfo *mainclass;
61 /* vm_arg **********************************************************************
63 Datastructure for arguments to call Java methods via vm_call_method
66 *******************************************************************************/
68 typedef struct vm_arg vm_arg;
76 /* function prototypes ********************************************************/
80 bool vm_create(JavaVMInitArgs *vm_args);
81 s4 vm_destroy(JavaVM *vm);
82 void vm_exit(s4 status);
83 void vm_shutdown(s4 status);
85 void vm_exit_handler(void);
87 /* Java method calling functions */
88 java_objectheader *vm_call_method(methodinfo *m, java_objectheader *o, ...);
89 java_objectheader *vm_call_method_valist(methodinfo *m, java_objectheader *o,
91 java_objectheader *vm_call_method_jvalue(methodinfo *m, java_objectheader *o,
93 java_objectheader *vm_call_method_vmarg(methodinfo *m, s4 vmargscount,
96 s4 vm_call_method_int(methodinfo *m, java_objectheader *o, ...);
97 s4 vm_call_method_int_valist(methodinfo *m, java_objectheader *o, va_list ap);
98 s4 vm_call_method_int_jvalue(methodinfo *m, java_objectheader *o, jvalue *args);
99 s4 vm_call_method_int_vmarg(methodinfo *m, s4 vmargscount, vm_arg *vmargs);
101 s8 vm_call_method_long(methodinfo *m, java_objectheader *o, ...);
102 s8 vm_call_method_long_valist(methodinfo *m, java_objectheader *o, va_list ap);
103 s8 vm_call_method_long_jvalue(methodinfo *m, java_objectheader *o, jvalue *args);
104 s8 vm_call_method_long_vmarg(methodinfo *m, s4 vmargscount, vm_arg *vmargs);
106 float vm_call_method_float(methodinfo *m, java_objectheader *o, ...);
107 float vm_call_method_float_valist(methodinfo *m, java_objectheader *o,
109 float vm_call_method_float_jvalue(methodinfo *m, java_objectheader *o,
111 float vm_call_method_float_vmarg(methodinfo *m, s4 vmargscount, vm_arg *vmargs);
113 double vm_call_method_double(methodinfo *m, java_objectheader *o, ...);
114 double vm_call_method_double_valist(methodinfo *m, java_objectheader *o,
116 double vm_call_method_double_jvalue(methodinfo *m, java_objectheader *o,
118 double vm_call_method_double_vmarg(methodinfo *m, s4 vmargscount,
124 * These are local overrides for various environment variables in Emacs.
125 * Please do not remove this and leave it at the end of the file, where
126 * Emacs will automagically detect them.
127 * ---------------------------------------------------------------------
130 * indent-tabs-mode: t