* src/vmcore/globals.cpp: New file.
authorChristian Thalinger <twisti@complang.tuwien.ac.at>
Fri, 18 Jul 2008 12:21:16 +0000 (14:21 +0200)
committerChristian Thalinger <twisti@complang.tuwien.ac.at>
Fri, 18 Jul 2008 12:21:16 +0000 (14:21 +0200)
* src/vmcore/globals.hpp: Likewise.
* src/vmcore/Makefile.am (libvmcore_la_SOURCES): Added
globals.{cpp,hpp}.
* src/vmcore/class.c: Moved global variables to globals.
* src/vmcore/class.h: Likewise.
* src/native/jni.cpp,
src/native/native.c,
src/native/vm/gnuclasspath/gnu_java_lang_VMCPStringBuilder.cpp,
src/native/vm/gnuclasspath/gnu_java_lang_management_VMRuntimeMXBeanImpl.c,
src/native/vm/gnuclasspath/java_lang_VMClass.cpp,
src/native/vm/gnuclasspath/java_lang_VMClassLoader.cpp,
src/native/vm/gnuclasspath/java_lang_VMThrowable.cpp,
src/native/vm/gnuclasspath/java_lang_management_VMManagementFactory.c,
src/native/vm/gnuclasspath/java_lang_reflect_VMMethod.cpp,
src/native/vm/nativevm.c,
src/native/vm/openjdk/jvm.c,
src/native/vm/reflect.c,
src/threads/posix/thread-posix.c,
src/threads/thread.c,
src/vm/access.c,
src/vm/builtin.c,
src/vm/exceptions.c,
src/vm/initialize.c,
src/vm/jit/jit.c,
src/vm/jit/replace.c,
src/vm/jit/stacktrace.cpp,
src/vm/jit/trace.c,
src/vm/jit/verify/typecheck-common.c,
src/vm/jit/verify/typecheck-stackbased.c,
src/vm/jit/verify/typecheck-typeinferer.c,
src/vm/jit/verify/typecheck.c,
src/vm/jit/verify/typeinfo.c,
src/vm/primitive.cpp,
src/vm/resolve.c,
src/vm/string.c,
src/vm/vm.cpp,
src/vmcore/linker.c,
src/vmcore/loader.c,
src/vmcore/method.c,
src/vmcore/primitivecore.c (globals.hpp): Added.

40 files changed:
src/native/jni.cpp
src/native/native.c
src/native/vm/gnuclasspath/gnu_java_lang_VMCPStringBuilder.cpp
src/native/vm/gnuclasspath/gnu_java_lang_management_VMRuntimeMXBeanImpl.c
src/native/vm/gnuclasspath/java_lang_VMClass.cpp
src/native/vm/gnuclasspath/java_lang_VMClassLoader.cpp
src/native/vm/gnuclasspath/java_lang_VMThrowable.cpp
src/native/vm/gnuclasspath/java_lang_management_VMManagementFactory.c
src/native/vm/gnuclasspath/java_lang_reflect_VMMethod.cpp
src/native/vm/nativevm.c
src/native/vm/openjdk/jvm.c
src/native/vm/reflect.c
src/threads/posix/thread-posix.c
src/threads/thread.c
src/vm/access.c
src/vm/builtin.c
src/vm/exceptions.c
src/vm/initialize.c
src/vm/jit/jit.c
src/vm/jit/replace.c
src/vm/jit/stacktrace.cpp
src/vm/jit/trace.c
src/vm/jit/verify/typecheck-common.c
src/vm/jit/verify/typecheck-stackbased.c
src/vm/jit/verify/typecheck-typeinferer.c
src/vm/jit/verify/typecheck.c
src/vm/jit/verify/typeinfo.c
src/vm/primitive.cpp
src/vm/resolve.c
src/vm/string.c
src/vm/vm.cpp
src/vmcore/Makefile.am
src/vmcore/class.c
src/vmcore/class.h
src/vmcore/globals.cpp [new file with mode: 0644]
src/vmcore/globals.hpp [new file with mode: 0644]
src/vmcore/linker.c
src/vmcore/loader.c
src/vmcore/method.c
src/vmcore/primitivecore.c

index 5f4a25ef611f214a99844b60d37b4dd3988666aa..9fe5703a8686a1e99187da22811bbbf07dfd7daf 100644 (file)
@@ -115,6 +115,7 @@ struct java_lang_ClassLoader;
 #include "vm/jit/jit.h"
 #include "vm/jit/stacktrace.hpp"
 
