* src/vm/jit/trap.c: Moved to C++
[cacao.git] / src / vm / vm.cpp
index 30e8d3bfcc6f7a3bf7986a4f9c74d2d49041ca67..43fb31c9a402ac613579e143935f44c9c5dc6d4a 100644 (file)
@@ -43,7 +43,7 @@
 #include "mm/codememory.h"
 #include "mm/dumpmemory.hpp"
 #include "mm/gc.hpp"
-#include "mm/memory.h"
+#include "mm/memory.hpp"
 
 #include "native/jni.hpp"
 #include "native/llni.h"
@@ -55,7 +55,7 @@
 #include "threads/lock.hpp"
 #include "threads/thread.hpp"
 
-#include "toolbox/logging.h"
+#include "toolbox/logging.hpp"
 
 #include "vm/array.hpp"
 
 #endif
 
 #include "vm/jit/builtin.hpp"
-#include "vm/classcache.h"
+#include "vm/classcache.hpp"
 #include "vm/exceptions.hpp"
-#include "vm/finalizer.h"
+#include "vm/finalizer.hpp"
 #include "vm/global.h"
 #include "vm/globals.hpp"
-#include "vm/initialize.h"
+#include "vm/initialize.hpp"
 #include "vm/options.h"
 #include "vm/os.hpp"
 #include "vm/primitive.hpp"
 #include "vm/properties.hpp"
-#include "vm/signallocal.h"
+#include "vm/signallocal.hpp"
 #include "vm/statistics.h"
 #include "vm/string.hpp"
 #include "vm/suck.hpp"
 # 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"
@@ -189,10 +189,11 @@ enum {
        OPT_MS,
        OPT_MX,
 
+       OPT_XCHECK_JNI,
+
        /* CACAO options */
 
        OPT_VERBOSE1,
-       OPT_NOIEEE,
 
 #if defined(ENABLE_STATISTICS)
        OPT_TIME,
@@ -213,6 +214,8 @@ enum {
 
 #if defined(ENABLE_VERIFIER)
        OPT_NOVERIFY,
+       OPT_XVERIFY_ALL,
+       OPT_XVERIFY_NONE,
 #if defined(TYPECHECK_VERBOSE)
        OPT_VERBOSETC,
 #endif
@@ -305,7 +308,8 @@ opt_struct opts[] = {
        { "noasyncgc",         false, OPT_IGNORE },
 #if defined(ENABLE_VERIFIER)
        { "noverify",          false, OPT_NOVERIFY },
-       { "Xverify:none",      false, OPT_NOVERIFY },
+       { "Xverify:all",       false, OPT_XVERIFY_ALL },
+       { "Xverify:none",      false, OPT_XVERIFY_NONE },
 #endif
        { "v",                 false, OPT_VERBOSE1 },
        { "verbose:",          true,  OPT_VERBOSE },
@@ -313,9 +317,6 @@ opt_struct opts[] = {
 #if defined(ENABLE_VERIFIER) && defined(TYPECHECK_VERBOSE)
        { "verbosetc",         false, OPT_VERBOSETC },
 #endif
-#if defined(__ALPHA__)
-       { "noieee",            false, OPT_NOIEEE },
-#endif
 #if defined(ENABLE_STATISTICS)
        { "time",              false, OPT_TIME },
        { "stat",              false, OPT_STAT },
@@ -380,6 +381,8 @@ opt_struct opts[] = {
        { "Xss",               true,  OPT_SS },
        { "ss",                true,  OPT_SS },
 
+       { "Xcheck:jni",        false, OPT_XCHECK_JNI },
+
 #if defined(ENABLE_PROFILING)
        { "Xprof:",            true,  OPT_PROF_OPTION },
        { "Xprof",             false, OPT_PROF },
@@ -508,9 +511,6 @@ static void XXusage(void)
 #ifdef TYPECHECK_VERBOSE
        puts("    -verbosetc               write debug messages while typechecking");
 #endif
-#if defined(__ALPHA__)
-       puts("    -noieee                  don't use ieee compliant arithmetic");
-#endif
 #if defined(ENABLE_VERIFIER)
        puts("    -noverify                don't verify classfiles");
 #endif
@@ -734,8 +734,6 @@ VM::VM(JavaVMInitArgs* vm_args)
        opt_version       = false;
        opt_exit          = false;
 
-       opt_noieee        = false;
-
        opt_heapmaxsize   = HEAP_MAXSIZE;
        opt_heapstartsize = HEAP_STARTSIZE;
        opt_stacksize     = STACK_SIZE;
@@ -759,7 +757,7 @@ VM::VM(JavaVMInitArgs* vm_args)
 
        /* We need to check if the actual size of a java.lang.Class object
           is smaller or equal than the assumption made in
-          src/vm/class.h. */
+          src/vm/class.hpp. */
 
 #warning FIXME We need to check the size of java.lang.Class!!!
 //     if (sizeof(java_lang_Class) > sizeof(dummy_java_lang_Class))
@@ -985,6 +983,10 @@ VM::VM(JavaVMInitArgs* vm_args)
                        }
                        break;
 
+               case OPT_XCHECK_JNI:
+                       // HotSpot compatibility option.
+                       break;
+
                case OPT_VERBOSE1:
                        opt_verbose = true;
                        break;
@@ -1036,12 +1038,13 @@ VM::VM(JavaVMInitArgs* vm_args)
                        opt_version = true;
                        break;
 
-               case OPT_NOIEEE:
-                       opt_noieee = true;
+#if defined(ENABLE_VERIFIER)
+               case OPT_XVERIFY_ALL:
+                       opt_verify = true;
                        break;
 
-#if defined(ENABLE_VERIFIER)
                case OPT_NOVERIFY:
+               case OPT_XVERIFY_NONE:
                        opt_verify = false;
                        break;
 #endif
@@ -1435,12 +1438,6 @@ VM::VM(JavaVMInitArgs* vm_args)
        if (!builtin_init())
                os::abort("vm_create: builtin_init failed");
 
-       /* Initialize the native subsystem. */
-       /* BEFORE: threads_init */
-
-       if (!native_init())
-               os::abort("vm_create: native_init failed");
-
        /* Register the native methods implemented in the VM. */
        /* BEFORE: threads_init */