# include "vm/jit/python.h"
#endif
-#include "vm/jit/trap.h"
+#include "vm/jit/trap.hpp"
#if defined(ENABLE_JVMTI)
# include "native/jvmti/cacaodbg.h"
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]) {
/* AFTER: thread_preinit */
- if (!suck_init())
- os::abort("vm_create: suck_init failed");
-
- suck_add_from_property("java.endorsed.dirs");
+ _suckclasspath.add_from_property("java.endorsed.dirs");
/* Now we have all options handled and we can print the version
information.
// FIXME Make boot_class_path const char*.
boot_class_path = (char*) _properties.get("sun.boot.class.path");
- suck_add(boot_class_path);
+ _suckclasspath.add(boot_class_path);
/* initialize the classcache hashtable stuff: lock, hashtable
(must be done _after_ threads_preinit) */
/* Initialize the native VM subsystem. */
/* AFTER: threads_init (at least for SUN's classes) */
- nativevm_init();
+ if (!nativevm_init())
+ os::abort("vm_create: nativevm_init failed");
#if defined(ENABLE_PROFILING)
/* initialize profiling */
int status;
#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);
}
{
va_list ap;
- va_start(ap, text);
- os::abort(text, ap);
- va_end(ap);
-}
+ log_println("vm_abort: WARNING, port me to C++ and use os::abort() instead.");
-void vm_abort_errnum(int errnum, const char* text, ...)
-{
- va_list ap;
+ // Print the log message.
+ log_start();
va_start(ap, text);
- os::abort_errnum(errnum, text, ap);
+ log_vprint(text, ap);
va_end(ap);
-}
-void vm_abort_errno(const char* text, ...)
-{
- va_list ap;
+ log_finish();
- va_start(ap, text);
- os::abort_errno(text, ap);
- va_end(ap);
+ // Print a backtrace.
+ os::print_backtrace();
+
+ // Now abort the VM.
+ os::abort();
}
}