* src/vm/options.h: Likewise.
* src/vm/vm.cpp: Removed obsolete flags and adapted to above changes.
bool opt_verbose = false;
bool opt_debugcolor = false; /* use ANSI terminal sequences */
-bool compileall = false;
bool loadverbose = false;
bool initverbose = false;
bool showconstantpool = false;
bool showutf = false;
-char *opt_method = NULL;
-char *opt_signature = NULL;
-
bool compileverbose = false; /* trace compiler actions */
bool showstack = false;
/* Debugging options which can be turned off. */
bool opt_AlwaysEmitLongBranches = false;
+int opt_CompileAll = 0;
+char* opt_CompileMethod = NULL;
+char* opt_CompileSignature = NULL;
int opt_DebugExceptions = 0;
int opt_DebugFinalizer = 0;
int opt_DebugLocalReferences = 0;
/* Debugging options which can be turned off. */
OPT_AlwaysEmitLongBranches,
+ OPT_CompileAll,
+ OPT_CompileMethod,
+ OPT_CompileSignature,
OPT_DebugExceptions,
OPT_DebugFinalizer,
OPT_DebugLocalReferences,
/* Debugging options which can be turned off. */
{ "AlwaysEmitLongBranches", OPT_AlwaysEmitLongBranches, OPT_TYPE_BOOLEAN, "Always emit long-branches." },
+ { "CompileAll", OPT_CompileAll, OPT_TYPE_BOOLEAN, "compile all methods, no execution" },
+ { "CompileMethod", OPT_CompileMethod, OPT_TYPE_VALUE, "compile only a specific method" },
+ { "CompileSignature", OPT_CompileSignature, OPT_TYPE_VALUE, "specify signature for a specific method" },
{ "DebugExceptions", OPT_DebugExceptions, OPT_TYPE_BOOLEAN, "debug exceptions" },
{ "DebugFinalizer", OPT_DebugFinalizer, OPT_TYPE_BOOLEAN, "debug finalizer thread" },
{ "DebugLocalReferences", OPT_DebugLocalReferences, OPT_TYPE_BOOLEAN, "print debug information for local reference tables" },
opt_AlwaysEmitLongBranches = enable;
break;
+ case OPT_CompileAll:
+ opt_CompileAll = enable;
+ opt_run = false;
+ makeinitializations = false;
+ break;
+
+ case OPT_CompileMethod:
+ opt_CompileMethod = value;
+ opt_run = false;
+ makeinitializations = false;
+ break;
+
+ case OPT_CompileSignature:
+ opt_CompileSignature = value;
+ break;
+
case OPT_DebugExceptions:
opt_DebugExceptions = enable;
break;
extern bool opt_verbose;
extern bool opt_debugcolor;
-extern bool compileall;
extern bool loadverbose; /* Print debug messages during loading */
extern bool initverbose; /* Log class initialization */
extern bool showconstantpool;
extern bool showutf;
-extern char *opt_method;
-extern char *opt_signature;
-
extern bool compileverbose;
extern bool showstack;
/* Debugging options which can be turned off. */
extern bool opt_AlwaysEmitLongBranches;
+extern int opt_CompileAll;
+extern char* opt_CompileMethod;
+extern char* opt_CompileSignature;
extern int opt_DebugExceptions;
extern int opt_DebugFinalizer;
extern int opt_DebugLocalReferences;
OPT_SHOW,
OPT_DEBUGCOLOR,
-#if !defined(NDEBUG)
- OPT_ALL,
- OPT_METHOD,
- OPT_SIGNATURE,
-#endif
-
#if defined(ENABLE_VERIFIER)
OPT_NOVERIFY,
OPT_XVERIFY_ALL,
{ "c", true, OPT_CHECK },
{ "l", false, OPT_LOAD },
-#if !defined(NDEBUG)
- { "all", false, OPT_ALL },
- { "sig", true, OPT_SIGNATURE },
-#endif
-
#if defined(ENABLE_LOOP)
{ "oloop", false, OPT_OLOOP },
#endif
/* keep these at the end of the list */
-#if !defined(NDEBUG)
- { "m", true, OPT_METHOD },
-#endif
-
{ "s", true, OPT_SHOW },
{ "debug-color", false, OPT_DEBUGCOLOR },
puts(" -oloop optimize array accesses in loops");
#endif
puts(" -l don't start the class after loading");
-#if !defined(NDEBUG)
- puts(" -all compile all methods, no execution");
- puts(" -m compile only a specific method");
- puts(" -sig specify signature for a specific method");
-#endif
puts(" -s... show...");
puts(" (c)onstants the constant pool");
makeinitializations = false;
break;
-#if !defined(NDEBUG)
- case OPT_ALL:
- compileall = true;
- opt_run = false;
- makeinitializations = false;
- break;
-
- case OPT_METHOD:
- opt_run = false;
- opt_method = opt_arg;
- makeinitializations = false;
- break;
-
- case OPT_SIGNATURE:
- opt_signature = opt_arg;
- break;
-#endif
-
case OPT_SHOW: /* Display options */
for (unsigned int i = 0; i < strlen(opt_arg); i++) {
switch (opt_arg[i]) {
oa = NULL;
#if !defined(NDEBUG)
- if (compileall) {
+ if (opt_CompileAll) {
vm_compile_all();
return;
}
usage();
#if !defined(NDEBUG)
- if (opt_method != NULL) {
+ if (opt_CompileMethod != NULL) {
vm_compile_method(mainname);
return;
}
if (!link_class(mainclass))
exceptions_print_stacktrace();
- if (opt_signature != NULL) {
+ if (opt_CompileSignature != NULL) {
m = class_resolveclassmethod(mainclass,
- utf_new_char(opt_method),
- utf_new_char(opt_signature),
+ utf_new_char(opt_CompileMethod),
+ utf_new_char(opt_CompileSignature),
mainclass,
false);
}
else {
m = class_resolveclassmethod(mainclass,
- utf_new_char(opt_method),
+ utf_new_char(opt_CompileMethod),
NULL,
mainclass,
false);
if (m == NULL)
os::abort("vm_compile_method: java.lang.NoSuchMethodException: %s.%s",
- opt_method, opt_signature ? opt_signature : "");
+ opt_CompileMethod, opt_CompileSignature ? opt_CompileSignature : "");
jit_compile(m);
}