51e13e7a62e2bc767ff0147b4bf1f284dbd7643d
[cacao.git] / src / vm / options.h
1 /* src/vm/options.h - define global options extern
2
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
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    Contact: cacao@cacaojvm.org
26
27    Authors: Christian Thalinger
28
29    Changes:
30
31    $Id: options.h 5206 2006-08-04 14:10:29Z twisti $
32
33 */
34
35
36 #ifndef _OPTIONS_H
37 #define _OPTIONS_H
38
39
40 #include "config.h"
41 #include "vm/types.h"
42
43 #include "native/jni.h"
44 #include "vm/global.h"
45
46
47 /* reserved option numbers ****************************************************/
48
49 /* define these negative since the other options are an enum */
50
51 #define OPT_DONE       -1
52 #define OPT_ERROR      -2
53 #define OPT_IGNORE     -3
54
55
56 typedef struct opt_struct opt_struct;
57
58 struct opt_struct {
59         char *name;
60         bool  arg;
61         int   value;
62 };
63
64
65 /* global variables ***********************************************************/
66
67 extern s4    opt_index;
68 extern char *opt_arg;
69
70 extern bool opt_foo;
71
72 extern bool opt_jit;
73 extern bool opt_intrp;
74
75 extern bool opt_jar;
76 extern bool opt_run;
77
78 extern s4   opt_heapmaxsize;
79 extern s4   opt_heapstartsize;
80 extern s4   opt_stacksize;
81
82 extern bool opt_verbose;
83 extern bool compileall;
84
85 extern bool loadverbose;         /* Print debug messages during loading */
86 extern bool linkverbose;
87 extern bool initverbose;         /* Log class initialization */ 
88
89 extern bool opt_verboseclass;
90 extern bool opt_verbosegc;
91 extern bool opt_verbosejni;
92 extern bool opt_verbosecall;
93 extern bool opt_verboseexception;
94
95 extern bool showmethods;
96 extern bool showconstantpool;
97 extern bool showutf;
98
99 extern char *opt_method;
100 extern char *opt_signature;
101
102 extern bool compileverbose;
103 extern bool showstack;
104 extern bool opt_showdisassemble;
105 extern bool opt_showddatasegment;
106 extern bool opt_showintermediate;
107 extern bool opt_showexceptionstubs;
108 extern bool opt_shownativestub;
109
110 extern bool useinlining;
111 extern bool inlinevirtuals;
112 extern bool inlineexceptions;
113 extern bool inlineparamopt;
114 extern bool inlineoutsiders;
115
116 extern bool checkbounds;
117 extern bool checknull;
118 extern bool opt_noieee;
119 extern bool checksync;
120 #if defined(ENABLE_LOOP)
121 extern bool opt_loops;
122 #endif
123
124 extern bool makeinitializations;
125
126 #if defined(ENABLE_STATISTICS)
127 extern bool opt_stat;
128 extern bool opt_getloadingtime;
129 extern bool opt_getcompilingtime;
130 #endif
131 #if defined(ENABLE_VERIFIER)
132 extern bool opt_verify;
133 #endif
134 extern bool opt_eager;
135
136 extern bool opt_prof;
137 extern bool opt_prof_bb;
138
139
140 /* optimization options *******************************************************/
141
142 #if defined(ENABLE_IFCONV)
143 extern bool opt_ifconv;
144 #endif
145
146 #if defined(ENABLE_LSRA)
147 extern bool opt_lsra;
148 #endif
149
150
151 /* interpreter options ********************************************************/
152
153 #if defined(ENABLE_INTRP)
154 extern bool opt_no_dynamic;
155 extern bool opt_no_replication;
156 extern bool opt_no_quicksuper;
157
158 extern s4   opt_static_supers;
159 extern bool vm_debug;
160 #endif
161
162
163 /* function prototypes ********************************************************/
164
165 s4 options_get(opt_struct *opts, JavaVMInitArgs *vm_args);
166 JavaVMInitArgs *options_prepare(int argc, char **argv);
167
168 #endif /* _OPTIONS_H */
169
170
171 /*
172  * These are local overrides for various environment variables in Emacs.
173  * Please do not remove this and leave it at the end of the file, where
174  * Emacs will automagically detect them.
175  * ---------------------------------------------------------------------
176  * Local variables:
177  * mode: c
178  * indent-tabs-mode: t
179  * c-basic-offset: 4
180  * tab-width: 4
181  * End:
182  */