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