* src/vm/options.h, src/vm/options.c (getloadingtime): Renamed to
[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 4834 2006-04-25 12:25:43Z edwin $
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_jit;
71 extern bool opt_intrp;
72
73 extern bool opt_jar;
74 extern bool opt_run;
75
76 extern s4   opt_stacksize;
77 extern bool opt_verbose;
78 extern bool compileall;
79
80 extern bool loadverbose;         /* Print debug messages during loading */
81 extern bool linkverbose;
82 extern bool initverbose;         /* Log class initialization */ 
83
84 extern bool opt_verboseclass;
85 extern bool opt_verbosegc;
86 extern bool opt_verbosejni;
87 extern bool opt_verbosecall;
88 extern bool opt_verboseexception;
89
90 extern bool showmethods;
91 extern bool showconstantpool;
92 extern bool showutf;
93
94 extern char *opt_method;
95 extern char *opt_signature;
96
97 extern bool compileverbose;
98 extern bool showstack;
99 extern bool opt_showdisassemble;
100 extern bool opt_showddatasegment;
101 extern bool opt_showintermediate;
102 extern bool opt_showexceptionstubs;
103 extern bool opt_shownativestub;
104
105 extern bool useinlining;
106 extern bool inlinevirtuals;
107 extern bool inlineexceptions;
108 extern bool inlineparamopt;
109 extern bool inlineoutsiders;
110
111 extern bool checkbounds;
112 extern bool checknull;
113 extern bool opt_noieee;
114 extern bool checksync;
115 #if defined(ENABLE_LOOP)
116 extern bool opt_loops;
117 #endif
118
119 extern bool makeinitializations;
120
121 #if defined(ENABLE_STATISTICS)
122 extern bool opt_stat;
123 extern bool opt_getloadingtime;
124 extern bool opt_getcompilingtime;
125 #endif
126 #if defined(ENABLE_VERIFIER)
127 extern bool opt_verify;
128 #endif
129 extern bool opt_eager;
130
131 extern bool opt_prof;
132 extern bool opt_prof_bb;
133
134
135 /* optimization options *******************************************************/
136
137 #if defined(ENABLE_IFCONV)
138 extern bool opt_ifconv;
139 #endif
140
141 #if defined(ENABLE_LSRA)
142 extern bool opt_lsra;
143 #endif
144
145
146 /* interpreter options ********************************************************/
147
148 #if defined(ENABLE_INTRP)
149 extern bool opt_no_dynamic;
150 extern bool opt_no_replication;
151 extern bool opt_no_quicksuper;
152
153 extern s4   opt_static_supers;
154 extern bool vm_debug;
155 #endif
156
157
158 /* function prototypes ********************************************************/
159
160 s4 options_get(opt_struct *opts, JavaVMInitArgs *vm_args);
161 JavaVMInitArgs *options_prepare(int argc, char **argv);
162
163 #endif /* _OPTIONS_H */
164
165
166 /*
167  * These are local overrides for various environment variables in Emacs.
168  * Please do not remove this and leave it at the end of the file, where
169  * Emacs will automagically detect them.
170  * ---------------------------------------------------------------------
171  * Local variables:
172  * mode: c
173  * indent-tabs-mode: t
174  * c-basic-offset: 4
175  * tab-width: 4
176  * End:
177  */