+#include "vmcore/globals.hpp"
 #include "vmcore/loader.h"
 #include "vmcore/options.h"
 #include "vmcore/statistics.h"
index 1c0ffd916872e6aff51e7b1c9a7c01732c89f507..6888466c9c8888467fef9ed1550516a2fc1c4ca8 100644 (file)
@@ -55,6 +55,7 @@
 #include "vm/jit/asmpart.h"
 #include "vm/jit/jit.h"
 
+#include "vmcore/globals.hpp"
 #include "vmcore/loader.h"
 #include "vmcore/options.h"
 #include "vmcore/system.h"
index 66cc7b81af8a18cd1ba95ce35728a1e29226a232..ae2c0ed8d2b54ca473222e1d6f0d2033691bcceb 100644 (file)
@@ -41,6 +41,8 @@ extern "C" {
 #include "vm/builtin.h"
 #include "vm/exceptions.h"
 
+#include "vmcore/globals.hpp"
+
 
 /*
  * Class:     gnu/java/lang/VMCPStringBuilder
index 13ebe25b9d5109888505bf6605fca19eda97318d..2ea12777ce8a1f6ae914fd2714fe14bc267f5557 100644 (file)
@@ -36,7 +36,7 @@
 #include "vm/global.h"
 #include "vm/vm.hpp"
 
-#include "vmcore/class.h"
+#include "vmcore/globals.hpp"
 #include "vmcore/utf8.h"
 
 
index c5ed15747eead926c89b31caf04ca571d7adbadc..4009f449526f93f20b2beab3397b5d95f342b104 100644 (file)
@@ -49,6 +49,7 @@ extern "C" {
 #include "vm/stringlocal.h"
 
 #include "vmcore/class.h"
+#include "vmcore/globals.hpp"
 
 #if defined(ENABLE_ANNOTATIONS)
 #include "native/include/sun_reflect_ConstantPool.h"
index 5154f8be65761fdca83febde0284d1aeac67546e..4fce49717484ad0db942550dec7f665e7141f418 100644 (file)
@@ -65,6 +65,7 @@ extern "C" {
 
 #include "vmcore/class.h"
 #include "vmcore/classcache.h"
+#include "vmcore/globals.hpp"
 #include "vmcore/linker.h"
 #include "vmcore/loader.h"
 #include "vmcore/options.h"
index 8b192e82b41fd7ef9a4c57d927b2aa027cc262de..9a4f6e883c63b930d2e30400e2cc0836cba8fb8e 100644 (file)
@@ -54,7 +54,7 @@ extern "C" {
 #include "vm/jit/linenumbertable.h"
 #include "vm/jit/stacktrace.hpp"
 
-#include "vmcore/class.h"
+#include "vmcore/globals.hpp"
 #include "vmcore/loader.h"
 
 
index 62e1a8ff815ffb95afb5d0ff95a5842c807bd395..c5331d2bff7ac2ee0773df8fd2df7323bc13596e 100644 (file)
@@ -1,9 +1,7 @@
-/* src/native/vm/gnu/java_lang_management_VMManagementFactory.c
+/* src/native/vm/gnuclasspath/java_lang_management_VMManagementFactory.c
 
-   Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
-   C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
-   E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
-   J. Wenninger, Institut f. Computersprachen - TU Wien
+   Copyright (C) 1996-2005, 2006, 2007, 2008
+   CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
 
    This file is part of CACAO.
 
@@ -40,7 +38,7 @@
 
 #include "vm/builtin.h"
 
-#include "vmcore/class.h"
+#include "vmcore/globals.hpp"
 
 
 /* native methods implemented by this file ************************************/
index cc9ba7f83fc08d0eed8ac83a6a0fd89b7bf86350..e699056e1988a16f0f627b673c3f07516eed4d23 100644 (file)
@@ -61,6 +61,7 @@ extern "C" {
 #include "vm/resolve.h"
 #include "vm/stringlocal.h"
 
+#include "vmcore/globals.hpp"
 #include "vmcore/method.h"
 
 
index aa46de4160798236296e4473894d282c760825e1..e5e62eefc4216370a5218c2764476a64cdfe821e 100644 (file)
@@ -46,6 +46,7 @@
 # include "vm/properties.h"
 # include "vm/vm.hpp"
 
+# include "vmcore/globals.hpp"
 # include "vmcore/utf8.h"
 #endif
 
index b06b56b129a77b17ed3c8eb5a09cfb0a6fb2c8c5..e74423e3a63838aca4ec63679f60db9ca8900ad6 100644 (file)
@@ -92,6 +92,7 @@
 #include "vm/jit/stacktrace.hpp"
 
 #include "vmcore/classcache.h"
+#include "vmcore/globals.hpp"
 #include "vmcore/options.h"
 #include "vmcore/system.h"
 
index 311cc543e63126704bcbd9443b0c588d134704a7..905ea402367250f972820ac9cf76ccdcd9d46791 100644 (file)
@@ -66,6 +66,7 @@
 #include "vm/initialize.h"
 #include "vm/stringlocal.h"
 
+#include "vmcore/globals.hpp"
 #include "vmcore/method.h"
 
 
index 8e0e45650cfe724ac5e7883e0e15a91a179645da..9682eba010a1ab640a21692faf78c28ddec62df5 100644 (file)
@@ -83,6 +83,7 @@
 
 #include "vm/jit/asmpart.h"
 
+#include "vmcore/globals.hpp"
 #include "vmcore/options.h"
 
 #if defined(ENABLE_STATISTICS)
index 133bb7e985b36697dee76305dad985375ee9d6af..c857e007d6ff3ab6db089db4c76c790e5d6f9443 100644 (file)
@@ -67,6 +67,7 @@
 #include "vm/jit/stacktrace.hpp"
 
 #include "vmcore/class.h"
+#include "vmcore/globals.hpp"
 #include "vmcore/method.h"
 #include "vmcore/options.h"
 
index 99d22406bcf49b3e6c2a21273fa7cae8e33ab4e0..ee02f786c1ae86f63589852ea0fae348b405ce8a 100644 (file)
@@ -42,6 +42,7 @@
 
 #include "vmcore/class.h"
 #include "vmcore/field.h"
+#include "vmcore/globals.hpp"
 #include "vmcore/method.h"
 
 
index a13fbf3ad0c18dee91df286e1576029b0b474f42..578ef8ed58ab5fca201dc452b4ab148f0b35fad7 100644 (file)
@@ -72,6 +72,7 @@
 #include "vm/jit/trace.h"
 
 #include "vmcore/class.h"
+#include "vmcore/globals.hpp"
 #include "vmcore/linker.h"
 #include "vmcore/loader.h"
 #include "vmcore/options.h"
index 96badf145261b6b4141dbce04364a0cc149ad931..5333ca5863d3dae7bbe44f80744b46bb4d806f6c 100644 (file)
@@ -65,6 +65,7 @@
 #include "vm/jit/trace.h"
 
 #include "vmcore/class.h"
+#include "vmcore/globals.hpp"
 #include "vmcore/loader.h"
 #include "vmcore/method.h"
 #include "vmcore/options.h"
index 36df049d17b410a592c5c5422288db83d7a495b9..01eba66a5d2f6edc71c7862b34d47f9990ad2546 100644 (file)
@@ -41,6 +41,7 @@
 #include "vm/jit/asmpart.h"
 
 #include "vmcore/class.h"
+#include "vmcore/globals.hpp"
 #include "vmcore/loader.h"
 #include "vmcore/options.h"
 
index 971a9dd752b937a6d9554b44dbd5b81d24d0bcc1..e83e168864f63bb9601f807b10edab10ecad633d 100644 (file)
@@ -90,6 +90,7 @@
 #include "vm/jit/verify/typecheck.h"
 
 #include "vmcore/class.h"
+#include "vmcore/globals.hpp"
 #include "vmcore/loader.h"
 #include "vmcore/method.h"
 #include "vmcore/options.h"
index 53c13c652311c1230b81b73479c72af6f59d6846..0c1b15072bd6d45171a9f9625272de96c4551d79 100644 (file)
 #include "vm/jit/show.h"
 #include "vm/jit/stack.h"
 
-#include "vmcore/options.h"
 #include "vmcore/classcache.h"
+#include "vmcore/globals.hpp"
+#include "vmcore/options.h"
+
 #if defined(ENABLE_RT_TIMING)
-#include "vmcore/rt-timing.h"
+# include "vmcore/rt-timing.h"
 #endif
 
 #define REPLACE_PATCH_DYNAMIC_CALL
index 005546784c014fb451107b04e2adf466b6c609fd..bd4174f0156a2181de979a238a80ee021029fa4a 100644 (file)
@@ -69,6 +69,7 @@
 #include "vm/jit/methodtree.h"
 
 #include "vmcore/class.h"
+#include "vmcore/globals.hpp"
 #include "vmcore/loader.h"
 #include "vmcore/method.h"
 #include "vmcore/options.h"
index ba7599937487f3ceb34d7575f06a680ed9537bf1..95852344b58928e1d72906617c455cc1142ebb48 100644 (file)
@@ -48,6 +48,7 @@
 #include "vm/jit/trace.h"
 #include "vm/jit/show.h"
 
+#include "vmcore/globals.hpp"
 #include "vmcore/options.h"
 #include "vmcore/utf8.h"
 
index 5b559438aea9a19fee8fe5e551a133224e407a21..ffbd1d2865bd8718df98fd5b10233f2f185dce45 100644 (file)
@@ -31,6 +31,9 @@
 
 #include <vm/exceptions.h>
 #include <vm/jit/show.h>
+
+#include "vmcore/globals.hpp"
+
 #include <typecheck-common.h>
 
 /****************************************************************************/
index ed24ea78ff0a45acbc2d7f34ff3052284c9a4d36..0aa5ca2b941f26850d8f19882fa9b7b4f9977b0a 100644 (file)
@@ -41,6 +41,8 @@
 #include "vm/jit/stack.h"
 #include "vm/jit/verify/typecheck-common.h"
 
+#include "vmcore/globals.hpp"
+
 
 /* this #if runs over the whole file: */
 #if defined(ENABLE_VERIFIER)
index 7ba2c6e10e5f92f48ae2982a1ecf203ff4439a8d..accf7456956add38ca9b8f0ed39b9511538e9a86 100644 (file)
@@ -49,6 +49,7 @@
 
 #include "vm/jit/verify/typecheck-typeinferer.h"
 
+#include "vmcore/globals.hpp"
 #include "vmcore/loader.h"
 #include "vmcore/options.h"
 
index f76e75226f0fb2409e678311c35fb8ec99badad4..f5377f21f812db2addebed723c99dcc4e380ef86 100644 (file)
@@ -159,6 +159,7 @@ error reporting.
 #include "vm/jit/parse.h"
 #include "vm/jit/show.h"
 
+#include "vmcore/globals.hpp"
 #include "vmcore/loader.h"
 #include "vmcore/options.h"
 
index a235941e734205068f598cdb5d3938e5d6e87043..17702de34d0702562c3d255ef23e22d137ca60c3 100644 (file)
@@ -42,6 +42,7 @@
 
 #include "vmcore/class.h"
 #include "vmcore/descriptor.h"
+#include "vmcore/globals.hpp"
 #include "vmcore/loader.h"
 
 
index f40a263fc9ca207ff51dccd7b14e6713ddd28972..1fe9e6d0b1b788118558c4f21a1f0b19dd6b50a9 100644 (file)
@@ -46,6 +46,7 @@
 #include "vm/vm.hpp"
 
 #include "vmcore/class.h"
+#include "vmcore/globals.hpp"
 #include "vmcore/utf8.h"
 
 
index 2506af917427d20eb50d156c09cc8aaa26a6934b..8a9232186399376ef4e78e889b4e99fc0f782363 100644 (file)
@@ -42,6 +42,7 @@
 
 #include "vmcore/classcache.h"
 #include "vmcore/descriptor.h"
+#include "vmcore/globals.hpp"
 #include "vmcore/linker.h"
 #include "vmcore/loader.h"
 #include "vmcore/options.h"
index cd283d02fb904011bc37caecc332aef7c966b999..c05ea3af25a6ebffb2077f086979cffe5a89bfd2 100644 (file)
@@ -49,6 +49,7 @@
 #include "vm/stringlocal.h"
 #include "vm/vm.hpp"
 
+#include "vmcore/globals.hpp"
 #include "vmcore/options.h"
 #include "vmcore/statistics.h"
 #include "vmcore/utf8.h"
index 6dd15885e703f1e54ce96c50a4f87f70ab2beedf..2e03a1e8780db221bff394eec9ce0a798372346b 100644 (file)
 #include "vm/jit/trap.h"
 
 #include "vmcore/classcache.h"
+#include "vmcore/globals.hpp"
 #include "vmcore/options.h"
 #include "vmcore/statistics.h"
 #include "vmcore/suck.h"
index 1b288f4010e6fffdb3a3b09415ddccbaa5b8d524..06bd0fc9982f9f7adf46cceaa54f8bc63f984eb6 100644 (file)
@@ -70,6 +70,8 @@ libvmcore_la_SOURCES = \
        descriptor.h \
        field.c \
        field.h \
+       globals.cpp \
+       globals.hpp \
        linker.c \
        linker.h \
        loader.c \
index 53aa727027537d0fb28dbeda92e74edfd3b63abd..7f5479a3344c189b6da749bada50fb92ce2aebcb 100644 (file)
@@ -52,6 +52,7 @@
 
 #include "vmcore/class.h"
 #include "vmcore/classcache.h"
+#include "vmcore/globals.hpp"
 #include "vmcore/linker.h"
 #include "vmcore/loader.h"
 #include "vmcore/options.h"
@@ -75,86 +76,6 @@ java_object_t *reflect_method_new(methodinfo *m);
 #endif
 
 
-/* global variables ***********************************************************/
-
-/* frequently used classes ****************************************************/
-
-/* Important system classes. */
-
-classinfo *class_java_lang_Object;
-classinfo *class_java_lang_Class;
-classinfo *class_java_lang_ClassLoader;
-classinfo *class_java_lang_Cloneable;
-classinfo *class_java_lang_SecurityManager;
-classinfo *class_java_lang_String;
-classinfo *class_java_lang_System;
-classinfo *class_java_lang_Thread;
-classinfo *class_java_lang_ThreadGroup;
-classinfo *class_java_lang_Throwable;
-classinfo *class_java_io_Serializable;
-
-#if defined(WITH_JAVA_RUNTIME_LIBRARY_GNU_CLASSPATH)
-classinfo *class_java_lang_VMSystem;
-classinfo *class_java_lang_VMThread;
-classinfo *class_java_lang_VMThrowable;
-#endif
-
-/* Important system exceptions. */
-
-classinfo *class_java_lang_Exception;
-classinfo *class_java_lang_ClassNotFoundException;
-classinfo *class_java_lang_RuntimeException;
-
-#if defined(WITH_JAVA_RUNTIME_LIBRARY_OPENJDK)
-classinfo *class_sun_reflect_MagicAccessorImpl;
-#endif
-
-#if defined(ENABLE_JAVASE)
-classinfo *class_java_lang_Void;
-#endif
-classinfo *class_java_lang_Boolean;
-classinfo *class_java_lang_Byte;
-classinfo *class_java_lang_Character;
-classinfo *class_java_lang_Short;
-classinfo *class_java_lang_Integer;
-classinfo *class_java_lang_Long;
-classinfo *class_java_lang_Float;
-classinfo *class_java_lang_Double;
-
-/* some classes which may be used more often */
-
-#if defined(ENABLE_JAVASE)
-classinfo *class_java_lang_StackTraceElement;
-classinfo *class_java_lang_reflect_Constructor;
-classinfo *class_java_lang_reflect_Field;
-classinfo *class_java_lang_reflect_Method;
-classinfo *class_java_security_PrivilegedAction;
-classinfo *class_java_util_Vector;
-classinfo *class_java_util_HashMap;
-
-# if defined(WITH_JAVA_RUNTIME_LIBRARY_GNU_CLASSPATH)
-classinfo *class_java_lang_reflect_VMConstructor;
-classinfo *class_java_lang_reflect_VMField;
-classinfo *class_java_lang_reflect_VMMethod;
-# endif
-
-classinfo *arrayclass_java_lang_Object;
-
-# if defined(ENABLE_ANNOTATIONS)
-classinfo *class_sun_reflect_ConstantPool;
-#  if defined(WITH_JAVA_RUNTIME_LIBRARY_GNU_CLASSPATH)
-classinfo *class_sun_reflect_annotation_AnnotationParser;
-#  endif
-# endif
-#endif
-
-/* pseudo classes for the typechecker */
-
-classinfo *pseudo_class_Arraystub;
-classinfo *pseudo_class_Null;
-classinfo *pseudo_class_New;
-
-
 /* class_set_packagename *******************************************************
 
    Derive the package name from the class name and store it in the
index 41949152bd48529b6e560e7c2682bd0a7b3f22c2..a5bd01031c4178522ba171c613fd2a747cf8aba4 100644 (file)
@@ -194,109 +194,6 @@ struct extra_classref {
 };
 
 
-/* global variables ***********************************************************/
-
-/* frequently used classes ****************************************************/
-
-/* Important system classes. */
-
-extern classinfo *class_java_lang_Object;
-extern classinfo *class_java_lang_Class;
-extern classinfo *class_java_lang_ClassLoader;
-extern classinfo *class_java_lang_Cloneable;
-extern classinfo *class_java_lang_SecurityManager;
-extern classinfo *class_java_lang_String;
-extern classinfo *class_java_lang_System;
-extern classinfo *class_java_lang_Thread;
-extern classinfo *class_java_lang_ThreadGroup;
-extern classinfo *class_java_lang_Throwable;
-extern classinfo *class_java_io_Serializable;
-
-/* Important system exceptions. */
-
-extern classinfo *class_java_lang_Exception;
-extern classinfo *class_java_lang_ClassNotFoundException;
-extern classinfo *class_java_lang_RuntimeException;
-
-#if defined(WITH_JAVA_RUNTIME_LIBRARY_GNU_CLASSPATH)
-extern classinfo *class_java_lang_VMSystem;
-extern classinfo *class_java_lang_VMThread;
-extern classinfo *class_java_lang_VMThrowable;
-#endif
-
-#if defined(WITH_JAVA_RUNTIME_LIBRARY_OPENJDK)
-extern classinfo *class_sun_reflect_MagicAccessorImpl;
-#endif
-
-#if defined(ENABLE_JAVASE)
-extern classinfo *class_java_lang_Void;
-#endif
-
-extern classinfo *class_java_lang_Boolean;
-extern classinfo *class_java_lang_Byte;
-extern classinfo *class_java_lang_Character;
-extern classinfo *class_java_lang_Short;
-extern classinfo *class_java_lang_Integer;
-extern classinfo *class_java_lang_Long;
-extern classinfo *class_java_lang_Float;
-extern classinfo *class_java_lang_Double;
-
-/* some classes which may be used more often */
-
-#if defined(ENABLE_JAVASE)
-extern classinfo *class_java_lang_StackTraceElement;
-extern classinfo *class_java_lang_reflect_Constructor;
-extern classinfo *class_java_lang_reflect_Field;
-extern classinfo *class_java_lang_reflect_Method;
-extern classinfo *class_java_security_PrivilegedAction;
-extern classinfo *class_java_util_Vector;
-extern classinfo *class_java_util_HashMap;
-
-# if defined(WITH_JAVA_RUNTIME_LIBRARY_GNU_CLASSPATH)
-extern classinfo *class_java_lang_reflect_VMConstructor;
-extern classinfo *class_java_lang_reflect_VMField;
-extern classinfo *class_java_lang_reflect_VMMethod;
-# endif
-
-extern classinfo *arrayclass_java_lang_Object;
-
-# if defined(ENABLE_ANNOTATIONS)
-extern classinfo *class_sun_reflect_ConstantPool;
-#  if defined(WITH_JAVA_RUNTIME_LIBRARY_GNU_CLASSPATH)
-extern classinfo *class_sun_reflect_annotation_AnnotationParser;
-#  endif
-# endif
-#endif
-
-
-/* pseudo classes for the type checker ****************************************/
-
-/*
- * pseudo_class_Arraystub
- *     (extends Object implements Cloneable, java.io.Serializable)
- *
- *     If two arrays of incompatible component types are merged,
- *     the resulting reference has no accessible components.
- *     The result does, however, implement the interfaces Cloneable
- *     and java.io.Serializable. This pseudo class is used internally
- *     to represent such results. (They are *not* considered arrays!)
- *
- * pseudo_class_Null
- *
- *     This pseudo class is used internally to represent the
- *     null type.
- *
- * pseudo_class_New
- *
- *     This pseudo class is used internally to represent the
- *     the 'uninitialized object' type.
- */
-
-extern classinfo *pseudo_class_Arraystub;
-extern classinfo *pseudo_class_Null;
-extern classinfo *pseudo_class_New;
-
-
 /* inline functions ***********************************************************/
 
 /**
diff --git a/src/vmcore/globals.cpp b/src/vmcore/globals.cpp
new file mode 100644 (file)
index 0000000..e9ae1e9
--- /dev/null
@@ -0,0 +1,123 @@
+/* src/vmcore/globals.cpp - global variables
+
+   Copyright (C) 2008
+   CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
+
+   This file is part of CACAO.
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 2, or (at
+   your option) any later version.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+*/
+
+
+#include "config.h"
+
+#include <stdint.h>
+
+#include "vmcore/class.h"
+
+
+// Classes.
+
+/* Important system classes. */
+
+classinfo *class_java_lang_Object;
+classinfo *class_java_lang_Class;
+classinfo *class_java_lang_ClassLoader;
+classinfo *class_java_lang_Cloneable;
+classinfo *class_java_lang_SecurityManager;
+classinfo *class_java_lang_String;
+classinfo *class_java_lang_System;
+classinfo *class_java_lang_Thread;
+classinfo *class_java_lang_ThreadGroup;
+classinfo *class_java_lang_Throwable;
+classinfo *class_java_io_Serializable;
+
+#if defined(WITH_JAVA_RUNTIME_LIBRARY_GNU_CLASSPATH)
+classinfo *class_java_lang_VMSystem;
+classinfo *class_java_lang_VMThread;
+classinfo *class_java_lang_VMThrowable;
+#endif
+
+/* Important system exceptions. */
+
+classinfo *class_java_lang_Exception;
+classinfo *class_java_lang_ClassNotFoundException;
+classinfo *class_java_lang_RuntimeException;
+
+#if defined(WITH_JAVA_RUNTIME_LIBRARY_OPENJDK)
+classinfo *class_sun_reflect_MagicAccessorImpl;
+#endif
+
+#if defined(ENABLE_JAVASE)
+classinfo *class_java_lang_Void;
+#endif
+classinfo *class_java_lang_Boolean;
+classinfo *class_java_lang_Byte;
+classinfo *class_java_lang_Character;
+classinfo *class_java_lang_Short;
+classinfo *class_java_lang_Integer;
+classinfo *class_java_lang_Long;
+classinfo *class_java_lang_Float;
+classinfo *class_java_lang_Double;
+
+/* some classes which may be used more often */
+
+#if defined(ENABLE_JAVASE)
+classinfo *class_java_lang_StackTraceElement;
+classinfo *class_java_lang_reflect_Constructor;
+classinfo *class_java_lang_reflect_Field;
+classinfo *class_java_lang_reflect_Method;
+classinfo *class_java_security_PrivilegedAction;
+classinfo *class_java_util_Vector;
+classinfo *class_java_util_HashMap;
+
+# if defined(WITH_JAVA_RUNTIME_LIBRARY_GNU_CLASSPATH)
+classinfo *class_java_lang_reflect_VMConstructor;
+classinfo *class_java_lang_reflect_VMField;
+classinfo *class_java_lang_reflect_VMMethod;
+# endif
+
+classinfo *arrayclass_java_lang_Object;
+
+# if defined(ENABLE_ANNOTATIONS)
+classinfo *class_sun_reflect_ConstantPool;
+#  if defined(WITH_JAVA_RUNTIME_LIBRARY_GNU_CLASSPATH)
+classinfo *class_sun_reflect_annotation_AnnotationParser;
+#  endif
+# endif
+#endif
+
+/* pseudo classes for the typechecker */
+
+classinfo *pseudo_class_Arraystub;
+classinfo *pseudo_class_Null;
+classinfo *pseudo_class_New;
+
+
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c++
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ * vim:noexpandtab:sw=4:ts=4:
+ */
diff --git a/src/vmcore/globals.hpp b/src/vmcore/globals.hpp
new file mode 100644 (file)
index 0000000..b4457d1
--- /dev/null
@@ -0,0 +1,159 @@
+/* src/vmcore/globals.hpp - global variables
+
+   Copyright (C) 2008
+   CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
+
+   This file is part of CACAO.
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 2, or (at
+   your option) any later version.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+*/
+
+
+#ifndef _GLOBALS_HPP
+#define _GLOBALS_HPP
+
+#include "config.h"
+
+#include <stdint.h>
+
+#include "vmcore/class.h"
+
+
+// FIXME For now we export them a C symbols.
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// Classes.
+
+/* Important system classes. */
+
+extern classinfo *class_java_lang_Object;
+extern classinfo *class_java_lang_Class;
+extern classinfo *class_java_lang_ClassLoader;
+extern classinfo *class_java_lang_Cloneable;
+extern classinfo *class_java_lang_SecurityManager;
+extern classinfo *class_java_lang_String;
+extern classinfo *class_java_lang_System;
+extern classinfo *class_java_lang_Thread;
+extern classinfo *class_java_lang_ThreadGroup;
+extern classinfo *class_java_lang_Throwable;
+extern classinfo *class_java_io_Serializable;
+
+/* Important system exceptions. */
+
+extern classinfo *class_java_lang_Exception;
+extern classinfo *class_java_lang_ClassNotFoundException;
+extern classinfo *class_java_lang_RuntimeException;
+
+#if defined(WITH_JAVA_RUNTIME_LIBRARY_GNU_CLASSPATH)
+extern classinfo *class_java_lang_VMSystem;
+extern classinfo *class_java_lang_VMThread;
+extern classinfo *class_java_lang_VMThrowable;
+#endif
+
+#if defined(WITH_JAVA_RUNTIME_LIBRARY_OPENJDK)
+extern classinfo *class_sun_reflect_MagicAccessorImpl;
+#endif
+
+#if defined(ENABLE_JAVASE)
+extern classinfo *class_java_lang_Void;
+#endif
+
+extern classinfo *class_java_lang_Boolean;
+extern classinfo *class_java_lang_Byte;
+extern classinfo *class_java_lang_Character;
+extern classinfo *class_java_lang_Short;
+extern classinfo *class_java_lang_Integer;
+extern classinfo *class_java_lang_Long;
+extern classinfo *class_java_lang_Float;
+extern classinfo *class_java_lang_Double;
+
+/* some classes which may be used more often */
+
+#if defined(ENABLE_JAVASE)
+extern classinfo *class_java_lang_StackTraceElement;
+extern classinfo *class_java_lang_reflect_Constructor;
+extern classinfo *class_java_lang_reflect_Field;
+extern classinfo *class_java_lang_reflect_Method;
+extern classinfo *class_java_security_PrivilegedAction;
+extern classinfo *class_java_util_Vector;
+extern classinfo *class_java_util_HashMap;
+
+# if defined(WITH_JAVA_RUNTIME_LIBRARY_GNU_CLASSPATH)
+extern classinfo *class_java_lang_reflect_VMConstructor;
+extern classinfo *class_java_lang_reflect_VMField;
+extern classinfo *class_java_lang_reflect_VMMethod;
+# endif
+
+extern classinfo *arrayclass_java_lang_Object;
+
+# if defined(ENABLE_ANNOTATIONS)
+extern classinfo *class_sun_reflect_ConstantPool;
+#  if defined(WITH_JAVA_RUNTIME_LIBRARY_GNU_CLASSPATH)
+extern classinfo *class_sun_reflect_annotation_AnnotationParser;
+#  endif
+# endif
+#endif
+
+
+/* pseudo classes for the type checker ****************************************/
+
+/*
+ * pseudo_class_Arraystub
+ *     (extends Object implements Cloneable, java.io.Serializable)
+ *
+ *     If two arrays of incompatible component types are merged,
+ *     the resulting reference has no accessible components.
+ *     The result does, however, implement the interfaces Cloneable
+ *     and java.io.Serializable. This pseudo class is used internally
+ *     to represent such results. (They are *not* considered arrays!)
+ *
+ * pseudo_class_Null
+ *
+ *     This pseudo class is used internally to represent the
+ *     null type.
+ *
+ * pseudo_class_New
+ *
+ *     This pseudo class is used internally to represent the
+ *     the 'uninitialized object' type.
+ */
+
+extern classinfo *pseudo_class_Arraystub;
+extern classinfo *pseudo_class_Null;
+extern classinfo *pseudo_class_New;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _CLASS_HPP
+
+
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c++
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ */
index 625d81cadb74afe000f59f6ae99c1ac594ece284..9c107445682e3ef23e88bd602ff041462ddfb643 100644 (file)
@@ -49,6 +49,7 @@
 
 #include "vmcore/class.h"
 #include "vmcore/classcache.h"
+#include "vmcore/globals.hpp"
 #include "vmcore/loader.h"
 #include "vmcore/options.h"
 #include "vmcore/rt-timing.h"
index a7935cdd99f3b26c76e0bc3657a69124ab57191d..3a844d57969bf0b75ef3209e96db28f949c8b247 100644 (file)
@@ -58,6 +58,7 @@
 
 #include "vmcore/classcache.h"
 #include "vmcore/field.h"
+#include "vmcore/globals.hpp"
 #include "vmcore/linker.h"
 #include "vmcore/loader.h"
 #include "vmcore/method.h"
index 61cfe429b323b33a00e123848278cb4e1b6853fb..59ecbf4f765082e68420457576471633f0d5e9ec 100644 (file)
@@ -50,6 +50,7 @@
 #include "vm/jit_interface.h"
 
 #include "vmcore/class.h"
+#include "vmcore/globals.hpp"
 #include "vmcore/linker.h"
 #include "vmcore/loader.h"
 #include "vmcore/method.h"
index 5f4cac830832c9759e76da40c42bca35e9884639..634ee6d07a31f7d7210e1b13a79f2d00cd524ba2 100644 (file)
@@ -33,6 +33,7 @@
 #include "vm/vm.hpp"
 
 #include "vmcore/class.h"
+#include "vmcore/globals.hpp"
 #include "vmcore/options.h"
 #include "vmcore/utf8.h"