2409cabc480bc93f0b0da373c9e0e884734b8042
[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 7596 2007-03-28 21:05:53Z twisti $
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 opt_noieee;
111 extern bool checksync;
112 #if defined(ENABLE_LOOP)
113 extern bool opt_loops;
114 #endif
115
116 extern bool makeinitializations;
117
118 #if defined(ENABLE_STATISTICS)
119 extern bool opt_stat;
120 extern bool opt_getloadingtime;
121 extern bool opt_getcompilingtime;
122 #endif
123 #if defined(ENABLE_VERIFIER)
124 extern bool opt_verify;
125 #endif
126 extern bool opt_eager;
127
128 #if defined(ENABLE_PROFILING)
129 extern bool opt_prof;
130 extern bool opt_prof_bb;
131 #endif
132
133 /* inlining options ***********************************************************/
134
135 #if defined(ENABLE_INLINING)
136 extern bool opt_inlining;
137 #if defined(ENABLE_INLINING_DEBUG) || !defined(NDEBUG)
138 extern s4 opt_replace_verbose;
139 extern s4 opt_inline_debug_min_size;
140 extern s4 opt_inline_debug_max_size;
141 extern s4 opt_inline_debug_end_counter;
142 extern bool opt_inline_debug_all;
143 #endif /* defined(ENABLE_INLINING_DEBUG) || !defined(NDEBUG) */
144 #if !defined(NDEBUG)
145 extern bool opt_inline_debug_log;
146 #endif /* !defined(NDEBUG) */
147 #endif /* defined(ENABLE_INLINING) */
148
149
150 /* optimization options *******************************************************/
151
152 #if defined(ENABLE_IFCONV)
153 extern bool opt_ifconv;
154 #endif
155
156 #if defined(ENABLE_LSRA) || defined(ENABLE_SSA)
157 extern bool opt_lsra;
158 #endif
159
160
161 /* interpreter options ********************************************************/
162
163 #if defined(ENABLE_INTRP)
164 extern bool opt_no_dynamic;
165 extern bool opt_no_replication;
166 extern bool opt_no_quicksuper;
167
168 extern s4   opt_static_supers;
169 extern bool vm_debug;
170 #endif
171
172
173 /* function prototypes ********************************************************/
174
175 s4 options_get(opt_struct *opts, JavaVMInitArgs *vm_args);
176
177 #endif /* _OPTIONS_H */
178
179
180 /*
181  * These are local overrides for various environment variables in Emacs.
182  * Please do not remove this and leave it at the end of the file, where
183  * Emacs will automagically detect them.
184  * ---------------------------------------------------------------------
185  * Local variables:
186  * mode: c
187  * indent-tabs-mode: t
188  * c-basic-offset: 4
189  * tab-width: 4
190  * End:
191  */