* src/native/native.hpp (NativeAgent, NativeAgents): Added new classes for
[cacao.git] / src / vm / vm.hpp
index 79cec7e22dd6502543bda64bf0052e680b15c741..e57c1b958054cb535c55b124c168451ddc70f5ef 100644 (file)
 
 // We need the JNI types for the VM class.
 #include "native/jni.hpp"
+#include "native/native.hpp"
+
+#if defined(WITH_JAVA_RUNTIME_LIBRARY_OPENJDK)
+# include "native/vm/openjdk/hpi.hpp"
+# include "native/vm/openjdk/management.hpp"
+#endif
+
+#include "vm/properties.hpp"
+#include "vm/suck.hpp"
+
+#include "vm/jit/optimizing/recompiler.hpp"
+
 
 #ifdef __cplusplus
 
@@ -54,6 +66,22 @@ private:
        bool    _exiting;
        int64_t _starttime;
 
+       // Subsystems.
+       Properties      _properties;      ///< Commandline properties.
+#if defined(ENABLE_THREADS)
+       Recompiler      _recompiler;      ///< JIT recompilation framework.
+#endif
+#if defined(WITH_JAVA_RUNTIME_LIBRARY_OPENJDK)
+       HPI             _hpi;             ///< Host Porting Interface.
+       Management      _management;      ///< Java management interface.
+#endif
+       NativeLibraries _nativelibraries; ///< Native library table.
+       NativeMethods   _nativemethods;   ///< Native methods table.
+#if defined(ENABLE_JVMTI)
+       NativeAgents    _nativeagents;    ///< Native agents table.
+#endif
+       SuckClasspath   _suckclasspath;   ///< Classpath entries list.
+
 public:
        // Constructor, Destructor.
        VM(JavaVMInitArgs*);
@@ -62,8 +90,9 @@ public:
        // Static methods.
        static bool create(JavaVM** p_vm, void** p_env, void* vm_args);
        static VM*  get_current() { return _vm; }
+
        static void print_build_time_config();
-       static void print_run_time_config();
+       void        print_run_time_config();
 
        // Getters for private members.
        JavaVM* get_javavm()      { return _javavm; }
@@ -73,10 +102,15 @@ public:
        bool    is_exiting()      { return _exiting; }
        int64_t get_starttime()   { return _starttime; }
 
-       // Instance functions.
-       void abort(const char* text, ...);
-       void abort_errnum(int errnum, const char* text, ...);
-       void abort_errno(const char* text, ...);
+       Properties&      get_properties     () { return _properties; }
+       Recompiler&      get_recompiler     () { return _recompiler; } // REMOVEME
+#if defined(WITH_JAVA_RUNTIME_LIBRARY_OPENJDK)
+       HPI&             get_hpi            () { return _hpi; }
+       Management&      get_management     () { return _management; }
+#endif
+       NativeLibraries& get_nativelibraries() { return _nativelibraries; }
+       NativeMethods&   get_nativemethods  () { return _nativemethods; }
+       SuckClasspath&   get_suckclasspath  () { return _suckclasspath; }
 };
 
 #else
@@ -92,7 +126,7 @@ int64_t VM_get_starttime();
 
 // Includes.
 #include "vm/global.h"
-#include "vm/method.h"
+#include "vm/method.hpp"
 
 
 /* These C methods are the exported interface. ********************************/
@@ -162,8 +196,6 @@ java_handle_t *vm_call_method_objectarray(methodinfo *m, java_handle_t *o, java_
 
 // Legacy C interface.
 void vm_abort(const char* text, ...);
-void vm_abort_errnum(int errnum, const char* text, ...);
-void vm_abort_errno(const char* text, ...);
 
 #ifdef __cplusplus
 }