New source tree.
authortwisti <none@none>
Tue, 30 Nov 2004 13:06:55 +0000 (13:06 +0000)
committertwisti <none@none>
Tue, 30 Nov 2004 13:06:55 +0000 (13:06 +0000)
93 files changed:
Makefile.am
autogen.sh
configure.in
src/boehm-gc/acinclude.m4
src/boehm-gc/autogen.sh
src/boehm-gc/configure.in
src/cacao/cacao.c
src/cacao/cacao.h
src/cacaoh/cacaoh.c
src/cacaoh/headers.c
src/cacaoh/headers.h
src/mm/Makefile.am
src/mm/boehm.c
src/mm/boehm.h
src/mm/memory.c
src/native/jni.c
src/native/jni.h
src/native/natcalls.h
src/native/native.c
src/native/native.h
src/native/tools/gennativetable.c
src/native/vm/Constructor.c
src/native/vm/Field.c
src/native/vm/Makefile.am
src/native/vm/Method.c
src/native/vm/Proxy.c
src/native/vm/VMClass.c
src/native/vm/VMClassLoader.c
src/native/vm/VMObject.c
src/native/vm/VMRuntime.c
src/native/vm/VMSecurityManager.c
src/native/vm/VMString.c
src/native/vm/VMSystem.c
src/native/vm/VMThread.c
src/native/vm/VMThrowable.c
src/threads/green/Makefile.am
src/threads/native/threads.c
src/threads/native/threads.h
src/toolbox/Makefile.am
src/toolbox/avl.c
src/toolbox/chain.c
src/toolbox/list.c
src/toolbox/logging.c
src/toolbox/logging.h
src/toolbox/tree.c
src/vm/builtin.c
src/vm/builtin.h
src/vm/exceptions.c
src/vm/exceptions.h
src/vm/global.h
src/vm/jit/Makefile.am
src/vm/jit/asmpart.h
src/vm/jit/codegen.inc
src/vm/jit/codegen.inc.h
src/vm/jit/inline/inline.c
src/vm/jit/inline/inline.h
src/vm/jit/inline/parseRT.c
src/vm/jit/inline/parseRT.h
src/vm/jit/inline/parseRTstats.c
src/vm/jit/inline/sets.c
src/vm/jit/inline/sets.h
src/vm/jit/jit.c
src/vm/jit/jit.h
src/vm/jit/loop/Makefile.am
src/vm/jit/loop/analyze.c
src/vm/jit/loop/analyze.h
src/vm/jit/loop/graph.c
src/vm/jit/loop/loop.c
src/vm/jit/loop/loop.h
src/vm/jit/loop/tracing.c
src/vm/jit/loop/tracing.h
src/vm/jit/lsra.inc
src/vm/jit/parse.c
src/vm/jit/parse.h
src/vm/jit/reg.h
src/vm/jit/reg.inc
src/vm/jit/stack.c
src/vm/jit/stack.h
src/vm/jit/tools/genoffsets.c
src/vm/jit/verify/typecheck.c
src/vm/jit/verify/typecheck.h
src/vm/jit/verify/typeinfo.c
src/vm/jit/verify/typeinfo.h
src/vm/jit/x86_64/Makefile.am
src/vm/jit/x86_64/asmpart.S
src/vm/jit/x86_64/codegen.c
src/vm/jit/x86_64/codegen.h
src/vm/jit/x86_64/emitfuncs.c
src/vm/jit/x86_64/emitfuncs.h
src/vm/jit/x86_64/types.h
src/vm/loader.c
src/vm/options.h
src/vm/tables.c

index b59781d95c001d6f1371dcc51fa36f855465e8f0..1eda8cac24d65a3890f7a8358624585cb418d1f7 100644 (file)
 ## Process this file with automake to produce Makefile.in
 
-# $Id: Makefile.am 1572 2004-11-23 16:05:40Z twisti $
-
-@SET_MAKE@
+# $Id: Makefile.am 1621 2004-11-30 13:06:55Z twisti $
 
 MAINTAINERCLEANFILES = Makefile.in configure
-ALLSUBDIRS = mm toolbox threads jit nat tst doc jvmtst classpath
-SUBDIRS = $(ALLSUBDIRS)
-DIST_SUBDIRS = $(ALLSUBDIRS)
+
+SUBDIRS = doc src tests
 
 EXTRA_DIST = \
        html/cacaoinstall.html \
        html/cacaoman.html \
-       html/index.html \
-       main.h \
-       natcalls.h \
-       nativecalls.h
-
-CLEANFILES = \
-       nativetable.inc
-
-bin_PROGRAMS = cacao cacaoh
-noinst_PROGRAMS = gennativetable genoffsets
-
-INCLUDES = -I$(top_srcdir)/jit/@ARCH_DIR@
-
-BOEHM_LIBS = mm/libboehm.a mm/boehm-gc/.libs/libgc.a
-
-if USE_ZLIB
-ZLIB_OBJ = unzip.c
-endif
-
-cacao_SOURCES = \
-       builtin.c \
-       exceptions.c \
-       jni.c \
-       loader.c \
-       main.c \
-       native.c \
-       options.c \
-       statistics.c \
-       tables.c \
-       typeinfo.c \
-       $(ZLIB_OBJ)
-
-cacao_LDADD = \
-       jit/libjit.a \
-       jit/loop/libloop.a \
-       jit/@ARCH_DIR@/libarch.a \
-       nat/libnat.a \
-       $(BOEHM_LIBS) \
-       @THREAD_OBJ@ \
-       toolbox/libtoolbox.a \
-        @STATIC_CLASSPATH_LIBS@ \
-        @DYNAMIC_CLASSPATH_LIBS@ \
-       @AWT_OBJS@
-
-
-cacao_DEPENDENCIES = \
-       jit/libjit.a \
-       jit/loop/libloop.a \
-       jit/@ARCH_DIR@/libarch.a \
-       nat/libnat.a \
-       $(BOEHM_LIBS) \
-       @THREAD_OBJ@ \
-       toolbox/libtoolbox.a \
-        @STATIC_CLASSPATH_LIBS@ \
-       nativetable.inc \
-       @AWT_OBJS@
-
-cacaoh_SOURCES = \
-       builtin.c \
-       cacaoh.c \
-       exceptions.c \
-       headers.c \
-       loader.c \
-       options.c \
-       statistics.c \
-       tables.c \
-       $(ZLIB_OBJ)
-
-cacaoh_LDADD = \
-       $(BOEHM_LIBS) \
-       classpath/native/jni/java-lang/.libs/libjavalang.a \
-       @THREAD_OBJ@ \
-       toolbox/libtoolbox.a
-
-cacaoh_DEPENDENCIES = \
-       $(BOEHM_LIBS) \
-       classpath/native/jni/java-lang/.libs/libjavalang.a \
-       @THREAD_OBJ@ \
-       toolbox/libtoolbox.a
-
-gennativetable_SOURCES = \
-       builtin.c \
-       exceptions.c \
-       gennativetable.c \
-       headers.c \
-       loader.c \
-       options.c \
-       tables.c \
-       statistics.c \
-       $(ZLIB_OBJ)
-
-gennativetable_LDADD = \
-       $(BOEHM_LIBS) \
-       classpath/native/jni/java-lang/.libs/libjavalang.a \
-       @THREAD_OBJ@ \
-       toolbox/libtoolbox.a
-
-gennativetable_DEPENDENCIES = \
-       $(BOEHM_LIBS) \
-       classpath/native/jni/java-lang/.libs/libjavalang.a \
-       @THREAD_OBJ@ \
-       toolbox/libtoolbox.a
-
-all: cacaoh genoffsets gennativetable cacao
-
-mm/libboehm.a:
-       make -C mm
-
-classpath/native/jni/java-lang/.libs/libjavalang.a:
-       make -C classpath/native/
-
-threads/libthreads.a:
-       make -C threads
-
-toolbox/libtoolbox.a:
-       make -C toolbox
-
-jit/libjit.a:
-       make -C jit
-
-nat/libnat.a:
-       make -C nat
-
-natheaders: cacaoh
-       CLASSPATH=$(top_srcdir)/classpath/lib/bootstrap.zip \
-       ./cacaoh -d nat/ \
-       $(CLASSES)
-
-nativetable.inc: gennativetable nat/implementednatives.data
-       CLASSPATH=$(top_srcdir)/classpath/lib/bootstrap.zip \
-       $(top_srcdir)/gennativetable \
-       $(NOGEN_CLASSES) \
-       $(CLASSES) \
-       > nativetable.inc
-
-nat/implementednatives.data:
-       make -C nat implementednatives
-
-native.c: nativetable.inc
-
-CLASSES= \
-       java.lang.JOWENNTest1 \
-       \
-       java.lang.reflect.Field \
-       java.lang.SecurityManager \
-       java.net.DatagramPacket \
-       java.net.InetAddress \
-       java.net.SocketImpl \
-       java.util.Properties \
-       \
-       gnu.classpath.Configuration \
-       gnu.classpath.RawData \
-       gnu.java.lang.reflect.TypeSignature \
-       gnu.java.math.MPN \
-       gnu.java.net.PlainDatagramSocketImpl \
-       gnu.java.net.PlainSocketImpl \
-       gnu.java.nio.FileLockImpl \
-       gnu.java.nio.SelectorImpl \
-       gnu.java.nio.channels.FileChannelImpl \
-       gnu.java.security.x509.X509Certificate  \
-       java.beans.PropertyEditor \
-       java.io.DataInput \
-       java.io.DataInputStream \
-       java.io.File \
-       java.io.FileDescriptor \
-       java.io.FileInputStream \
-       java.io.FileWriter \
-       java.io.ObjectInputStream \
-       java.io.OutputStream \
-       java.io.OutputStreamWriter \
-       java.io.PrintStream \
-       java.io.PrintWriter \
-       java.io.RandomAccessFile \
-       java.io.VMFile \
-       java.io.VMObjectStreamClass \
-       java.io.Writer \
-       java.lang.Boolean \
-       java.lang.Byte \
-       java.lang.Character \
-       java.lang.Class \
-       java.lang.Compiler \
-       java.lang.Double \
-       java.lang.Float \
-       java.lang.Integer \
-       java.lang.Long \
-       java.lang.Math \
-       java.lang.Process \
-       java.lang.Runtime \
-       java.lang.RuntimePermission \
-       java.lang.Short \
-       java.lang.StackTraceElement \
-       java.lang.StrictMath \
-       java.lang.StringBuffer \
-       java.lang.System \
-       java.lang.UnsatisfiedLinkError \
-       java.lang.VMClass \
-       java.lang.VMClassLoader \
-       java.lang.VMDouble \
-       java.lang.VMFloat \
-       java.lang.VMRuntime \
-       java.lang.VMSecurityManager \
-       java.lang.VMString \
-       java.lang.VMSystem \
-       java.lang.VMThrowable \
-       java.lang.reflect.Array \
-       java.lang.reflect.Constructor \
-       java.lang.reflect.Method \
-       java.lang.reflect.Modifier \
-       java.lang.reflect.Proxy \
-       java.net.DatagramSocketImpl \
-       java.net.NetworkInterface \
-       java.nio.ByteOrder \
-       java.nio.CharBufferImpl \
-       java.nio.DirectByteBufferImpl \
-       java.nio.DoubleBufferImpl \
-       java.nio.FloatBufferImpl \
-       java.nio.IntBufferImpl \
-       java.nio.LongBufferImpl \
-       java.nio.ShortBufferImpl \
-       java.security.AccessController \
-       java.security.ProtectionDomain \
-       java.security.cert.Certificate \
-       java.security.cert.X509Certificate \
-       java.sql.Connection \
-       java.text.Collator \
-       java.util.Hashtable \
-       java.util.Locale \
-       java.util.TimeZone \
-       java.util.VMTimeZone \
-       java.util.zip.Deflater \
-       java.util.zip.Inflater \
-       javax.swing.Popup \
-       javax.swing.UIManager \
-       @AWTPEERS@
-
-NOGEN_CLASSES = \
-       java.lang.ClassLoader \
-       java.lang.Cloneable \
-       java.lang.Object \
-       java.lang.String \
-       java.lang.ThreadGroup \
-       java.lang.Throwable \
-       java.lang.VMObject \
-       java.lang.VMThread
-
-checkjvm:
-       $(MAKE) -C jvmtst $@
+       html/index.html
 
 
 ## Local variables:
index 86ba59ebd25124e240be5cd225586ca4f52e9e7e..82ac9ae0f571c3e635a8f727985dc8922a62cf4c 100755 (executable)
@@ -1,9 +1,13 @@
 #!/bin/sh
 
+libtoolize --automake
 aclocal
 autoheader
 automake --add-missing
 autoconf
 
-cd mm/boehm-gc && ./autogen.sh && cd ../..
-cd classpath && ./autogen.sh && cd ../..
+#echo "boehm-gc"
+cd src/boehm-gc && ./autogen.sh && cd ../..
+
+#echo "classpath"
+cd src/classpath && ./autogen.sh && cd ../..
index 415d88bd23d12dc6173d0cd664744599fd72ba95..cb1ae68bc8c04175cca230f3f892f08f3bf0d069 100644 (file)
@@ -2,7 +2,7 @@ dnl autoconf; autoheader; automake
 
 dnl Process this file with autoconf to produce a configure script.
 AC_INIT(cacao, 0.40, cacao@complang.tuwien.ac.at)
-AC_CONFIG_SRCDIR(main.c)
+AC_CONFIG_SRCDIR(src/cacao/cacao.c)
 AC_CANONICAL_HOST
 AC_PREREQ(2.59)
 AM_INIT_AUTOMAKE
@@ -179,34 +179,34 @@ no | none | single)
        AC_MSG_RESULT(no)
        dnl no threads for boehm
        ac_configure_args="$ac_configure_args --disable-boehm-threads"
+       AM_CONDITIONAL([USE_THREADS], [false])
        ;;
+
 green | native | posix | pthreads)
        AC_DEFINE([USE_THREADS], 1, [use threads])
        AC_DEFINE([EXTERNAL_OVERFLOW], 1, [external overflow])
        AC_DEFINE([DONT_FREE_FIRST], 1, [don't free first])
 
-       LIBTHREAD="libthreads.a"
-       THREAD_OBJ="threads/libthreads.a"
-       AC_SUBST(LIBTHREAD)
-       AC_SUBST(THREAD_OBJ)
+       AM_CONDITIONAL([USE_THREADS], [true])
 
        if test x"$enable_threads" != "xgreen"; then
-               AC_DEFINE([NATIVE_THREADS], 1, [use pthreads])
-               THREAD_LIB="-lpthread"
-               AC_SUBST(THREAD_LIB)
                AC_MSG_RESULT(yes, native)
                 AC_CHECK_LIB(pthread, main)
+               AC_DEFINE([NATIVE_THREADS], 1, [use pthreads])
 
                CFLAGS="$CFLAGS -D_REENTRANT"
 
                dnl tell boehm to support threads as well and classpath to
                 dnl synchronize VM threads portably
                ac_configure_args="$ac_configure_args --enable-boehm-threads=posix --enable-portable-native-sync"
+               AM_CONDITIONAL([NATIVE_THREADS], [true])
+
        else
                AC_MSG_RESULT(yes, green)
 
                dnl no threads for boehm
                ac_configure_args="$ac_configure_args --disable-boehm-threads"
+               AM_CONDITIONAL([NATIVE_THREADS], [false])
        fi
     ;;
 *)
@@ -324,48 +324,55 @@ fi
 
 
 if test "x1" == "x$STATIC_CLASSPATH"; then
-       STATIC_CLASSPATH_LIBS=" \
-        classpath/native/jni/java-io/.libs/libjavaio.a \
-        classpath/native/jni/java-nio/.libs/libjavanio.a \
-        classpath/native/jni/java-net/.libs/libjavanet.a \
-        classpath/native/jni/java-util/.libs/libjavautil.a \
-        classpath/native/jni/java-lang/.libs/libjavalang.a \
-        classpath/native/jni/java-lang/.libs/libjavalangreflect.a"
-        DYNAMIC_CLASSPATH_LIBS=""
-       AC_SUBST(STATIC_CLASSPATH_LIBS)
-       AC_SUBST(DYNAMIC_CLASSPATH_LIBS)
         AC_DEFINE([STATIC_CLASSPATH], 1, [use classpath statically linked])
+       AM_CONDITIONAL([STATIC_CLASSPATH], [true])
 
 else
-       DYNAMIC_CLASSPATH_LIBS="-ldl -Wl,--export-dynamic"
-       STATIC_CLASSPATH_LIBS=""
-       AC_SUBST(STATIC_CLASSPATH_LIBS)
-       AC_SUBST(DYNAMIC_CLASSPATH_LIBS)
+       AM_CONDITIONAL([STATIC_CLASSPATH], [false])
 fi
 
 
-
-
 dnl now configure boehm gc and gnu classpath
 dnl the export is not my favorite (is there another way?)
 export CFLAGS
 export CACAO_GTK
-AC_CONFIG_SUBDIRS(mm/boehm-gc classpath)
+AC_CONFIG_SUBDIRS(src/boehm-gc src/classpath)
 
 
 AC_OUTPUT(Makefile \
-          mm/Makefile \
-         toolbox/Makefile \
-         threads/Makefile \
-         jit/Makefile \
-          jit/loop/Makefile \
-          jit/alpha/Makefile \
-          jit/i386/Makefile \
-          jit/mips/Makefile \
-          jit/powerpc/Makefile \
-          jit/x86_64/Makefile \
-          nat/Makefile \
           doc/Makefile \
-         tst/Makefile \
-         tst/kaffe/Makefile \
-         jvmtst/Makefile )
+          src/Makefile \
+         src/cacao/Makefile \
+          src/cacaoh/Makefile \
+          src/mm/Makefile \
+          src/native/Makefile \
+          src/native/include/Makefile \
+          src/native/tools/Makefile \
+          src/native/vm/Makefile \
+         src/threads/Makefile \
+         src/threads/green/Makefile \
+         src/threads/native/Makefile \
+          src/toolbox/Makefile \
+          src/vm/Makefile \
+         src/vm/jit/Makefile \
+          src/vm/jit/alpha/Makefile \
+          src/vm/jit/i386/Makefile \
+          src/vm/jit/inline/Makefile \
+          src/vm/jit/loop/Makefile \
+          src/vm/jit/mips/Makefile \
+          src/vm/jit/powerpc/Makefile \
+          src/vm/jit/tools/Makefile \
+          src/vm/jit/verify/Makefile \
+          src/vm/jit/x86_64/Makefile \
+         tests/Makefile \
+          tests/jvm98/Makefile \
+         tests/kaffe/Makefile )
+
+
+## Local variables:
+## mode: m4
+## indent-tabs-mode: t
+## c-basic-offset: 4
+## tab-width: 8
+## compile-command: "automake --add-missing"
+## End:
index e32c0d45cdffb8dc5464da31b1b326fac4230f7e..0529d6ebeeed5c14670450bb16809bc7fffcb3bc 100644 (file)
@@ -46,4 +46,3 @@ AC_DEFUN([GC_SET_VERSION], [
 ${GC_ALPHA_VERSION:+alpha=}$GC_ALPHA_VERSION)
 ])
 
-sinclude(libtool.m4)
index 842e07a432b3077c55d74d013d05be527c6b5078..b97a7c9025bbd0cf6dbe3e8e4767df32412bc1fe 100755 (executable)
@@ -1,5 +1,6 @@
 #!/bin/sh
 
+libtoolize --automake
 aclocal
 autoheader
 automake --add-missing
index b671a474ef5d29215ed751b986615e6d86a29866..f1b4216abc114a243deb301dd1b1e9fb9f6ed1d4 100644 (file)
@@ -22,7 +22,7 @@ AC_INIT(gc,6.3,Hans.Boehm@hp.com)
 AC_CONFIG_SRCDIR(gcj_mlc.c)
 AC_CANONICAL_TARGET 
 AC_PREREQ(2.53)
-AC_REVISION($Revision: 1589 $)
+AC_REVISION($Revision: 1621 $)
 GC_SET_VERSION
 AM_INIT_AUTOMAKE
 
@@ -40,6 +40,7 @@ AM_PROG_AS
 AC_CHECK_TOOL(AR, ar)
 AC_CHECK_TOOL(RANLIB, ranlib, :)  # :)
 
+AC_PROG_LIBTOOL
 AC_PROG_INSTALL
 
 AM_MAINTAINER_MODE
index 0b906a45c1f102c77eae8c84c3cadaf9a22ee536..0eb0e4c69c41c16dc88c4c98a608a3bd96bdd06e 100644 (file)
@@ -1,4 +1,4 @@
-/* main.c - contains main() and variables for the global options
+/* cacao/cacao.c - contains main() of cacao
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    Institut f. Computersprachen, TU Wien
      - Calling the class loader
      - Running the main method
 
-   $Id: cacao.c 1590 2004-11-25 13:24:49Z christian $
+   $Id: cacao.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 
 #include <stdlib.h>
 #include <string.h>
-#include "exceptions.h"
-#include "main.h"
-#include "options.h"
-#include "global.h"
-#include "tables.h"
-#include "loader.h"
-#include "jit/jit.h"
-#include "asmpart.h"
-#include "builtin.h"
-#include "native.h"
-#include "statistics.h"
+
+#include "cacao/cacao.h"
 #include "mm/boehm.h"
-#include "threads/thread.h"
+#include "mm/memory.h"
+#include "native/native.h"
 #include "toolbox/logging.h"
-#include "toolbox/memory.h"
-#include "jit/parseRTstats.h"
-#include "nat/java_io_File.h"            /* required by java_lang_Runtime.h   */
-#include "nat/java_util_Properties.h"    /* required by java_lang_Runtime.h   */
-#include "nat/java_lang_Runtime.h"
-#include "nat/java_lang_Throwable.h"
+#include "vm/exceptions.h"
+#include "vm/global.h"
+#include "vm/loader.h"
+#include "vm/options.h"
+#include "vm/statistics.h"
+#include "vm/tables.h"
+#include "vm/jit/asmpart.h"
+#include "vm/jit/jit.h"
 
 #ifdef TYPEINFO_DEBUG_TEST
 #include "typeinfo.h"
index 47abd97d755b497d96fbd197f8416af2490dad57..6dfe6db32dd82b874b1776175018d8c1db09a109 100644 (file)
@@ -1,4 +1,4 @@
-/* main.h - main header, contains global variables
+/* cacao/cacao.h - main header, contains global variables
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    Institut f. Computersprachen, TU Wien
 
    Authors: Christian Thalinger
 
-   $Id: cacao.h 1359 2004-07-28 10:48:36Z twisti $
+   $Id: cacao.h 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 
-#ifndef _MAIN_H
-#define _MAIN_H
+#ifndef _CACAO_H
+#define _CACAO_H
 
-#include "global.h"
+#include "vm/global.h"
 
 
-/* global variables */
+/* global variables ***********************************************************/
 
 extern char *classpath;
 extern char *mainstring;    /* class.method with main method */
 
 
-/* function prototypes */
+/* function prototypes ********************************************************/
 
 void cacao_exit(s4 status);
 void cacao_shutdown(s4 status);
 
-#endif /* _MAIN_H */
+#endif /* _CACAO_H */
 
 
 /*
index 6acb457b9a8cc876a6f42c1b08fdbc213252661e..eeef09d52dc120893cfcc30977a39da1670e7919 100644 (file)
@@ -1,4 +1,4 @@
-/* cacaoh.c - main for header generation (cacaoh)
+/* cacaoh/cacaoh.c - main for header generation (cacaoh)
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
@@ -30,7 +30,7 @@
             Philipp Tomsich
             Christian Thalinger
 
-   $Id: cacaoh.c 1543 2004-11-18 12:20:19Z twisti $
+   $Id: cacaoh.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 
 #include "config.h"
 #include "types.h"
-#include "global.h"
-#include "headers.h"
-#include "loader.h"
-#include "options.h"
-#include "tables.h"
+#include "cacaoh/headers.h"
 #include "mm/boehm.h"
-#include "threads/thread.h"
+#include "mm/memory.h"
+
+#if defined(USE_THREADS)
+# if defined(NATIVE_THREADS)
+#  include "threads/native/threads.h"
+# else
+#  include "threads/green/threads.h"
+# endif
+#endif
+
 #include "toolbox/logging.h"
-#include "toolbox/memory.h"
+#include "vm/global.h"
+#include "vm/loader.h"
+#include "vm/options.h"
+#include "vm/tables.h"
 
 
 /* define cacaoh options ******************************************************/
index 5dc9c9b4048b4932475be6c11c00a1486c20ddd5..9bc8ffec5972dbbe0aeaa3258a1ab053d50b34d9 100644 (file)
@@ -1,4 +1,4 @@
-/* headers.c - functions for header generation
+/* vm/headers.c - functions for header generation
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
@@ -30,7 +30,7 @@
             Philipp Tomsich
             Christian Thalinger
 
-   $Id: headers.c 1570 2004-11-23 16:04:33Z twisti $
+   $Id: headers.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 #include <ucontext.h>
 
 #include "config.h"
-#include "global.h"
-#include "tables.h"
-#include "loader.h"
-#include "options.h"
-#include "builtin.h"
 #include "mm/boehm.h"
+#include "mm/memory.h"
+#include "native/include/java_lang_String.h"
+#include "native/include/java_lang_Throwable.h"
 #include "toolbox/chain.h"
-#include "toolbox/memory.h"
 #include "toolbox/logging.h"
-#include "nat/java_lang_String.h"
-#include "nat/java_lang_Throwable.h"
+#include "vm/global.h"
+#include "vm/tables.h"
+#include "vm/loader.h"
+#include "vm/options.h"
+#include "vm/builtin.h"
 
 
 /******* replace some external functions  *********/
index d3426dc345f2797b4524a81cdda52c0453e2c3ad..4ee6383cf6a887df321494f638704a12face45e1 100644 (file)
@@ -1,4 +1,4 @@
-/* headers.h - export functions for header generation
+/* cacaoh/headers.h - export functions for header generation
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
@@ -26,7 +26,7 @@
 
    Authors: Christian Thalinger
 
-   $Id: headers.h 1529 2004-11-17 17:19:14Z twisti $
+   $Id: headers.h 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
@@ -35,6 +35,7 @@
 
 
 #include "toolbox/chain.h"
+#include "vm/global.h"
 
 
 /* export variables */
index b0fea78b9467be8da6b475c091ce9f45896c91f3..74eb15049b7cbf8ac0371a85874cf2dd3ff2fc20 100644 (file)
@@ -1,16 +1,14 @@
 ## Process this file with automake to produce Makefile.in
 
-# $Id: Makefile.am 1225 2004-06-30 19:26:19Z twisti $
+# $Id: Makefile.am 1621 2004-11-30 13:06:55Z twisti $
 
-SUBDIRS = boehm-gc
+INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/@ARCH_DIR@
 
-noinst_LIBRARIES = libboehm.a
+noinst_LIBRARIES = libmm.a
 
-noinst_HEADERS = boehm.h
+noinst_HEADERS = boehm.h memory.h
 
-libboehm_a_SOURCES = boehm.c
-
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/jit/@ARCH_DIR@
+libmm_a_SOURCES = boehm.c memory.c
 
 
 ## Local variables:
index 56fc1ec1ac20e7ef82259627ff8c3cc1be9688b7..030ec23ad92cbb84ad5d838e23e4ac087ad0b147 100644 (file)
@@ -26,7 +26,7 @@
 
    Authors: Stefan Ring
 
-   $Id: boehm.c 1378 2004-08-01 22:34:16Z stefan $
+   $Id: boehm.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 #define GC_IRIX_THREADS
 #endif
 
-#include "options.h"
-#include "asmpart.h"
-#include "boehm.h"
-#include "builtin.h"
-#include "exceptions.h"
-#include "global.h"
-#include "loader.h"
-#include "native.h"
-#include "tables.h"
-#include "threads/thread.h"
-#include "toolbox/logging.h"
 #include "boehm-gc/include/gc.h"
+#include "mm/boehm.h"
+
+#if defined(USE_THREADS)
+# if defined(NATIVE_THREADS)
+#  include "threads/native/threads.h"
+# else
+#  include "threads/green/threads.h"
+# endif
+#endif
+
+#include "toolbox/logging.h"
+#include "vm/options.h"
+#include "vm/builtin.h"
+#include "vm/exceptions.h"
+#include "vm/global.h"
+#include "vm/loader.h"
+#include "vm/tables.h"
+#include "vm/jit/asmpart.h"
 
 
 static bool in_gc_out_of_memory = false;    /* is GC out of memory?           */
index c8fa1631c5885386e64243afc1ec040a98053499..fe704ef1384dfb68f80c1664e66969f6f0373e1c 100644 (file)
@@ -26,7 +26,7 @@
 
    Authors: Christian Thalinger
 
-   $Id: boehm.h 1143 2004-06-05 23:53:24Z twisti $
+   $Id: boehm.h 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 #ifndef _BOEHM_H
 #define _BOEHM_H
 
-#include "global.h"
+#include "types.h"
+#include "vm/global.h"
+
 
 struct otherstackcall;
 
 typedef void *(*calltwoargs)(void *, u4);
 
 struct otherstackcall {
-       calltwoargs p2;
-       void *p;
-       u4 l;
+       calltwoargs  p2;
+       void        *p;
+       u4           l;
 };
 
 
index 236cda9719343529c3104fb2e6b9b14ea0db5308..85ea79ea85b5c600f6b2f3470ca50e6020090125 100644 (file)
@@ -26,7 +26,7 @@
 
    Authors: Reinhard Grafl
 
-   $Id: memory.c 1599 2004-11-28 17:11:50Z twisti $
+   $Id: memory.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 #include <unistd.h>
 
 #include "config.h"
-#include "exceptions.h"
-#include "global.h"
-#include "native.h"
-#include "options.h"
-#include "statistics.h"
-#include "threads/nativethread.h"
+#include "mm/memory.h"
+#include "vm/exceptions.h"
+#include "vm/global.h"
+#include "vm/options.h"
+#include "vm/statistics.h"
+#include "native/native.h"
+
+#if defined(USE_THREADS) && defined(NATIVE_THREADS)
+# include "threads/native/threads.h"
+#endif
+
 #include "toolbox/logging.h"
-#include "toolbox/memory.h"
 
 
 /********* general types, variables and auxiliary functions *********/
index 7fa2d28e0131cbbedf588848cd5f392cdae877f9..c2787d454299d27af5830d48d42de7b2ef5c4f56 100644 (file)
@@ -1,4 +1,4 @@
-/* jni.c - implementation of the Java Native Interface functions
+/* native/jni.c - implementation of the Java Native Interface functions
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
 
    Changes: Joseph Wenninger, Martin Platter
 
-   $Id: jni.c 1494 2004-11-12 13:34:26Z twisti $
+   $Id: jni.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 
 #include <string.h>
-#include "exceptions.h"
-#include "main.h"
-#include "jni.h"
-#include "global.h"
-#include "loader.h"
-#include "tables.h"
-#include "native.h"
-#include "builtin.h"
-#include "options.h"
-#include "statistics.h"
-#include "threads/thread.h"
-#include "toolbox/logging.h"
-#include "toolbox/memory.h"
-#include "nat/java_lang_Byte.h"
-#include "nat/java_lang_Character.h"
-#include "nat/java_lang_Short.h"
-#include "nat/java_lang_Integer.h"
-#include "nat/java_lang_Boolean.h"
-#include "nat/java_lang_Long.h"
-#include "nat/java_lang_Float.h"
-#include "nat/java_lang_Double.h"
-#include "nat/java_lang_Throwable.h"
-#include "jit/jit.h"
-#include "asmpart.h"
+
 #include "mm/boehm.h"
+#include "mm/memory.h"
+#include "native/jni.h"
+#include "native/native.h"
+#include "native/include/java_lang_Byte.h"
+#include "native/include/java_lang_Character.h"
+#include "native/include/java_lang_Short.h"
+#include "native/include/java_lang_Integer.h"
+#include "native/include/java_lang_Boolean.h"
+#include "native/include/java_lang_Long.h"
+#include "native/include/java_lang_Float.h"
+#include "native/include/java_lang_Double.h"
+#include "native/include/java_lang_Throwable.h"
+
+#if defined(USE_THREADS)
+# if defined(NATIVE_THREADS)
+#  include "threads/native/threads.h"
+# else
+#  include "threads/green/threads.h"
+# endif
+#endif
+
+#include "toolbox/logging.h"
+#include "vm/builtin.h"
+#include "vm/exceptions.h"
+#include "vm/global.h"
+#include "vm/loader.h"
+#include "vm/options.h"
+#include "vm/statistics.h"
+#include "vm/tables.h"
+#include "vm/jit/asmpart.h"
+#include "vm/jit/jit.h"
+
+
 #define JNI_VERSION       0x00010002
 
 
index cd804c2aa16548a8fd22f5733691788551ea0a11..29a6f207e6a8b7748f50595501b73fd9667a5b55 100644 (file)
@@ -1,4 +1,4 @@
-/* jni.h - JNI types and data structures
+/* native/jni.h - JNI types and data structures
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
@@ -26,7 +26,7 @@
 
    Authors: ?
 
-   $Id: jni.h 1424 2004-10-30 11:15:23Z motse $
+   $Id: jni.h 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
@@ -35,8 +35,9 @@
 #define _JNI_H
 
 #include <stdarg.h>
-#include "global.h"
+
 #include "types.h"
+#include "vm/global.h"
 
 
 #define JNI_VERSION       0x00010002
index 8e69ac7e026787102f0504223ced73073ee01193..834939c66f141e28d9cdc08de11ec1a3a6b87975 100644 (file)
@@ -1,4 +1,4 @@
-/* natcalls.h -
+/* native/natcalls.h -
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    Institut f. Computersprachen, TU Wien
@@ -27,7 +27,7 @@
 
    Authors: Carolyn Oates
 
-   $Id: natcalls.h 664 2003-11-21 18:24:01Z jowenn $
+   $Id: natcalls.h 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
@@ -35,7 +35,7 @@
 #ifndef _NATCALLS_H
 #define _NATCALLS_H
 
-#include "global.h"
+#include "vm/global.h"
 
 
 /*---------- Define Constants ---------------------------*/
index 1a0ecb8fe1cda484ab626f2589cdefb95bf4e323..7d6bfbd4abc2a0e8dd57795b892fdec964221118 100644 (file)
@@ -1,4 +1,4 @@
-/* native.c - table of native functions
+/* native/native.c - table of native functions
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
@@ -31,7 +31,7 @@
    The .hh files created with the header file generator are all
    included here as are the C functions implementing these methods.
 
-   $Id: native.c 1567 2004-11-23 16:01:51Z twisti $
+   $Id: native.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 #include <sys/time.h>
 #include <utime.h>
 
-#include "config.h"
-#include "exceptions.h"
-#include "global.h"
-#include "options.h"
-#include "jni.h"
-#include "native.h"
-#include "builtin.h"
-#include "asmpart.h"
-#include "tables.h"
-#include "loader.h"
-#include "jni.h"
-#include "jit/jit.h"
-#include "toolbox/logging.h"
-#include "toolbox/memory.h"
-#include "threads/thread.h"
-#include "threads/threadio.h"
-#include "threads/locks.h"
-#include "nat/java_lang_Throwable.h"
-
-
 /* Include files for IO functions */
 
 #include <fcntl.h>
 #endif
 #include <sys/stat.h>
 
+#include "config.h"
+#include "mm/memory.h"
+#include "native/jni.h"
+#include "native/native.h"
+#include "native/include/java_lang_Throwable.h"
+#include "toolbox/logging.h"
+#include "vm/builtin.h"
+#include "vm/exceptions.h"
+#include "vm/global.h"
+#include "vm/loader.h"
+#include "vm/options.h"
+#include "vm/tables.h"
+#include "vm/jit/asmpart.h"
+#include "vm/jit/jit.h"
+#if 0
+#include "threads/thread.h"
 #include "threads/threadio.h"
+#include "threads/locks.h"
+#endif
+
 
-/* include table of native functions */
+/* include table of native functions ******************************************/
 
 #include "nativetable.inc"
 
index c8df4259d970f4cdf98803d6cb4024f4aa6227c9..d2e766987204b2426ee9ac895e6a28641fd25643 100644 (file)
@@ -1,4 +1,4 @@
-/* native.h - table of native functions
+/* native/native.h - table of native functions
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
@@ -26,7 +26,7 @@
 
    Authors: Reinhard Grafl
 
-   $Id: native.h 1465 2004-11-08 11:09:01Z twisti $
+   $Id: native.h 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 #define _NATIVE_H
 
 
-#include "jni.h"
-#include "nat/java_lang_String.h"
-#include "nat/java_lang_ClassLoader.h"
-#include "nat/java_lang_Throwable.h"
+#include "native/jni.h"
+#include "native/include/java_lang_String.h"
+#include "native/include/java_lang_ClassLoader.h"
+#include "native/include/java_lang_Throwable.h"
 
 
 /* table for locating native methods */
index 66a5f511cb374cb417e70b343238c50e34818b39..50d448e9686769d4f9fcd21e784478472e2fbe17 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes:
 
-   $Id: gennativetable.c 1429 2004-11-02 08:58:26Z jowenn $
+   $Id: gennativetable.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+
 #include "config.h"
 #include "types.h"
-#include "global.h"
-#include "headers.h"
-#include "loader.h"
-#include "tables.h"
+#include "cacaoh/headers.h"
 #include "mm/boehm.h"
-#include "threads/locks.h"
-#include "threads/thread.h"
+#include "mm/memory.h"
+
+#if defined(USE_THREADS)
+# if defined(NATIVE_THREADS)
+#  include "threads/native/threads.h"
+# else
+#  include "threads/green/threads.h"
+# endif
+#endif
+
 #include "toolbox/chain.h"
-#include "toolbox/memory.h"
+#include "vm/exceptions.h"
+#include "vm/global.h"
+#include "vm/loader.h"
+#include "vm/tables.h"
 
 
 int main(int argc, char **argv)
@@ -154,27 +163,23 @@ int main(int argc, char **argv)
 
        /* create table of native-methods */
 
-/*     file = fopen("nativetable.h", "w"); */
        file = stdout;
 
-       if (!file)
-               panic("Can not open file 'nativetable' to store native-link-table");
-
        fprintf(file, "/* Table of native methods: nativetables.inc */\n");
-       fprintf(file, "/* This file is machine generated, don't edit it !*/\n\n"); 
+       fprintf(file, "/* This file is machine generated, don't edit it*/\n\n"); 
 
-        fprintf(file, "#include \"config.h\"\n");
+       fprintf(file, "#include \"config.h\"\n");
 
        c = chain_first(nativeclass_chain);
        while (c) {
                gen_header_filename(classname, c->name);
-               fprintf(file, "#include \"nat/%s.h\"\n", classname);
+               fprintf(file, "#include \"native/include/%s.h\"\n", classname);
                c = chain_next(nativeclass_chain);
        }
        chain_free(nativeclass_chain);
 
-       fprintf(file, "\n\n#include \"native.h\"\n\n");
-        fprintf(file, "#ifdef STATIC_CLASSPATH\n\n");
+       fprintf(file, "\n\n#include \"native/native.h\"\n\n");
+       fprintf(file, "#if defined(STATIC_CLASSPATH)\n\n");
        fprintf(file, "static nativeref nativetable[] = {\n");
 
        m = chain_first(nativemethod_chain);
@@ -185,26 +190,35 @@ int main(int argc, char **argv)
        chain_free(nativemethod_chain);
 
        fprintf(file, "};\n");
-        fprintf(file,"\n#else\n");
-        fprintf(file, "/*ensure that symbols for functions implemented within cacao are used and exported to dlopen*/\n");
-        fprintf(file, "static functionptr dummynativetable[]={\n");
+       fprintf(file,"\n#else\n");
+       fprintf(file, "/*ensure that symbols for functions implemented within cacao are used and exported to dlopen*/\n");
+       fprintf(file, "static functionptr dummynativetable[]={\n");
+
        {
-               FILE *implData=fopen("nat/implementednatives.data","r");
-                if (!implData) {fclose(file); exit(3);}
+               FILE *implData;
+
+               implData = fopen("vm/implementednatives.data", "r");
+
+               if (!implData) {
+                       fclose(file);
+                       throw_cacao_exception_exit(string_java_lang_InternalError,
+                                                                          "Could not find file");
+               }
+
                while (!feof(implData)) {
                        char functionLine[1024];
-                        functionLine[0]='\0';
+                       functionLine[0]='\0';
                        fgets(functionLine,1024,implData);
-                        if (strlen(functionLine)<2) continue;
+                       if (strlen(functionLine)<2) continue;
                        if (functionLine[strlen(functionLine)-1]!='\n') { fclose(implData); fclose(file); exit(4);}
-                        functionLine[strlen(functionLine)-1]=',';
+                       functionLine[strlen(functionLine)-1]=',';
                        fprintf(file,"\t(functionptr) %s\n",functionLine);
                }
                fprintf(file,"\t(functionptr)0");
-                fclose(implData);
+               fclose(implData);
        }
-        fprintf(file, "};\n");
-        fprintf(file,"\n#endif\n");
+       fprintf(file, "};\n");
+       fprintf(file,"\n#endif\n");
        fclose(file);
        
        /* release all resources */
index 1290fe98d3d2ee9e4b7bc2a7d2abf2642ec62715..0fc86e2aeb69bf2737602b4afed5c0f6dd3a21ad 100644 (file)
@@ -1,4 +1,4 @@
-/* nat/Constructor.c - java/lang/reflect/Constructor
+/* native/vm/Constructor.c - java/lang/reflect/Constructor
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
 
    Changes: Joseph Wenninger
 
-   $Id: Constructor.c 1537 2004-11-18 12:12:05Z twisti $
+   $Id: Constructor.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 
 #include <string.h>
-#include "jni.h"
-#include "builtin.h"
-#include "exceptions.h"
-#include "loader.h"
-#include "native.h"
-#include "tables.h"
-#include "asmpart.h"
-#include "options.h"
+
+#include "native/jni.h"
+#include "native/native.h"
+#include "native/include/java_lang_Class.h"
+#include "native/include/java_lang_Object.h"
+#include "native/include/java_lang_reflect_Constructor.h"
 #include "toolbox/logging.h"
-#include "nat/java_lang_Object.h"
-#include "nat/java_lang_Class.h"
-#include "nat/java_lang_reflect_Constructor.h"
+#include "vm/builtin.h"
+#include "vm/exceptions.h"
+#include "vm/loader.h"
+#include "vm/options.h"
+#include "vm/tables.h"
+#include "vm/jit/asmpart.h"
 
 
 /*
index 0764f953761ee50d234e5b18c2dc116975d0f674..cc2ba02f78c6e172b9842db8b893b4cb3a3db014 100644 (file)
@@ -1,4 +1,4 @@
-/* nat/Field.c - java/lang/reflect/Field
+/* native/vm/Field.c - java/lang/reflect/Field
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
 
    Changes: Joseph Wenninger
 
-   $Id: Field.c 1537 2004-11-18 12:12:05Z twisti $
+   $Id: Field.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 
-#include "jni.h"
-#include "builtin.h"
-#include "exceptions.h"
-#include "loader.h"
-#include "native.h"
-#include "tables.h"
-#include "nat/java_lang_Object.h"
-#include "nat/java_lang_Class.h"
-#include "nat/java_lang_reflect_Field.h"
+#include "native/jni.h"
+#include "native/native.h"
+#include "native/include/java_lang_Object.h"
+#include "native/include/java_lang_Class.h"
+#include "native/include/java_lang_reflect_Field.h"
+#include "vm/builtin.h"
+#include "vm/exceptions.h"
+#include "vm/loader.h"
+#include "vm/tables.h"
 
 
 /*
index 0d273f645753d3c90703382c593a96a638b83b9a..67f23e23817314f14cda530454db9ffd9a7d63b3 100644 (file)
 ## Process this file with automake to produce Makefile.in
 
-# $Id: Makefile.am 1538 2004-11-18 12:13:36Z twisti $
+# $Id: Makefile.am 1621 2004-11-30 13:06:55Z twisti $
 
+INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/@ARCH_DIR@
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/jit/@ARCH_DIR@
+noinst_LIBRARIES = libnativevm.a
 
-EXTRA_DIST =
-
-noinst_LIBRARIES = libnat.a
-
-CLEANFILES = \
-       implementednatives.data \
-       gnu_classpath_Configuration.h \
-       gnu_classpath_RawData.h \
-       gnu_java_awt_image_GdkPixbufDecoder.h \
-       gnu_java_awt_peer_gtk_GdkFontMetrics.h \
-       gnu_java_awt_peer_gtk_GdkGraphics.h \
-       gnu_java_awt_peer_gtk_GdkPixbufDecoder.h \
-       gnu_java_awt_peer_gtk_GtkButtonPeer.h \
-       gnu_java_awt_peer_gtk_GtkCanvasPeer.h \
-       gnu_java_awt_peer_gtk_GtkCheckboxGroupPeer.h \
-       gnu_java_awt_peer_gtk_GtkCheckboxMenuItemPeer.h \
-       gnu_java_awt_peer_gtk_GtkCheckboxPeer.h \
-       gnu_java_awt_peer_gtk_GtkChoicePeer.h \
-       gnu_java_awt_peer_gtk_GtkClipboard.h \
-       gnu_java_awt_peer_gtk_GtkComponentPeer.h \
-       gnu_java_awt_peer_gtk_GtkFileDialogPeer.h \
-       gnu_java_awt_peer_gtk_GtkFramePeer.h \
-       gnu_java_awt_peer_gtk_GtkGenericPeer.h \
-       gnu_java_awt_peer_gtk_GtkImagePainter.h \
-       gnu_java_awt_peer_gtk_GtkLabelPeer.h \
-       gnu_java_awt_peer_gtk_GtkListPeer.h \
-       gnu_java_awt_peer_gtk_GtkMainThread.h \
-       gnu_java_awt_peer_gtk_GtkMenuBarPeer.h \
-       gnu_java_awt_peer_gtk_GtkMenuItemPeer.h \
-       gnu_java_awt_peer_gtk_GtkMenuPeer.h \
-       gnu_java_awt_peer_gtk_GtkPanelPeer.h \
-       gnu_java_awt_peer_gtk_GtkPopupMenuPeer.h \
-       gnu_java_awt_peer_gtk_GtkScrollPanePeer.h \
-       gnu_java_awt_peer_gtk_GtkScrollbarPeer.h \
-       gnu_java_awt_peer_gtk_GtkTextAreaPeer.h \
-       gnu_java_awt_peer_gtk_GtkTextComponentPeer.h \
-       gnu_java_awt_peer_gtk_GtkTextFieldPeer.h \
-       gnu_java_awt_peer_gtk_GtkToolkit.h \
-       gnu_java_awt_peer_gtk_GtkWindowPeer.h \
-       gnu_java_lang_reflect_TypeSignature.h \
-       gnu_java_math_MPN.h \
-       gnu_java_net_PlainDatagramSocketImpl.h \
-       gnu_java_net_PlainSocketImpl.h \
-       gnu_java_nio_FileLockImpl.h \
-       gnu_java_nio_SelectorImpl.h \
-       gnu_java_nio_channels_FileChannelImpl.h \
-       gnu_java_security_x509_X509Certificate.h \
-       java_awt_peer_ComponentPeer.h \
-       java_awt_peer_MenuItemPeer.h \
-       java_awt_peer_MenuPeer.h \
-       java_beans_PropertyEditor.h \
-       java_io_DataInput.h \
-       java_io_DataInputStream.h \
-       java_io_File.h \
-       java_io_FileDescriptor.h \
-       java_io_FileInputStream.h \
-       java_io_FileWriter.h \
-       java_io_ObjectInputStream.h \
-       java_io_OutputStream.h \
-       java_io_OutputStreamWriter.h \
-       java_io_PrintStream.h \
-       java_io_PrintWriter.h \
-       java_io_RandomAccessFile.h \
-       java_io_VMFile.h \
-       java_io_VMObjectStreamClass.h \
-       java_io_Writer.h \
-       java_lang_Boolean.h \
-       java_lang_Byte.h \
-       java_lang_Character.h \
-       java_lang_Class.h \
-       java_lang_Compiler.h \
-       java_lang_Double.h \
-       java_lang_Float.h \
-       java_lang_Integer.h \
-       java_lang_JOWENNTest1.h \
-       java_lang_Long.h \
-       java_lang_Math.h \
-       java_lang_Process.h \
-       java_lang_Runtime.h \
-       java_lang_RuntimePermission.h \
-       java_lang_SecurityManager.h \
-       java_lang_Short.h \
-       java_lang_StackTraceElement.h \
-       java_lang_StrictMath.h \
-       java_lang_StringBuffer.h \
-       java_lang_System.h \
-       java_lang_UnsatisfiedLinkError.h \
-       java_lang_VMClass.h \
-       java_lang_VMClassLoader.h \
-       java_lang_VMDouble.h \
-       java_lang_VMFloat.h \
-       java_lang_VMRuntime.h \
-       java_lang_VMSecurityManager.h \
-       java_lang_VMString.h \
-       java_lang_VMSystem.h \
-       java_lang_VMThrowable.h \
-       java_lang_reflect_Array.h \
-       java_lang_reflect_Constructor.h \
-       java_lang_reflect_Field.h \
-       java_lang_reflect_Method.h \
-       java_lang_reflect_Modifier.h \
-       java_lang_reflect_Proxy.h \
-       java_net_DatagramPacket.h \
-       java_net_DatagramSocketImpl.h \
-       java_net_InetAddress.h \
-       java_net_NetworkInterface.h \
-       java_net_PlainDatagramSocketImpl.h \
-       java_net_PlainSocketImpl.h \
-       java_net_SocketImpl.h \
-       java_net_URL.h \
-       java_nio_ByteOrder.h \
-       java_nio_CharBufferImpl.h \
-       java_nio_DirectByteBufferImpl.h \
-       java_nio_DoubleBufferImpl.h \
-       java_nio_FloatBufferImpl.h \
-       java_nio_IntBufferImpl.h \
-       java_nio_LongBufferImpl.h \
-       java_nio_ShortBufferImpl.h \
-       java_nio_channels_FileChannelImpl.h \
-       java_security_AccessController.h \
-       java_security_ProtectionDomain.h \
-       java_security_cert_Certificate.h \
-       java_security_cert_X509Certificate.h \
-       java_sql_Connection.h \
-       java_text_Collator.h \
-       java_util_Hashtable.h \
-       java_util_Locale.h \
-       java_util_Properties.h \
-       java_util_TimeZone.h \
-       java_util_VMTimeZone.h \
-       java_util_zip_Deflater.h \
-       java_util_zip_Inflater.h \
-       javax_swing_Popup.h \
-       javax_swing_UIManager.h
-
-libnat_a_SOURCES = \
+libnativevm_a_SOURCES = \
        Constructor.c \
        Field.c \
        Method.c \
        Proxy.c \
-       Runtime.c \
-       Thread.c \
        VMClass.c \
        VMClassLoader.c \
        VMObject.c \
+       VMRuntime.c \
        VMSecurityManager.c \
        VMString.c \
        VMSystem.c \
-       VMThrowable.c \
-       JOWENNTest1.c \
-       classcontextnativeTest.c
+       VMThread.c \
+       VMThrowable.c
 
 #libgtk_a_SOURCES = \
        GdkGraphics.c \
@@ -165,14 +29,16 @@ libnat_a_SOURCES = \
        GtkLabelPeer.c \
        GtkScrollPanePeer.c
 
+all: libnativevm.a implementednatives
+
 implementednatives:
-       echo "">implementednatives.data
-       grep "JNICALL Java_" *.c | perl -p -i -e "s/.*JNICALL\s//" | perl -p -i -e"s/\(.*//"  | (\
+       echo "" > implementednatives.data
+       grep "JNICALL Java_" *.c | perl -p -i -e "s/.*JNICALL\s//" | perl -p -i -e"s/\(.*//"  | ( \
                while read line; do \
-                       grep $$line *.h >/dev/null ; \
+                       grep $$line $(top_srcdir)/src/native/include/*.h > /dev/null; \
                        if test $$? == 0; then \
-                               echo $$line >>implementednatives.data ;\
-                       fi ;\
+                               echo $$line >> implementednatives.data; \
+                       fi ; \
                done )
 
 ## Local variables:
index c3936f2aa227f984e5bbe9491b0bdc6655b6ebdc..8205bd9ae85ba3d2b36c7bb4d0766950c0fcad1d 100644 (file)
@@ -1,4 +1,4 @@
-/* nat/Method.c - java/lang/reflect/Method
+/* native/vm/Method.c - java/lang/reflect/Method
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
 
    Changes: Joseph Wenninger
 
-   $Id: Method.c 1537 2004-11-18 12:12:05Z twisti $
+   $Id: Method.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 
-#include "jni.h"
-#include "loader.h"
-#include "global.h"
-#include "tables.h"
 #include "types.h"
-#include "builtin.h"
-#include "native.h"
+#include "native/jni.h"
+#include "native/native.h"
+#include "native/include/java_lang_Object.h"
+#include "native/include/java_lang_Class.h"
+#include "native/include/java_lang_reflect_Method.h"
 #include "toolbox/logging.h"
-#include "nat/java_lang_Object.h"
-#include "nat/java_lang_Class.h"
-#include "nat/java_lang_reflect_Method.h"
 
 
 /*
index 5057fcca5763138ecf69701672db5d093f03fd7b..efdb857777bca01d2d8e0740afd2980bf2d564d2 100644 (file)
@@ -1,4 +1,4 @@
-/* nat/Proxy.c - java/lang/reflect/Proxy
+/* native/vm/Proxy.c - java/lang/reflect/Proxy
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
 
    Changes: Joseph Wenninger
 
-   $Id: Proxy.c 1537 2004-11-18 12:12:05Z twisti $
+   $Id: Proxy.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 
-#include "jni.h"
+#include "native/jni.h"
+#include "native/include/java_lang_Class.h"
+#include "native/include/java_lang_ClassLoader.h"
 #include "toolbox/logging.h"
-#include "nat/java_lang_Class.h"
-#include "nat/java_lang_ClassLoader.h"
 
 
 /*
index d0c62e963950274f206fd84d8f65b6811c7a5af3..80de48f16e4064ab9ff4c1155ccd95993fda7da8 100644 (file)
@@ -1,4 +1,4 @@
-/* nat/VMClass.c - java/lang/Class
+/* native/vm/VMClass.c - java/lang/Class
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
 
    Changes: Joseph Wenninger
 
-   $Id: VMClass.c 1516 2004-11-17 11:53:56Z twisti $
+   $Id: VMClass.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 
 #include <string.h>
-#include "jni.h"
+
 #include "types.h"
-#include "exceptions.h"
-#include "global.h"
-#include "builtin.h"
-#include "loader.h"
-#include "native.h"
-#include "tables.h"
+#include "mm/memory.h"
+#include "native/jni.h"
+#include "native/native.h"
+#include "native/include/java_lang_Object.h"
+#include "native/include/java_lang_Class.h"
+#include "native/include/java_lang_ClassLoader.h"
+#include "native/include/java_security_ProtectionDomain.h"
+#include "native/include/java_lang_reflect_Constructor.h"
+#include "native/include/java_lang_reflect_Field.h"
+#include "native/include/java_lang_reflect_Method.h"
+#include "native/include/java_lang_Throwable.h"        /* java_lang_VMClass.h */
+#include "native/include/java_lang_VMClass.h"
 #include "toolbox/logging.h"
-#include "toolbox/memory.h"
-#include "java_lang_Object.h"
-#include "java_lang_Class.h"
-#include "java_lang_ClassLoader.h"
-#include "java_security_ProtectionDomain.h"
-#include "java_lang_reflect_Constructor.h"
-#include "java_lang_reflect_Field.h"
-#include "java_lang_reflect_Method.h"
-#include "java_lang_Throwable.h"    /* needed for java_lang_VMClass.h */
-#include "java_lang_VMClass.h"
+#include "vm/exceptions.h"
+#include "vm/global.h"
+#include "vm/loader.h"
+#include "vm/tables.h"
+#include "vm/builtin.h"
 
 
 /* for selecting public members */
index 9a7f710cdc9404c72c006d2636f89f64d490ed2a..8b6a0dabe2f5f67648f9329bb7c15d5c81c1bb11 100644 (file)
@@ -1,4 +1,4 @@
-/* nat/VMClassLoader.c - java/lang/ClassLoader
+/* native/vm/VMClassLoader.c - java/lang/VMClassLoader
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
 
    Changes: Joseph Wenninger
 
-   $Id: VMClassLoader.c 1536 2004-11-18 10:40:43Z twisti $
+   $Id: VMClassLoader.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 
-#include "exceptions.h"
-#include "jni.h"
-#include "loader.h"
-#include "native.h"
-#include "builtin.h"
-#include "tables.h"
+#include "native/jni.h"
+#include "native/native.h"
+#include "native/include/java_lang_Class.h"
+#include "native/include/java_lang_String.h"
+#include "native/include/java_lang_ClassLoader.h"
 #include "toolbox/logging.h"
-#include "nat/java_lang_Class.h"
-#include "nat/java_lang_String.h"
-#include "nat/java_lang_ClassLoader.h"
+#include "vm/exceptions.h"
+#include "vm/builtin.h"
+#include "vm/loader.h"
+#include "vm/tables.h"
 
 
 /*
index 316bbe5c3dc055e50391ec1873c916e0e75a9dc3..c47b9f440d6a20ee8e20dc477698e2272883c914 100644 (file)
@@ -1,4 +1,4 @@
-/* nat/VMObject.c - java/lang/Object
+/* native/vm/VMObject.c - java/lang/Object
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
 
    Changes: Joseph Wenninger
 
-   $Id: VMObject.c 1517 2004-11-17 11:54:13Z twisti $
+   $Id: VMObject.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 
 #include <stdlib.h>
 #include <string.h>
-#include "exceptions.h"
-#include "jni.h"
-#include "builtin.h"
-#include "loader.h"
-#include "native.h"
-#include "options.h"
+
 #include "mm/boehm.h"
-#include "threads/locks.h"
+#include "mm/memory.h"
 #include "toolbox/logging.h"
-#include "toolbox/memory.h"
-#include "nat/java_lang_Cloneable.h"
-#include "nat/java_lang_Object.h"
+#include "native/jni.h"
+#include "native/native.h"
+#include "native/include/java_lang_Cloneable.h"
+#include "native/include/java_lang_Object.h"
+#include "vm/builtin.h"
+#include "vm/exceptions.h"
+#include "vm/loader.h"
+#include "vm/options.h"
+
+#if defined(USE_THREADS)
+# if defined(NATIVE_THREADS)
+#  include "threads/native/threads.h"
+# else
+#  include "threads/green/threads.h"
+#  include "threads/green/locks.h"
+# endif
+#endif
 
 
 /*
@@ -68,7 +77,7 @@ JNIEXPORT java_lang_Object* JNICALL Java_java_lang_VMObject_clone(JNIEnv *env, j
                new = (java_lang_Object *) heap_allocate(size, (desc->arraytype == ARRAYTYPE_OBJECT), NULL);
                memcpy(new, this, size);
 #if defined(USE_THREADS) && defined(NATIVE_THREADS)
-               initObjectLock(new);
+               initObjectLock((java_objectheader *) new);
 #endif
         
                return new;
@@ -90,7 +99,7 @@ JNIEXPORT java_lang_Object* JNICALL Java_java_lang_VMObject_clone(JNIEnv *env, j
 
     memcpy(new, this, c->instancesize);
 #if defined(USE_THREADS) && defined(NATIVE_THREADS)
-       initObjectLock(new);
+       initObjectLock((java_objectheader *) new);
 #endif
 
     return new;
index cd5226c5ce58bc53a2c905919a9bdb802a08d725..5cf652e482b9c9329bca6e1c2696a7647710f209 100644 (file)
@@ -1,4 +1,4 @@
-/* nat/Runtime.c - java/lang/Runtime
+/* native/vm/VMRuntime.c - java/lang/VMRuntime
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
@@ -29,7 +29,7 @@
    Changes: Joseph Wenninger
             Christian Thalinger
 
-   $Id: VMRuntime.c 1514 2004-11-17 11:52:46Z twisti $
+   $Id: VMRuntime.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 #include <unistd.h>
 #include <sys/utsname.h>
 
+#if !defined(STATIC_CLASSPATH)
+#include <dlfcn.h>
+#endif
+
 #include "config.h"
-#include "exceptions.h"
-#include "main.h"
-#include "jni.h"
-#include "builtin.h"
-#include "exceptions.h"
-#include "loader.h"
-#include "native.h"
-#include "tables.h"
-#include "asmpart.h"
+#include "cacao/cacao.h"
 #include "mm/boehm.h"
+#include "mm/memory.h"
+#include "native/jni.h"
+#include "native/native.h"
+#include "native/include/java_io_File.h"
+#include "native/include/java_lang_String.h"
+#include "native/include/java_lang_Process.h"
+#include "native/include/java_util_Properties.h"     /* java_lang_VMRuntime.h */
+#include "native/include/java_lang_VMRuntime.h"
 #include "toolbox/logging.h"
-#include "toolbox/memory.h"
-#include "nat/java_io_File.h"
-#include "nat/java_lang_String.h"
-#include "nat/java_lang_Process.h"
-#include "nat/java_util_Properties.h"    /* needed for java_lang_VMRuntime.h */
-#include "nat/java_lang_VMRuntime.h"
+#include "vm/builtin.h"
+#include "vm/exceptions.h"
+#include "vm/loader.h"
+#include "vm/tables.h"
+#include "vm/jit/asmpart.h"
 
-#ifndef STATIC_CLASSPATH
-#include <dlfcn.h>
-#endif
 
 /* this should work on BSD */
 /*
index 0188f30e7d070e9b8bf05115bd5f0e9d712a55d4..d2f1220952cb8281baef28cc8354705f817ee32f 100644 (file)
@@ -1,4 +1,4 @@
-/* nat/SecurityManager.c - java/lang/SecurityManager
+/* native/vm/VMSecurityManager.c - java/lang/VMSecurityManager
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
 
    Changes: Joseph Wenninger
 
-   $Id: VMSecurityManager.c 1208 2004-06-25 12:20:52Z twisti $
+   $Id: VMSecurityManager.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 
-#include "jni.h"
-#include "builtin.h"
-#include "native.h"
-#include "tables.h"
+#include "native/jni.h"
+#include "native/native.h"
+#include "native/include/java_lang_ClassLoader.h"
 #include "toolbox/logging.h"
-#include "java_lang_ClassLoader.h"
+#include "vm/builtin.h"
+#include "vm/tables.h"
 
 
 #ifndef __I386__
index 4c69f5e2e9d1b9f4f42710f4fd1fc42e617323f9..4fd1ad52f7652d1ae098035c3de4312cc9bd6f08 100644 (file)
@@ -1,4 +1,4 @@
-/* nat/VMString.c - java/lang/String
+/* native/vm/VMString.c - java/lang/VMString
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
 
    Changes: Christian Thalinger
 
-   $Id: VMString.c 1518 2004-11-17 11:54:55Z twisti $
+   $Id: VMString.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 
 #include <stdlib.h>
-#include "jni.h"
-#include "native.h"
-#include "nat/java_lang_String.h"
+
+#include "native/jni.h"
+#include "native/native.h"
+#include "native/include/java_lang_String.h"
 
 
 /*
index a78e434190c1c2e679ca2cb7fb63b41dbe821486..17a083f5cca88c4fc1525cf9f0362d3a9a43eb7d 100644 (file)
@@ -1,4 +1,4 @@
-/* nat/VMSystem.c - java/lang/System
+/* native/vm/VMSystem.c - java/lang/VMSystem
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
 
    Changes: Joseph Wenninger
 
-   $Id: VMSystem.c 1344 2004-07-21 17:12:53Z twisti $
+   $Id: VMSystem.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 
 #include <string.h>
 #include <time.h>
-#include "exceptions.h"
-#include "jni.h"
-#include "builtin.h"
-#include "native.h"
+
+#include "native/jni.h"
+#include "native/native.h"
+#include "native/include/java_lang_Object.h"
 #include "toolbox/logging.h"
-#include "java_lang_Object.h"
+#include "vm/exceptions.h"
+#include "vm/builtin.h"
 
 
 /*
index 88dbfc7c0e8971fb69547ccee0a0bd8c9ae7721f..d4899e441cfade9f0a8679c2214eb7afe129e130 100644 (file)
@@ -1,4 +1,4 @@
-/* nat/Thread.c - java/lang/Thread
+/* native/vm/VMThread.c - java/lang/VMThread
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
 
    Changes: Joseph Wenninger
 
-   $Id: VMThread.c 1573 2004-11-23 16:06:03Z twisti $
+   $Id: VMThread.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 
 #include "config.h"
-#include "jni.h"
-#include "builtin.h"
-#include "exceptions.h"
 #include "types.h"
-#include "native.h"
-#include "loader.h"
-#include "options.h"
-#include "tables.h"
-#include "threads/thread.h"
+#include "native/jni.h"
+#include "native/native.h"
+#include "native/include/java_lang_ThreadGroup.h"
+#include "native/include/java_lang_Object.h"            /* java_lang_Thread.h */
+#include "native/include/java_lang_Throwable.h"         /* java_lang_Thread.h */
+#include "native/include/java_lang_VMThread.h"
+#include "native/include/java_lang_Thread.h"
+
+#if defined(USE_THREADS)
+# if defined(NATIVE_THREADS)
+#  include "threads/native/threads.h"
+# else
+#  include "threads/green/threads.h"
+# endif
+#endif
+
 #include "toolbox/logging.h"
-#include "nat/java_lang_ThreadGroup.h"
-#include "nat/java_lang_Object.h"       /* needed for java_lang_Thread.h      */
-#include "nat/java_lang_Throwable.h"    /* needed for java_lang_Thread.h      */
-#include "nat/java_lang_VMThread.h"
-#include "nat/java_lang_Thread.h"
+#include "vm/builtin.h"
+#include "vm/exceptions.h"
+#include "vm/options.h"
+#include "vm/tables.h"
 
 
 /*
index 0b7263651a6f92cb03b8bff28aee496dad5f1bc7..f2a3a4b79fbb21ce78155f8a15ad71cfe1bf62df 100644 (file)
@@ -1,4 +1,4 @@
-/* nat/VMThrowable.c - java/lang/Throwable
+/* native/vm/VMThrowable.c - java/lang/VMThrowable
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
 
    Authors: Joseph Wenninger
 
-   $Id: VMThrowable.c 1574 2004-11-23 16:07:11Z twisti $
+   $Id: VMThrowable.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 
-#include "global.h"
-#include "jni.h"
-#include "asmpart.h"
-#include "loader.h"
-#include "builtin.h"
-#include "tables.h"
-#include "native.h"
-#include "nat/java_lang_Class.h"
-#include "nat/java_lang_Throwable.h"
-#include "nat/java_lang_VMClass.h"
-#include "nat/java_lang_VMThrowable.h"
+#include "native/jni.h"
+#include "native/native.h"
+#include "native/include/java_lang_Class.h"
+#include "native/include/java_lang_Throwable.h"
+#include "native/include/java_lang_VMClass.h"
+#include "native/include/java_lang_VMThrowable.h"
+#include "vm/builtin.h"
+#include "vm/loader.h"
+#include "vm/tables.h"
+#include "vm/jit/asmpart.h"
 
 
 /*
index 522770aec101cea3b8f3a759cf996f6e4711cff9..6b2be3761a79d7d9dd5305f621d5290e35aa1502 100644 (file)
@@ -1,22 +1,13 @@
 ## Process this file with automake to produce Makefile.in
 
-# $Id: Makefile.am 1255 2004-06-30 20:56:08Z twisti $
+# $Id: Makefile.am 1621 2004-11-30 13:06:55Z twisti $
 
-
-noinst_LIBRARIES = @LIBTHREAD@
-EXTRA_LIBRARIES = libthreads.a
+noinst_LIBRARIES = libthreads.a
 
 libthreads_a_SOURCES = \
        locks.c \
-       locks.h \
-       thread.c \
-       thread.h \
-       nativethread.c \
-       nativethread.h \
-       threadio.c \
-       threadio.h
-
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/jit/@ARCH_DIR@
+       threads.c \
+       threadio.c
 
 
 ## Local variables:
index cb10f505b1f7b34261479e6128ef8786db201c55..067dcef0e34b1fc511ed1f3484b6520c444f9b44 100644 (file)
@@ -1,7 +1,3 @@
-#include "global.h"
-
-#if defined(NATIVE_THREADS)
-
 #include <stdlib.h>
 #include <string.h>
 #include <assert.h>
 #include <time.h>
 #include <errno.h>
 
-#include "config.h"
-#include "thread.h"
 #include "codegen.h"
-#include "locks.h"
-#include "tables.h"
-#include "native.h"
-#include "loader.h"
-#include "builtin.h"
-#include "asmpart.h"
-#include "exceptions.h"
-#include "toolbox/logging.h"
-#include "toolbox/memory.h"
-#include "toolbox/avl.h"
+#include "config.h"
 #include "mm/boehm.h"
-
-#include "nat/java_lang_Object.h"
-#include "nat/java_lang_Throwable.h"
-#include "nat/java_lang_Thread.h"
-#include "nat/java_lang_ThreadGroup.h"
-#include "nat/java_lang_VMThread.h"
+#include "mm/memory.h"
+#include "native/native.h"
+#include "native/include/java_lang_Object.h"
+#include "native/include/java_lang_Throwable.h"
+#include "native/include/java_lang_Thread.h"
+#include "native/include/java_lang_ThreadGroup.h"
+#include "native/include/java_lang_VMThread.h"
+#include "threads/native/threads.h"
+#include "toolbox/avl.h"
+#include "toolbox/logging.h"
+#include "vm/exceptions.h"
+#include "vm/global.h"
+#include "vm/loader.h"
+#include "vm/tables.h"
+#include "vm/jit/asmpart.h"
 
 #include <pthread.h>
 #include <semaphore.h>
@@ -42,7 +36,7 @@
 #elif defined(__MIPS__)
 #define GC_IRIX_THREADS
 #endif
-#include "../mm/boehm-gc/include/gc.h"
+#include "boehm-gc/include/gc.h"
 #endif
 
 #ifdef MUTEXSIM
@@ -1099,8 +1093,6 @@ void broadcast_cond_for_object(java_objectheader *o)
        notifyOneOrAll(t, o, false);
 }
 
-#endif
-
 
 /*
  * These are local overrides for various environment variables in Emacs.
index 261835ceedb7d6da49be20446a68b77375c3a08d..0f63e6e5100707690d62c77fc99b23b2bad50a64 100644 (file)
@@ -1,13 +1,46 @@
+/* threads/native/threads.h - native threads header
+
+   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+   R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
+   M. Probst, S. Ring, E. Steiner, C. Thalinger, D. Thuernbeck,
+   P. Tomsich, J. Wenninger
+
+   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., 59 Temple Place - Suite 330, Boston, MA
+   02111-1307, USA.
+
+   Contact: cacao@complang.tuwien.ac.at
+
+   Authors: Stefan Ring
+
+   $Id: threads.h 1621 2004-11-30 13:06:55Z twisti $
+
+*/
+
+
 #ifndef _NATIVETHREAD_H
 #define _NATIVETHREAD_H
 
 #include <semaphore.h>
 
-#include "jni.h"
-#include "nat/java_lang_Object.h"       /* required by java/lang/VMThread     */
-#include "nat/java_lang_Thread.h"
-#include "nat/java_lang_VMThread.h"
-#include "toolbox/memory.h"
+#include "mm/memory.h"
+#include "native/jni.h"
+#include "native/include/java_lang_Object.h" /* required by java/lang/VMThread*/
+#include "native/include/java_lang_Thread.h"
+#include "native/include/java_lang_VMThread.h"
 
 #if defined(__DARWIN__)
 #include <mach/mach.h>
 #define MUTEXSIM
 #endif
 
+
+typedef struct {
+       s4 super_baseval;
+       s4 super_diffval;
+       s4 sub_baseval;
+} castinfo;
+
 struct _threadobject;
 
 
@@ -127,7 +167,7 @@ extern __thread threadobject *threadobj;
 #define THREADINFO (&threadobj->info)
 #endif
 
-#include "builtin.h"
+/*#include "builtin.h"*/
 
 /* This must not be changed, it is used in asm_criticalsections */
 typedef struct {
index 7279fe6994ff7b9a617497c6653c2c7bb4286d47..7fbe098faf117775e69589b8379fb1151c896ffc 100644 (file)
@@ -1,24 +1,17 @@
 ## Process this file with automake to produce Makefile.in
 
-# $Id: Makefile.am 1141 2004-06-05 23:19:24Z twisti $
+# $Id: Makefile.am 1621 2004-11-30 13:06:55Z twisti $
+
+INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/@ARCH_DIR@
 
 noinst_LIBRARIES = libtoolbox.a
 
 libtoolbox_a_SOURCES = \
        avl.c \
-       avl.h \
-       memory.c \
-       memory.h \
        logging.c \
-       logging.h \
        chain.c \
-       chain.h \
        tree.c \
-       tree.h \
-       list.c \
-       list.h
-
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/jit/@ARCH_DIR@
+       list.c
 
 
 ## Local variables:
index 7bdae27b50fbbd76138629f051c2980347a83ff7..5ea308793b635a22bf4db7d86d5d64485dddd367 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+
 #include "toolbox/avl.h"
 
+
 /* Creates and returns a new table
    with comparison function |compare| using parameter |param|
    and memory allocator |allocator|.
index 92652d2b56eecea3ab18da8b4fc9b6b75aebb7d6..d8f7c5c474fa14ac286278b2d3284724c51203cc 100644 (file)
@@ -27,7 +27,7 @@
 
    Authors: Reinhard Grafl
 
-   $Id: chain.c 1141 2004-06-05 23:19:24Z twisti $
+   $Id: chain.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
@@ -36,8 +36,7 @@
 #include <stdlib.h>
 #include <assert.h>
 
-#include "global.h"
-#include "toolbox/memory.h"
+#include "mm/memory.h"
 #include "toolbox/chain.h"
 
 
index e2c000b18f957fc49fd5dbbbd1ed87bff7373651..ce57bc6a004045e85d75e3f3ee95a3369d9b2e0d 100644 (file)
 
    Authors: Reinhard Grafl
 
-   $Id: list.c 1552 2004-11-19 15:14:58Z twisti $
+   $Id: list.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 
 #include <stdlib.h>
 
-#include "global.h"
 #include "toolbox/list.h"
 
 
index bdb6843efa4583b6337f24c65c2d57d8649ac4bb..6da47dae90b18f5e1b04d6ca192f799fab123a3a 100644 (file)
@@ -27,7 +27,7 @@
 
    Authors: Reinhard Grafl
 
-   $Id: logging.c 1273 2004-07-04 11:12:11Z stefan $
+   $Id: logging.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 #include <stdlib.h>
 #include <string.h>
 
-#include "global.h"
-#include "tables.h"
 #include "toolbox/logging.h"
-#include "statistics.h"
+#include "vm/global.h"
+#include "vm/tables.h"
+#include "vm/statistics.h"
 
 
 /***************************************************************************
index b09ad38055a9363bc8ae62ea6a33fa103f474de5..6545292b8eb0bad238c6a9aef587f8a31a0bf9e6 100644 (file)
@@ -27,7 +27,7 @@
 
    Authors: Reinhard Grafl
 
-   $Id: logging.h 1434 2004-11-05 09:46:07Z twisti $
+   $Id: logging.h 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
@@ -41,7 +41,7 @@
 #include <sys/mman.h>
 /*  #define panic cacao_panic */
 
-#include "global.h"
+#include "vm/global.h"
 
 
 #define MAXLOGTEXT 500
index c7502a2a0663c15c7ea66592a14a388b42a2bf54..a47401e7451c8478d8ec2963b8f3bd5f3c295b59 100644 (file)
@@ -27,7 +27,7 @@
 
    Authors: Reinhard Grafl
 
-   $Id: tree.c 1141 2004-06-05 23:19:24Z twisti $
+   $Id: tree.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
@@ -35,8 +35,7 @@
 #include <stdio.h>
 #include <assert.h>
 
-#include "global.h"
-#include "toolbox/memory.h"
+#include "mm/memory.h"
 #include "toolbox/tree.h"
 
 
index 38c4344831f848453ad13ef3493478f3cecc8fe1..5f5bdf664b1bbba3814215e14a05f80d447a1d1f 100644 (file)
@@ -1,4 +1,4 @@
-/* builtin.c - functions for unsupported operations
+/* vm/builtin.c - functions for unsupported operations
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
@@ -34,7 +34,7 @@
    calls instead of machine instructions, using the C calling
    convention.
 
-   $Id: builtin.c 1542 2004-11-18 12:19:49Z twisti $
+   $Id: builtin.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 #include <assert.h>
 #include <string.h>
 #include <math.h>
-#include "exceptions.h"
-#include "global.h"
-#include "options.h"
-#include "builtin.h"
-#include "native.h"
-#include "loader.h"
-#include "tables.h"
-#include "asmpart.h"
+
 #include "mm/boehm.h"
-#include "threads/thread.h"
-#include "threads/locks.h"
+#include "mm/memory.h"
+#include "native/native.h"
+#include "native/include/java_lang_Cloneable.h"
+#include "native/include/java_lang_VMObject.h"
+
+#if defined(USE_THREADS)
+# if defined(NATIVE_THREADS)
+#  include "threads/native/threads.h"
+# else
+#  include "threads/green/threads.h"
+#  include "threads/green/locks.h"
+# endif
+#endif
+
 #include "toolbox/logging.h"
-#include "toolbox/memory.h"
-#include "nat/java_lang_Cloneable.h"
-#include "nat/java_lang_VMObject.h"
+#include "vm/builtin.h"
+#include "vm/exceptions.h"
+#include "vm/global.h"
+#include "vm/loader.h"
+#include "vm/options.h"
+#include "vm/tables.h"
+#include "vm/jit/asmpart.h"
 
 
 #undef DEBUG /*define DEBUG 1*/
index d734fd286d56e0b5048a7dcfa0f9c03017463313..2d086220a0df29506f276cf0c93e7a75c6336ffd 100644 (file)
@@ -1,4 +1,4 @@
-/* builtin.h - prototypes of builtin functions
+/* vm/builtin.h - prototypes of builtin functions
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
@@ -28,7 +28,7 @@
 
    Changes: Edwin Steiner
 
-   $Id: builtin.h 1571 2004-11-23 16:05:04Z twisti $
+   $Id: builtin.h 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 #ifndef _BUILTIN_H
 #define _BUILTIN_H
 
+#include "arch.h"
 #include "config.h"
 #include "toolbox/logging.h"
-#include "threads/thread.h"
-#include "arch.h"
+
+#if defined(USE_THREADS)
+# if defined(NATIVE_THREADS)
+#  include "threads/native/threads.h"
+# else
+#  include "threads/green/threads.h"
+# endif
+#endif
 
 
 /* define infinity for floating point numbers */
index 9bba20589a9a24bdfce156234d3fcbec1a384622..2091b548f4e7280e41a2a1d969908d9474366898 100644 (file)
@@ -1,4 +1,4 @@
-/* exceptions.c - exception related functions
+/* vm/exceptions.c - exception related functions
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
@@ -26,7 +26,7 @@
 
    Authors: Christian Thalinger
 
-   $Id: exceptions.c 1578 2004-11-24 13:31:00Z twisti $
+   $Id: exceptions.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 #include <string.h>
 #include <stdarg.h>
 #include <stdlib.h>
-#include "asmpart.h"
-#include "global.h"
-#include "loader.h"
-#include "native.h"
-#include "tables.h"
-#include "jit/jit.h"
+
+#include "mm/memory.h"
+#include "native/native.h"
+#include "native/include/java_lang_String.h"
+#include "native/include/java_lang_Throwable.h"
 #include "toolbox/logging.h"
-#include "toolbox/memory.h"
-#include "nat/java_lang_String.h"
-#include "nat/java_lang_Throwable.h"
+#include "vm/global.h"
+#include "vm/loader.h"
+#include "vm/tables.h"
+#include "vm/jit/asmpart.h"
+#include "vm/jit/jit.h"
 
 
 /* system exception classes required in cacao */
index ce7eaa1e61bc32e638fd9288987d4f0667b2a0fa..10f75ad93d01d0bfbc3349f5932bb812d6656960 100644 (file)
@@ -1,4 +1,4 @@
-/* exceptions.h - exception related functions prototypes
+/* vm/exceptions.h - exception related functions prototypes
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
@@ -26,7 +26,7 @@
 
    Authors: Christian Thalinger
 
-   $Id: exceptions.h 1578 2004-11-24 13:31:00Z twisti $
+   $Id: exceptions.h 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
@@ -36,8 +36,8 @@
 
 
 #include "global.h"
-#include "nat/java_lang_String.h"
-#include "nat/java_lang_Throwable.h"
+#include "native/include/java_lang_String.h"
+#include "native/include/java_lang_Throwable.h"
 
 
 /* system exception classes required in cacao */
index 5679647df5703e8adda1995e0b91cc61ed43ff6d..2b3b55a2a5caadf5869b89316ee089abb06afbdf 100644 (file)
@@ -31,7 +31,7 @@
             Philipp Tomsich
                        Edwin Steiner
 
-   $Id: global.h 1510 2004-11-17 11:33:44Z twisti $
+   $Id: global.h 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 #ifndef _GLOBAL_H
 #define _GLOBAL_H
 
-
 #include "config.h"
 #include "types.h"
+
+
+/* resolve typedef cycles *****************************************************/
+
+typedef struct utf utf;
+typedef struct literalstring literalstring;
+typedef struct java_objectheader java_objectheader; 
+typedef struct classinfo classinfo; 
+typedef struct _vftbl vftbl_t;
+typedef u1* methodptr;
+typedef struct fieldinfo  fieldinfo; 
+typedef struct exceptiontable exceptiontable;
+typedef struct methodinfo methodinfo; 
+typedef struct lineinfo lineinfo; 
+typedef struct arraydescriptor arraydescriptor;
+
+
+/* additional data types ******************************************************/
+
+typedef void *voidptr;                  /* generic pointer                    */
+typedef void (*functionptr) ();         /* generic function pointer           */
+
+typedef int   bool;                     /* boolean data type                  */
+
+#define true  1
+#define false 0
+
+
+/* additional includes ********************************************************/
+
 #include "toolbox/list.h"
+#include "vm/jit/inline/sets.h"
 
 
 #if defined(USE_THREADS) && defined(NATIVE_THREADS)
 #endif
 
 
-/* additional data types ******************************************************/
-
-typedef void *voidptr;                  /* generic pointer                    */
-typedef void (*functionptr) ();         /* generic function pointer           */
-
-typedef int   bool;                     /* boolean data type                  */
-
-#define true  1
-#define false 0
-
-
 /* immediate data union */
 
 typedef union {
@@ -180,21 +199,7 @@ typedef union {
 #define ACC_NATIVE                0x0100
 #define ACC_INTERFACE             0x0200
 #define ACC_ABSTRACT              0x0400
-#define ACC_STRICT               0x0800
-
-/* resolve typedef cycles *****************************************************/
-
-typedef struct utf utf;
-typedef struct literalstring literalstring;
-typedef struct java_objectheader java_objectheader; 
-typedef struct classinfo classinfo; 
-typedef struct _vftbl vftbl_t;
-typedef u1* methodptr;
-typedef struct fieldinfo  fieldinfo; 
-typedef struct exceptiontable exceptiontable;
-typedef struct methodinfo methodinfo; 
-typedef struct lineinfo lineinfo; 
-typedef struct arraydescriptor arraydescriptor;
+#define ACC_STRICT                0x0800
 
 
 /* constant pool entries *******************************************************
@@ -490,7 +495,6 @@ typedef struct primitivetypeinfo {
 
 /* field, method and class structures *****************************************/
 
-#include "jit/sets.h"
 typedef        struct xtafldinfo {
        bool       fieldChecked;                
        classinfo *fldClassType;
index 377429c73d931bb87d605e05cf9e1f958bdc8b0c..49b00bdd09e225bd3b6141a205c2a92bf1374afa 100644 (file)
@@ -1,39 +1,24 @@
 ## Process this file with automake to produce Makefile.in
 
-# $Id: Makefile.am 1251 2004-06-30 20:24:06Z twisti $
+# $Id: Makefile.am 1621 2004-11-30 13:06:55Z twisti $
 
+INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/@ARCH_DIR@
 
-SUBDIRS = . loop @ARCH_DIR@
-DIST_SUBDIRS = loop alpha i386 mips powerpc x86_64
+SUBDIRS = inline loop verify tools @ARCH_DIR@
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/jit/@ARCH_DIR@
+DIST_SUBDIRS = inline loop verify tools alpha i386 mips powerpc x86_64
 
-EXTRA_DIST = \
+noinst_LIBRARIES = libjit.a
+
+libjit_a_SOURCES = \
        jit.c \
-       jit.h \
-       codegen.inc \
        parse.c \
-       reg.inc \
-       stack.c \
-       inline.c \
-       sets.c \
-       sets.h \
-       parseRT.c \
-       parseRTprint.h \
-       parseRTstats.c \
-       typecheck.c
-
-noinst_HEADERS = \
-       parse.h \
-       stack.h \
-       reg.h \
-       inline.h \
-       parseRT.h \
-       parseRTstats.h
-
-noinst_LIBRARIES = libjit.a
+       stack.c
 
-libjit_a_SOURCES = jit.c parse.c stack.c inline.c sets.c parseRT.c parseRTstats.c typecheck.c
+libjit_a_LIBADD = \
+       inline/libinline.a \
+       loop/libloop.a \
+       verify/libverify.a
 
 
 ## Local variables:
index 0ce6e85e76c189eee20118e32c25b8cca6922db9..dac76f6d886712fa6b99b599f28c7c97fb77b6b4 100644 (file)
@@ -1,4 +1,4 @@
-/* asmpart.h - prototypes for machine specfic functions
+/* vm/jit/asmpart.h - prototypes for machine specfic functions
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
@@ -29,7 +29,7 @@
 
    Changes: Christian Thalinger
 
-   $Id: asmpart.h 1296 2004-07-10 17:02:15Z stefan $
+   $Id: asmpart.h 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 #ifndef _ASMPART_H
 #define _ASMPART_H
 
-#include "global.h"
-#include "jni.h"
-#include "threads/thread.h"
+#include "native/jni.h"
+#include "vm/global.h"
+
+#if defined(USE_THREADS)
+# if defined(NATIVE_THREADS)
+#  include "threads/native/threads.h"
+# else
+#  include "threads/green/threads.h"
+# endif
+#endif
+
 
 /* 
    determines if the byte support instruction set (21164a and higher)
index dd4943360df976938774378bcca3546ab160bec0..254c1624677bafbd9712c24072c4804d6f99dd1b 100644 (file)
@@ -1,4 +1,4 @@
-/* jit/codegen.inc - architecture independent code generator
+/* vm/jit/codegen.inc - architecture independent code generator
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    Institut f. Computersprachen, TU Wien
    memory. All functions writing values into the data area return the offset
    relative the begin of the code area (start of procedure).   
 
-   $Id: codegen.inc 1565 2004-11-23 15:56:37Z twisti $
+   $Id: codegen.inc 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 
 #include <string.h>
-#include "exceptions.h"
-#include "native.h"
-#include "options.h"
-#include "statistics.h"
-#include "jit/codegen.inc.h"
-#include "toolbox/memory.h"
-#include "toolbox/logging.h"
+
+#if !defined(STATIC_CLASSPATH)
+# include <dlfcn.h>
+#endif
+
+#include "mm/memory.h"
 #include "toolbox/avl.h"
-#include "threads/thread.h"
-#ifndef STATIC_CLASSPATH
-#include <dlfcn.h>
+#include "toolbox/logging.h"
+#include "native/native.h"
+
+#if defined(USE_THREADS)
+# if defined(NATIVE_THREADS)
+#  include "threads/native/threads.h"
+# else
+#  include "threads/green/threads.h"
+# endif
 #endif
 
-/* in this tree we store all method addresses */
+#include "vm/exceptions.h"
+#include "vm/options.h"
+#include "vm/statistics.h"
+#include "vm/jit/codegen.inc.h"
+
+
+/* in this tree we store all method addresses *********************************/
 
 #if defined(__I386__) || defined(__X86_64__)
 static struct avl_table *methodtree = NULL;
index fdb5400bbeea1b418baf6cbae296126e0d952c7f..0728522e5a8308df68bcb1ea80c121e7ee24ebcd 100644 (file)
@@ -26,7 +26,7 @@
 
    Authors: Christian Thalinger
 
-   $Id: codegen.inc.h 1605 2004-11-29 10:06:02Z twisti $
+   $Id: codegen.inc.h 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
@@ -47,9 +47,9 @@ typedef struct threadcritnodetemp threadcritnodetemp;
 
 
 #include "types.h"
-#include "global.h"
-#include "jit/inline.h"
-#include "jit/reg.h"
+#include "vm/global.h"
+#include "vm/jit/reg.h"
+#include "vm/jit/inline/inline.h"
 
 
 #define MCODEINITSIZE (1<<15)       /* 32 Kbyte code area initialization size */
index 5b117003b5dc7547ff9aad7413a2d9bec168185b..a09e3c514084669268ced38dd2ed67ce112df67b 100644 (file)
@@ -28,23 +28,25 @@ globals moved to structure and passed as parameter
 
    Authors: Dieter Thuernbeck
 
-   $Id: inline.c 1557 2004-11-22 12:01:16Z carolyn $
+   $Id: inline.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 
 #include <stdio.h>
 #include <string.h>
-#include "global.h"
-#include "loader.h"
-#include "tables.h"
-#include "options.h"
-#include "jit/inline.h"
-#include "jit/jit.h"
-#include "jit/parse.h"
+
+#include "mm/memory.h"
 #include "toolbox/logging.h"
-#include "toolbox/memory.h"
-#include "sets.h"
+#include "vm/global.h"
+#include "vm/loader.h"
+#include "vm/tables.h"
+#include "vm/options.h"
+#include "vm/jit/jit.h"
+#include "vm/jit/parse.h"
+#include "vm/jit/inline/inline.h"
+#include "vm/jit/inline/sets.h"
+
 
 #define INVIRTDEBUG 
 #undef  INVIRTDEBUG
index 7efa0696645825341f0eb39136eff0f12261d9bb..11bf2f5c97901ad068bcf5c5d6daba908aa4c4a0 100644 (file)
@@ -26,7 +26,7 @@
 
    Authors: Dieter Thuernbeck
 
-   $Id: inline.h 1557 2004-11-22 12:01:16Z carolyn $
+   $Id: inline.h 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 #ifndef _INLINE_H
 #define _INLINE_H
 
-#include "global.h"
+/* resolve typedef cycles *****************************************************/
+
+typedef struct t_inlining_globals t_inlining_globals;
+
+
 #include "toolbox/list.h"
+#include "vm/global.h"
+
 
 #define INLINING_MAXDEPTH       2  /*1*/ 
 #define INLINING_MAXCODESIZE    128 /*32*/
@@ -99,21 +105,22 @@ typedef struct {
 
 } t_inlining_stacknode;
 
-typedef struct t_inlining_globals {  /* try in parse.h with struct not include */
-        bool isinlinedmethod;
-        int cumjcodelength;   /* cumulative immediate intruction length */
-        int cummaxstack;
-        int cumextablelength;
-        int cumlocals;        /* was static */
-        int cummethods;       /* was static */
-        list *inlining_stack; /* was static */
-        inlining_methodinfo *inlining_rootinfo;
-        methodinfo *method;
-        classinfo *class;
-        int jcodelength;
-        u1 *jcode;
+
+struct t_inlining_globals {  /* try in parse.h with struct not include */
+       bool isinlinedmethod;
+       int cumjcodelength;   /* cumulative immediate intruction length */
+       int cummaxstack;
+       int cumextablelength;
+       int cumlocals;        /* was static */
+       int cummethods;       /* was static */
+       list *inlining_stack; /* was static */
+       inlining_methodinfo *inlining_rootinfo;
+       methodinfo *method;
+       classinfo *class;
+       int jcodelength;
+       u1 *jcode;
        bool isleafmethod;
-} t_inlining_globals;
+};
 
 
 /* function prototypes*/
index 5011dbff9b9055da89f9b30c63d1f772b7a9a1cb..861d45dfcb5089420cd17d762cf7358a888f1ea4 100644 (file)
@@ -26,7 +26,7 @@
 
    Authors: Carolyn Oates
 
-   $Id: parseRT.c 1557 2004-11-22 12:01:16Z carolyn $
+   $Id: parseRT.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
@@ -60,18 +60,19 @@ Results: (currently) with -stat see # methods marked used
 
 #include <stdio.h>
 #include <string.h>
-#include "tables.h"
-
-#include "statistics.h"
-#include "loader.h"
-#include "main.h"
-#include "options.h"
-#include "jit/jit.h"
-#include "jit/parse.h"
+
+#include "cacao/cacao.h"
+#include "mm/memory.h"   
 #include "toolbox/list.h"
-#include "toolbox/memory.h"   
-#include "parseRT.h"
-#include "parseRTstats.h"
+#include "vm/tables.h"
+#include "vm/statistics.h"
+#include "vm/loader.h"
+#include "vm/options.h"
+#include "vm/jit/jit.h"
+#include "vm/jit/parse.h"
+#include "vm/jit/inline/parseRT.h"
+#include "vm/jit/inline/parseRTstats.h"
+
 
 static bool firstCall= true;
 static list *rtaWorkList;
index 4674ba14695f982afcbb630146e3a2b05c3ba24a..2a1b07131c191b652f3c5e1e957fd3c113e7976a 100644 (file)
 
    Authors: Carolyn Oates
 
-   $Id: parseRT.h 1557 2004-11-22 12:01:16Z carolyn $
+   $Id: parseRT.h 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 #ifndef _PARSERT_H
 #define _PARSERT_H
 
-#include "global.h"
+#include "vm/global.h"
+
 
 extern FILE *rtMissed;   /* Methods missed during RTA parse of Main  */
 
index 225c1cd3fa1a61d4e0a17b09f1c3648a9ff69c64..4bd4919c823133df6aea7b16beb2af6aaf5a874e 100644 (file)
@@ -1,4 +1,4 @@
-/* jit/parseRTstats.c -
+/* vm/jit/inline/parseRTstats.c -
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
 
    Authors: Carolyn Oates
 
-   $Id: parseRTstats.c 1553 2004-11-19 15:47:13Z carolyn $
+   $Id: parseRTstats.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
+
 #include <stdio.h>
+
 #include "toolbox/list.h"
-#include "options.h"
-#include "tables.h"
-#include "statistics.h"
-#include "loader.h"
-#include "parseRT.h"
-#include "parseRTstats.h"
+#include "vm/options.h"
+#include "vm/tables.h"
+#include "vm/statistics.h"
+#include "vm/loader.h"
+#include "vm/jit/inline/parseRT.h"
+#include "vm/jit/inline/parseRTstats.h"
+
 
 int pClassHeirStatsOnly = 2;
 int pClassHeir = 2;
index 6f1f111c4be449d38df37666d78044aedcffa764..3824aa3a1d07f530be8894fab505f53afbdce27c 100644 (file)
@@ -1,4 +1,4 @@
-/* jit/sets.c -
+/* vm/jit/inline/sets.c -
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    Institut f. Computersprachen, TU Wien
 
    Authors: Carolyn Oates
 
-   $Id: sets.c 1296 2004-07-10 17:02:15Z stefan $
+   $Id: sets.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 
 #include <stdio.h>
-#include "sets.h"
+
 #include "types.h"
-#include "global.h"
-#include "loader.h"
-#include "tables.h"
-#include "toolbox/memory.h"
+#include "mm/memory.h"
+#include "vm/global.h"
+#include "vm/loader.h"
+#include "vm/tables.h"
+#include "vm/jit/inline/sets.h"
 
 
 /*
index 2ae2e15c42dcb94382eb81eabf8a278453b0720c..35b7aa519b3aa6a5c22549e000112e0ad2ad5090 100644 (file)
@@ -27,7 +27,7 @@
 
    Authors: Carolyn Oates
 
-   $Id: sets.h 665 2003-11-21 18:36:43Z jowenn $
+   $Id: sets.h 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
@@ -35,8 +35,6 @@
 #ifndef _SET_H
 #define _SET_H
 
-#include "types.h"
-
 typedef struct methSet      methSet;
 typedef struct methSetNode  methSetNode;
 typedef struct fldSet       fldSet;
@@ -45,7 +43,8 @@ typedef struct classSet     classSet;
 typedef struct classSetNode classSetNode;
 
 
-#include "global.h"
+#include "types.h"
+#include "vm/global.h"
 
 
 /*------------ Method /Class Used Markers -------------------------------*/                 
index 5cf779bedd1ded4e527cc4f5b283fabb36b3cc5c..406b7246abae7326bc863f21b482d219452f8415 100644 (file)
@@ -1,4 +1,4 @@
-/* jit/jit.c - calls the code generation functions
+/* vm/jit/jit.c - calls the code generation functions
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
 
    Changes: Edwin Steiner
 
-   $Id: jit.c 1590 2004-11-25 13:24:49Z christian $
+   $Id: jit.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 
-#include <stdlib.h>
-#include <string.h>
-#include "global.h"
-#include "tables.h"
-#include "loader.h"
-#include "builtin.h"
-#include "native.h"
-#include "asmpart.h"
 #include "codegen.h"
-#include "types.h"
-#include "options.h"
-#include "statistics.h"
-#include "jit/codegen.inc.h"
-#include "jit/inline.h"
-#include "jit/jit.h"
-#include "jit/parseRT.h"
-#include "jit/parse.h"
-#include "jit/stack.h"
-#include "jit/reg.h"
-#include "jit/typecheck.h"
-#include "threads/thread.h"
 #include "disass.h"
-#include "loop/loop.h"
-#include "loop/graph.h"
-#include "loop/analyze.h"
-#include "toolbox/logging.h"
-#include "toolbox/memory.h"
 #include "types.h"
-#include <stdio.h>
-#include "jit/lsra.h"
+#include "mm/memory.h"
+#include "toolbox/logging.h"
+#include "vm/builtin.h"
+#include "vm/global.h"
+#include "vm/loader.h"
+#include "vm/options.h"
+#include "vm/statistics.h"
+#include "vm/tables.h"
+#include "vm/jit/codegen.inc.h"
+#include "vm/jit/jit.h"
+#include "vm/jit/lsra.h"
+#include "vm/jit/parse.h"
+#include "vm/jit/reg.h"
+#include "vm/jit/stack.h"
+#include "vm/jit/inline/inline.h"
+#include "vm/jit/inline/parseRT.h"
+#include "vm/jit/loop/analyze.h"
+#include "vm/jit/loop/graph.h"
+#include "vm/jit/loop/loop.h"
+#include "vm/jit/verify/typecheck.h"
+
+#if defined(USE_THREADS)
+# if defined(NATIVE_THREADS)
+#  include "threads/native/threads.h"
+# else
+#  include "threads/green/threads.h"
+# endif
+#endif
+
+
 
 /* global switches ************************************************************/
 
index 142b3a2df6980bb5e4fab9384139df44505a3b79..92c5f740b04e57967daea789a1cceee189344bb7 100644 (file)
@@ -29,7 +29,7 @@
 
    Changes: Christian Thalinger
 
-   $Id: jit.h 1593 2004-11-25 15:14:48Z twisti $
+   $Id: jit.h 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
@@ -37,8 +37,7 @@
 #ifndef _JIT_H
 #define _JIT_H
 
-/* We typedef these structures before #includes to resolve circular           */
-/* dependencies.                                                              */
+/* resolve typedef cycles *****************************************************/
 
 typedef struct stackelement stackelement;
 typedef stackelement *stackptr;
@@ -47,11 +46,11 @@ typedef struct instruction instruction;
 typedef struct subroutineinfo subroutineinfo;
 
 
-#include "global.h"
-#include "builtin.h"
-#include "typeinfo.h"
-#include "jit/codegen.inc.h"
 #include "toolbox/chain.h"
+#include "vm/global.h"
+#include "vm/builtin.h"
+#include "vm/jit/codegen.inc.h"
+#include "vm/jit/verify/typeinfo.h"
 
 
 /**************************** resolve typedef-cycles **************************/
index 13588bf71294dbd89e0040ad5a7b6769bfad8585..29ab8c4b84adf0ea585c709229bd0faffa3fe903 100644 (file)
@@ -1,25 +1,17 @@
 ## Process this file with automake to produce Makefile.in
 
-# $Id: Makefile.am 1141 2004-06-05 23:19:24Z twisti $
+# $Id: Makefile.am 1621 2004-11-30 13:06:55Z twisti $
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/jit/@ARCH_DIR@
+INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/@ARCH_DIR@
 
-EXTRA_DIST = \
+noinst_LIBRARIES = libloop.a
+
+libloop_a_SOURCES = \
+       analyze.c \
        graph.c \
        loop.c \
-       loop.h \
-       analyze.c \
        tracing.c
 
-noinst_HEADERS = \
-       graph.h \
-       analyze.h \
-       tracing.h
-
-noinst_LIBRARIES = libloop.a
-
-libloop_a_SOURCES = loop.c analyze.c graph.c tracing.c
-
 
 ## Local variables:
 ## mode: Makefile
index 64daa28198297f9269b0d206db90d81d19712ab5..fafc95c5f760b64e55abccf63bdf980c7a0c728b 100644 (file)
@@ -1,4 +1,4 @@
-/* jit/loop/analyze.c - bound check removal functions
+/* vm/jit/loop/analyze.c - bound check removal functions
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
@@ -32,7 +32,7 @@
    bounds are never violated. The function to call is
    optimize_loops().
 
-   $Id: analyze.c 1531 2004-11-17 20:45:56Z christian $
+   $Id: analyze.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include "jit/loop/analyze.h"
-#include "jit/jit.h"
-#include "jit/loop/loop.h"
-#include "jit/loop/graph.h"
-#include "jit/loop/tracing.h"
+
+#include "mm/memory.h"
 #include "toolbox/logging.h"
-#include "toolbox/memory.h"
+#include "vm/jit/jit.h"
+#include "vm/jit/loop/analyze.h"
+#include "vm/jit/loop/graph.h"
+#include "vm/jit/loop/loop.h"
+#include "vm/jit/loop/tracing.h"
 
  
 #ifdef LOOP_DEBUG
index 75bc98eb424474851c6ad49bc8da983de1da4f6f..9a38775e18df2174f3480a94ca887cd257a8dd64 100644 (file)
@@ -1,4 +1,4 @@
-/* jit/loop/analyze.h - bound check removal header
+/* vm/jit/loop/analyze.h - bound check removal header
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
@@ -26,7 +26,7 @@
 
    Authors: Christian Thalinger
 
-   $Id: analyze.h 1531 2004-11-17 20:45:56Z christian $
+   $Id: analyze.h 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
@@ -34,8 +34,8 @@
 #ifndef _ANALYZE_H
 #define _ANALYZE_H
 
-#include "global.h"
-#include "jit/loop/loop.h"
+#include "vm/global.h"
+#include "vm/jit/loop/loop.h"
 
 
 void optimize_loops(methodinfo *m, codegendata *cd, loopdata *ld);
index 924334dc19243981ed687215538742a21609a1f4..3bb8fd53fac9fe1aa252164b30d14ce9146b9c54 100644 (file)
@@ -1,4 +1,4 @@
-/* jit/loop/graph.c - control flow graph
+/* vm/jit/loop/graph.c - control flow graph
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
    Contains the functions which build a list, that represents the
    control flow graph of the procedure, that is being analyzed.
 
-   $Id: graph.c 1531 2004-11-17 20:45:56Z christian $
+   $Id: graph.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 
-#include <stdio.h>
-#include "jit/jit.h"
-#include "jit/loop/graph.h"
-#include "jit/loop/loop.h"
-#include "toolbox/memory.h"
+#include "mm/memory.h"
+#include "vm/jit/jit.h"
+#include "vm/jit/loop/graph.h"
+#include "vm/jit/loop/loop.h"
 
 
 void LoopContainerInit(methodinfo *m, struct LoopContainer *lc, int i)
index c6bf4507f53024a243d251804a44bce91a14bf8a..1d37f5d9b8deb21730b417d2d464a647520f8653 100644 (file)
@@ -1,4 +1,4 @@
-/* jit/loop/loop.c - array bound removal
+/* vm/jit/loop/loop.c - array bound removal
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
    algorithm that uses dominator trees (found eg. in modern compiler
    implementation by a.w. appel)
 
-   $Id: loop.c 1454 2004-11-05 14:19:32Z twisti $
+   $Id: loop.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 
-#include <stdio.h>
-#include <stdlib.h>
-#include "global.h"    
-#include "jit/jit.h"   
-#include "jit/loop/loop.h"
-#include "jit/loop/graph.h"
-#include "jit/loop/tracing.h"
-#include "toolbox/logging.h"
-#include "toolbox/memory.h"
+/*  #include <stdio.h> */
+/*  #include <stdlib.h> */
 
+#include "mm/memory.h"
+#include "toolbox/logging.h"
+#include "vm/global.h" 
+#include "vm/jit/jit.h"        
+#include "vm/jit/loop/loop.h"
+#include "vm/jit/loop/graph.h"
+#include "vm/jit/loop/tracing.h"
 
 
 /*     
index b86868b3634b6e25ad3e2bf57557ad6c3ce96531..eb1d45ab029b2355ccd02ff7252b4f3c844406dc 100644 (file)
@@ -1,4 +1,4 @@
-/* jit/loop/loop.h - array bound removal header
+/* vm/jit/loop/loop.h - array bound removal header
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
@@ -26,7 +26,7 @@
 
    Authors: Christopher Kruegel
 
-   $Id: loop.h 1454 2004-11-05 14:19:32Z twisti $
+   $Id: loop.h 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
@@ -34,8 +34,8 @@
 #ifndef _LOOP_H
 #define _LOOP_H
 
-#include "global.h"
-#include "jit/jit.h"
+#include "vm/global.h"
+#include "vm/jit/jit.h"
 
 
 /*     Different types for struct Trace                                                                                */
index e8c69136acdc66052e09483a80f4e2dffe683dd0..a0a647d13bc07b54d42393a97c169003bcd4e354 100644 (file)
@@ -1,4 +1,4 @@
-/* jit/loop/tracing.c - trace functions
+/* vm/jit/loop/tracing.c - trace functions
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
    instruction. For more details see function tracing(basicblock, int,
    int) below.
 
-   $Id: tracing.c 1454 2004-11-05 14:19:32Z twisti $
+   $Id: tracing.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 
-#include <stdio.h>
-#include "jit/loop/tracing.h"
-#include "jit/loop/loop.h"
-#include "toolbox/memory.h"
+/*  #include <stdio.h> */
+
+#include "mm/memory.h"
+#include "vm/jit/loop/loop.h"
+#include "vm/jit/loop/tracing.h"
 
 
 /*     Test function -> will be removed in final release
index fee73f4bafeecbd78c4e1533041c7c317d452f2b..0679daddb0228393391f46fb5ee25e6f0632557f 100644 (file)
@@ -1,4 +1,4 @@
-/* jit/loop/tracing.h - trace functions header
+/* vm/jit/loop/tracing.h - trace functions header
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
@@ -26,7 +26,7 @@
 
    Authors: Christian Thalinger
 
-   $Id: tracing.h 1454 2004-11-05 14:19:32Z twisti $
+   $Id: tracing.h 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
@@ -34,8 +34,7 @@
 #ifndef _TRACING_H
 #define _TRACING_H
 
-
-#include "jit/jit.h"
+#include "vm/jit/jit.h"
 
 
 typedef struct Trace Trace;
@@ -58,7 +57,7 @@ struct Trace {
 };
 
 
-/* function protoypes */
+/* function protoypes *********************************************************/
 
 Trace* create_trace(int type, int var, int constant, int nr);
 Trace* add(Trace* a, Trace* b);
index ba756aa7ae5b3f3295e3b9a54cf83594cf13cd3f..65c7a6644f73919b69d048322f1879c9cdb7c143 100644 (file)
@@ -1,4 +1,4 @@
-/* jit/lsra.inc - linear scan register allocator
+/* vm/jit/lsra.inc - linear scan register allocator
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
    Institut f. Computersprachen, TU Wien
@@ -27,7 +27,7 @@
 
    Authors: Christian Ullrich
 
-   $Id: lsra.inc 1597 2004-11-28 16:37:23Z christian $
+   $Id: lsra.inc 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 /* #define LSRA_PRINTLIFETIMES */
 
 
+#include <stdio.h>
+#include <stdlib.h>
+
 #ifdef LSRA_DEBUG
 #define LSRA_PRINTLIFETIMES
 #endif
 
-#include "lsra.h"
-#include "loop/graph.h"
-#include "loop/loop.h"
-#include "toolbox/memory.h"
-#include "reg.h"
-#include "options.h"
-#include "string.h"
+#include "mm/memory.h"
+#include "vm/options.h"
+#include "vm/jit/lsra.h"
+#include "vm/jit/reg.h"
+#include "vm/jit/loop/graph.h"
+#include "vm/jit/loop/loop.h"
 
-#include <stdio.h>
-#include <stdlib.h>
 
 void lsra(methodinfo *m, codegendata *cd, registerdata *rd, loopdata *ld, t_inlining_globals *id)
 {
index fe47de4cbf55874b6ac988e5c5072afb8e97fa02..f1021459259a41676176c36957bd54a055726bff 100644 (file)
@@ -1,4 +1,4 @@
-/* jit/parse.c - parser for JavaVM to intermediate code translation
+/* vm/jit/parse.c - parser for JavaVM to intermediate code translation
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
@@ -29,7 +29,7 @@
    Changes: Carolyn Oates
             Edwin Steiner
 
-   $Id: parse.c 1588 2004-11-24 14:30:21Z twisti $
+   $Id: parse.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 #include <string.h>
 
 #include "config.h"
-#include "parse.h"
-#include "global.h"
-#include "jit.h"
-#include "parseRT.h"
-#include "inline.h"
-#include "loop/loop.h"
 #include "types.h"
-#include "builtin.h"
-#include "exceptions.h"
-#include "tables.h"
-#include "native.h"
-#include "loader.h"
-#include "options.h"
-#include "statistics.h"
-#include "toolbox/memory.h"
+#include "mm/memory.h"
+#include "native/native.h"
 #include "toolbox/logging.h"
+#include "vm/builtin.h"
+#include "vm/exceptions.h"
+#include "vm/global.h"
+#include "vm/loader.h"
+#include "vm/options.h"
+#include "vm/statistics.h"
+#include "vm/tables.h"
+#include "vm/jit/jit.h"
+#include "vm/jit/parse.h"
+#include "vm/jit/inline/parseRT.h"
+#include "vm/jit/inline/inline.h"
+#include "vm/jit/loop/loop.h"
+
 
 #define METHINFO(mm) \
         { \
index 76cef308fa031d24dbcad558351f79a29be5e9fe..bcce152cda4a49cd38ff94068729244cb01a48f8 100644 (file)
@@ -26,7 +26,7 @@
 
    Author: Christian Thalinger
 
-   $Id: parse.h 1510 2004-11-17 11:33:44Z twisti $
+   $Id: parse.h 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
@@ -34,9 +34,9 @@
 #ifndef _PARSE_H
 #define _PARSE_H
 
-#include "global.h"
-#include "jit/inline.h"
-#include "jit/codegen.inc.h"
+#include "vm/global.h"
+#include "vm/jit/codegen.inc.h"
+#include "vm/jit/inline/inline.h"
 
 
 /* intermediate code generating macros */
index 1e0cd4e1f5c7e3307ba36390eda2f4961e59a749..a61971dc713b69d98628546bd3ec10e6dc0e18ed 100644 (file)
@@ -27,7 +27,7 @@
 
    Authors: Christian Thalinger
 
-   $Id: reg.h 1494 2004-11-12 13:34:26Z twisti $
+   $Id: reg.h 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
@@ -36,8 +36,9 @@
 #define _REG_H
 
 #include "types.h"
-#include "jit/codegen.inc.h"
-#include "jit/jit.h"
+#include "vm/jit/codegen.inc.h"
+#include "vm/jit/jit.h"
+#include "vm/jit/inline/inline.h"
 
 
 /************************* pseudo variable structure **************************/
index a05f2e315ab10b10c321ae6d8a5235afb1cb88b5..b189c6163545acb03627de7eb65cd953e18c0031 100644 (file)
@@ -1,4 +1,4 @@
-/* jit/reg.inc - register allocator
+/* vm/jit/reg.inc - register allocator
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    Institut f. Computersprachen, TU Wien
    Changes: Stefan Ring
             Christian Thalinger
 
-   $Id: reg.inc 1506 2004-11-14 14:48:49Z jowenn $
+   $Id: reg.inc 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 
-#include "jit/reg.h"
-#include "toolbox/memory.h"
+#include "mm/memory.h"
+#include "vm/jit/reg.h"
 
 
 /* function prototypes for this file */
index 3c1f6068a78126049b6a1adba53003494083a3a6..fb4555c7ad29b775575bb0224b3e58fbb248167f 100644 (file)
@@ -1,4 +1,4 @@
-/* jit/stack.c - stack analysis
+/* vm/jit/stack.c - stack analysis
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
 
    Changes: Edwin Steiner
 
-   $Id: stack.c 1594 2004-11-25 15:15:15Z twisti $
+   $Id: stack.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 
 #include <stdio.h>
 #include <string.h>
-#include "global.h"
-#include "native.h"
-#include "builtin.h"
+
 #include "disass.h"
-#include "tables.h"
 #include "types.h"
-#include "options.h"
-#include "statistics.h"
-#include "jit/codegen.inc.h"
-#include "jit/jit.h"
-#include "jit/stack.h"
-#include "jit/reg.h"
+#include "mm/memory.h"
+#include "native/native.h"
 #include "toolbox/logging.h"
-#include "toolbox/memory.h"
+#include "vm/global.h"
+#include "vm/builtin.h"
+#include "vm/options.h"
+#include "vm/statistics.h"
+#include "vm/tables.h"
+#include "vm/jit/codegen.inc.h"
+#include "vm/jit/jit.h"
+#include "vm/jit/reg.h"
+#include "vm/jit/stack.h"
 
 
 /**********************************************************************/
index 4bcb8968165dae417faa7689f2304de9924a3a68..49aee25e1ec479fe5b03dba6cc66aca59695430e 100644 (file)
@@ -1,4 +1,4 @@
-/* jit/stack.h - stack analysis header
+/* vm/jit/stack.h - stack analysis header
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
@@ -26,7 +26,7 @@
 
    Authors: Christian Thalinger
 
-   $Id: stack.h 1456 2004-11-05 14:33:14Z twisti $
+   $Id: stack.h 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
@@ -34,9 +34,9 @@
 #ifndef _STACK_H
 #define _STACK_H
 
-#include "exceptions.h"
-#include "global.h"
-#include "jit/reg.h"
+#include "vm/exceptions.h"
+#include "vm/global.h"
+#include "vm/jit/reg.h"
 
 
 /**********************************************************************/
index 7a0ffcadb48b630da803ed8c16a1e94134321d1c..ff81425dbdd409994d304ff62c4f659b67dc5a6c 100644 (file)
@@ -1,4 +1,4 @@
-/* genoffsets.c - generate asmpart offsets of structures
+/* vm/jit/tools/genoffsets.c - generate asmpart offsets of structures
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
 
    Changes:
 
-   $Id: genoffsets.c 1296 2004-07-10 17:02:15Z stefan $
+   $Id: genoffsets.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 
 #include <stdio.h>
+
 #include "config.h"
 #include "types.h"
-#include "global.h"
-#include "threads/thread.h"
-#include "toolbox/memory.h"
+#include "mm/memory.h"
+#include "vm/global.h"
+
+#if defined(USE_THREADS)
+# if defined(NATIVE_THREADS)
+#  include "threads/native/threads.h"
+# else
+#  include "threads/green/threads.h"
+# endif
+#endif
 
 
 int main(int argc, char **argv)
index 4c69685ec31839443e2ebdc1db18924e4299a4ae..95e81de0b3f30ea4838bbe33fa3e8225b372402c 100644 (file)
@@ -1,4 +1,4 @@
-/* jit/typecheck.c - typechecking (part of bytecode verification)
+/* vm/jit/verify/typecheck.c - typechecking (part of bytecode verification)
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
 
    Authors: Edwin Steiner
 
-   $Id: typecheck.c 1550 2004-11-19 14:26:31Z twisti $
+   $Id: typecheck.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
-#include "global.h" /* must be here because of CACAO_TYPECHECK */
+#include <string.h>
+
+#include "vm/global.h" /* must be here because of CACAO_TYPECHECK */
 
 #ifdef CACAO_TYPECHECK
 
-#include <string.h>
-#include "main.h"
-#include "builtin.h"
-#include "tables.h"
-#include "loader.h"
-#include "native.h"
 #include "types.h"
-#include "jit/jit.h"
-#include "jit/stack.h"
+/*  #include "main.h" */
+#include "mm/memory.h"
 #include "toolbox/logging.h"
-#include "toolbox/memory.h"
-#include "options.h"
+#include "native/native.h"
+#include "vm/builtin.h"
+#include "vm/loader.h"
+#include "vm/options.h"
+#include "vm/tables.h"
+#include "vm/jit/jit.h"
+#include "vm/jit/stack.h"
+
 
 /****************************************************************************/
 /* DEBUG HELPERS                                                            */
index cb448635c7c0f3591c985270df67c4dd2bebf9d5..155e33da8b63dc0e4a3fda3127ecade8f05e2a2e 100644 (file)
@@ -1,4 +1,4 @@
-/* jit/typecheck.h - type checking header
+/* vm/jit/verify/typecheck.h - type checking header
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
@@ -26,7 +26,7 @@
 
    Authors: Christian Thalinger
 
-   $Id: typecheck.h 1456 2004-11-05 14:33:14Z twisti $
+   $Id: typecheck.h 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 #ifndef _TYPECHECK_H
 #define _TYPECHECK_H
 
-#include "jit/codegen.inc.h"
+#include "vm/jit/codegen.inc.h"
 
 
-/* function prototypes */
+/* function prototypes ********************************************************/
 
 methodinfo *typecheck(methodinfo *m, codegendata *cd, registerdata *rd);
 
index 258ca1cd58f02370cb4bb5a4ba9e66f31dd99bbb..f678467a251ebff0213fb03d94a350cf3d0a6cf8 100644 (file)
@@ -1,4 +1,4 @@
-/* typeinfo.c - type system used by the type checker
+/* vm/jit/verify/typeinfo.c - type system used by the type checker
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
 
    Authors: Edwin Steiner
 
-   $Id: typeinfo.c 1296 2004-07-10 17:02:15Z stefan $
+   $Id: typeinfo.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 
-#include <stdlib.h>
 #include <string.h>
-#include "typeinfo.h"
-#include "tables.h"
-#include "loader.h"
+
+#include "mm/memory.h"
 #include "toolbox/logging.h"
-#include "toolbox/memory.h"
-#include "jit/jit.h" /* XXX move typeinfo.* into jit/ */
+#include "vm/loader.h"
+#include "vm/tables.h"
+#include "vm/jit/jit.h"
+#include "vm/jit/verify/typeinfo.h"
 
 
 #define CLASS_IMPLEMENTS_INTERFACE(cls,index)                   \
index 302a7e4b5c5cd6c1e55fc0980e15b982c6fdae87..8b95af711dc33902455759f6b9f2275375dfea69 100644 (file)
@@ -26,7 +26,7 @@
 
    Authors: Edwin Steiner
 
-   $Id: typeinfo.h 887 2004-01-19 12:14:39Z edwin $
+   $Id: typeinfo.h 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
@@ -34,7 +34,7 @@
 #ifndef _TYPEINFO_H
 #define _TYPEINFO_H
 
-#include "global.h"
+#include "vm/global.h"
 
 /* resolve typedef cycles *****************************************************/
 
index edb2b97ad948b54b8820e0c6a65fe99be25818e7..e50dbff65b504f6904745dcb6d005a829ba4c29a 100644 (file)
@@ -1,9 +1,9 @@
 ## Process this file with automake to produce Makefile.in
 
-# $Id: Makefile.am 1284 2004-07-07 15:56:17Z twisti $
+# $Id: Makefile.am 1621 2004-11-30 13:06:55Z twisti $
 
 
-INCLUDES = -I$(top_srcdir)
+INCLUDES = -I$(top_srcdir)/src
 
 EXTRA_DIST = \
        asmpart.S \
@@ -32,9 +32,8 @@ libarch_a_SOURCES = \
 asmpart.o: asmpart.S $(top_srcdir)/config.h offsets.h
        $(COMPILE) -c $<
 
-offsets.h: $(top_srcdir)/config.h $(top_srcdir)/global.h $(top_srcdir)/threads/thread.h
-       $(COMPILE) -o $(top_srcdir)/genoffsets $(top_srcdir)/genoffsets.c
-       $(top_srcdir)/genoffsets > offsets.h
+offsets.h: $(top_srcdir)/config.h $(top_srcdir)/src/vm/global.h $(top_srcdir)/src/threads/native/threads.h
+       $(top_srcdir)/src/vm/jit/tools/genoffsets > offsets.h
 
 
 ## Local variables:
index 8effc38ec91f710afe7008ebc69a62e1cb433151..cec1b9e4320cc558845656b071fecbe617c5358c 100644 (file)
@@ -1,4 +1,4 @@
-/* jit/x86_64/asmpart.S - Java-C interface functions for x86_64
+/* vm/jit/x86_64/asmpart.S - Java-C interface functions for x86_64
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    Institut f. Computersprachen, TU Wien
             Reinhard Grafl
             Christian Thalinger
 
-   $Id: asmpart.S 1581 2004-11-24 13:57:02Z twisti $
+   $Id: asmpart.S 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 
 #include "config.h"
-#include "jit/x86_64/arch.h"
-#include "jit/x86_64/offsets.h"
+#include "vm/jit/x86_64/arch.h"
+#include "vm/jit/x86_64/offsets.h"
 
 
 #define MethodPointer   -8
index 3f4a9d220981dd39f31ac9c3208702e76f589fed..36cf5371c7263986196691d3cd7f1ee2b7b4099d 100644 (file)
    Authors: Andreas Krall
             Christian Thalinger
 
-   $Id: codegen.c 1607 2004-11-29 10:11:03Z twisti $
+   $Id: codegen.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
+
 #define _GNU_SOURCE
 
-#include "global.h"
 #include <stdio.h>
-#include <signal.h>
-#include <sys/ucontext.h>
-#include "builtin.h"
-#include "asmpart.h"
-#include "jni.h"
-#include "loader.h"
-#include "tables.h"
-#include "native.h"
-#include "jit/jit.h"
-#include "jit/reg.h"
-#include "jit/parse.h"
-#include "jit/x86_64/arch.h"
-#include "jit/x86_64/codegen.h"
-#include "jit/x86_64/emitfuncs.h"
-#include "jit/x86_64/types.h"
+#include <ucontext.h>
+
+#include "native/native.h"
+/*  #include "native/jni.h" */
+#include "vm/global.h"
+#include "vm/builtin.h"
+#include "vm/loader.h"
+#include "vm/tables.h"
+#include "vm/jit/asmpart.h"
+#include "vm/jit/jit.h"
+#include "vm/jit/reg.h"
+#include "vm/jit/parse.h"
+#include "vm/jit/x86_64/arch.h"
+#include "vm/jit/x86_64/codegen.h"
+#include "vm/jit/x86_64/emitfuncs.h"
+#include "vm/jit/x86_64/types.h"
 
 
 /* register descripton - array ************************************************/
@@ -87,9 +88,9 @@ static int nregdescfloat[] = {
 
 *******************************************************************************/
 
-#include "jit/codegen.inc"
-#include "jit/reg.inc"
-#include "jit/lsra.inc"
+#include "vm/jit/codegen.inc"
+#include "vm/jit/reg.inc"
+#include "vm/jit/lsra.inc"
 
 
 #if defined(USE_THREADS) && defined(NATIVE_THREADS)
index 05c49cb7b8a0003b4159f54fe6b859e0a6a7803e..1bca63e0f1078463d24cb171c5b757652bcc9df5 100644 (file)
@@ -1,4 +1,4 @@
-/* jit/x86_64/codegen.h - code generation macros and definitions for x86_64
+/* vm/jit/x86_64/codegen.h - code generation macros and definitions for x86_64
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
@@ -27,7 +27,7 @@
    Authors: Andreas Krall
             Christian Thalinger
 
-   $Id: codegen.h 1579 2004-11-24 13:56:06Z twisti $
+   $Id: codegen.h 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
@@ -37,7 +37,7 @@
 
 #include <ucontext.h>
 
-#include "jit/jit.h"
+#include "vm/jit/jit.h"
 
 
 /* macros to create code ******************************************************/
index e1943989aa843d4afcd010a067f8e80ea29dfd82..e64db8be179b98185493bf89c309db1abffec366 100644 (file)
@@ -1,4 +1,4 @@
-/* jit/x86_64/emitfuncs.c - x86_64 code emitter functions
+/* vm/jit/x86_64/emitfuncs.c - x86_64 code emitter functions
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    Institut f. Computersprachen, TU Wien
 
    Authors: Christian Thalinger
 
-   $Id: emitfuncs.c 1526 2004-11-17 15:50:27Z twisti $
+   $Id: emitfuncs.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 
-#include "jit/jit.h"
-#include "jit/x86_64/arch.h"
-#include "jit/x86_64/emitfuncs.h"
-#include "jit/x86_64/codegen.h"
-#include "jit/x86_64/types.h"
+#include "vm/jit/jit.h"
+#include "vm/jit/x86_64/codegen.h"
+#include "vm/jit/x86_64/emitfuncs.h"
+#include "vm/jit/x86_64/types.h"
 
 
 /* code generation functions */
index 1dc64cface45796b456f24d9ae8f6cabc688cacd..94bd504804603cab98d4d4f226788b905d865512 100644 (file)
@@ -27,7 +27,7 @@
    Authors: Andreas Krall
             Christian Thalinger
 
-   $Id: emitfuncs.h 1451 2004-11-05 14:14:15Z twisti $
+   $Id: emitfuncs.h 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
@@ -35,7 +35,7 @@
 #ifndef _EMITFUNCS_H
 #define _EMITFUNCS_H
 
-#include "jit/x86_64/types.h"
+#include "vm/jit/x86_64/types.h"
 
 
 /* code generation prototypes */
index 5e9ad14d5269eb3e862d1ce66da811999c015d75..7763e56f1881132dedd7ed45d96cc3cac6dad289 100644 (file)
@@ -26,7 +26,7 @@
 
    Authors: Christian Thalinger
 
-   $Id: types.h 1580 2004-11-24 13:56:44Z twisti $
+   $Id: types.h 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
@@ -34,7 +34,7 @@
 #ifndef _CACAO_TYPES_H
 #define _CACAO_TYPES_H
 
-#include "jit/x86_64/arch.h"
+#include "vm/jit/x86_64/arch.h"
 
 
 /* define the sizes of the integer types used internally by cacao */
index dafe80ed90c1e340b2e4080ee35ff50f41a299c5..b1af3f5536a752614107eab2a709b568f395d13c 100644 (file)
@@ -1,4 +1,4 @@
-/* loader.c - class loader functions
+/* vm/loader.c - class loader functions
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
@@ -32,7 +32,7 @@
             Edwin Steiner
             Christian Thalinger
 
-   $Id: loader.c 1553 2004-11-19 15:47:13Z carolyn $
+   $Id: loader.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
 #include <string.h>
 #include <assert.h>
 #include <sys/stat.h>
-#include "exceptions.h"
-#include "global.h"
-#include "loader.h"
-#include "options.h"
-#include "native.h"
-#include "tables.h"
-#include "builtin.h"
-#include "jit/jit.h"
-#include "asmpart.h"
-#include "statistics.h"
-#include "toolbox/memory.h"
+
+#include "mm/memory.h"
+#include "native/native.h"
+#include "native/include/java_lang_Throwable.h"
+
+#if defined(USE_THREADS)
+# if defined(NATIVE_THREADS)
+#  include "threads/native/threads.h"
+# else
+#  include "threads/green/threads.h"
+#  include "threads/green/locks.h"
+# endif
+#endif
+
 #include "toolbox/logging.h"
-#include "threads/thread.h"
-#include "threads/locks.h"
-#include "nat/java_lang_Throwable.h"
+#include "vm/exceptions.h"
+#include "vm/builtin.h"
+#include "vm/global.h"
+#include "vm/loader.h"
+#include "vm/options.h"
+#include "vm/statistics.h"
+#include "vm/tables.h"
 
-#ifdef USE_ZLIB
-#include "unzip.h"
+#if defined(USE_ZLIB)
+#include "vm/unzip.h"
 #endif
 
+#include "vm/jit/asmpart.h"
+#include "vm/jit/jit.h"
+
+
 #undef JOWENN_DEBUG
 #undef JOWENN_DEBUG1
 #undef JOWENN_DEBUG2
index 82cbec2aff3650283ff6b8760c4a43484541cc04..9bea53485aa58994eac9f34cd127862c6109adc0 100644 (file)
@@ -1,4 +1,4 @@
-/* options.h - define global options extern
+/* vm/options.h - define global options extern
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    Institut f. Computersprachen, TU Wien
@@ -27,7 +27,7 @@
 
    Authors: Christian Thalinger
 
-   $Id: options.h 1590 2004-11-25 13:24:49Z christian $
+   $Id: options.h 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
@@ -36,7 +36,7 @@
 #define _OPTIONS_H
 
 
-#include "global.h"
+#include "vm/global.h"
 
 
 /* reserved option numbers ****************************************************/
@@ -83,7 +83,7 @@ extern bool showdisassemble;
 extern bool showddatasegment;
 extern bool showintermediate;
 
-/*#undef INAFTERMAIN  /*use to inline system methods before main is called*/
+/*#undef INAFTERMAIN*/  /*use to inline system methods before main is called*/
 #define INAFTERMAIN T /*use to turn off inlining before main called */
 extern bool useinliningm;
 extern bool useinlining;
index 9cbd95e9ae8a8ea4091834cbc91f074b72abf05b..9a61952107d042db815ceca849cef1228166254f 100644 (file)
@@ -1,4 +1,4 @@
-/* tables.c - 
+/* vm/tables.c - 
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
        - the heap
        - additional support functions
 
-   $Id: tables.c 1482 2004-11-11 14:39:13Z twisti $
+   $Id: tables.c 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
-#include "global.h"
-
 #include <string.h>
 #include <stdlib.h>
 #include <assert.h>
 #include <sys/types.h>
 #include <sys/mman.h>
 #include <unistd.h>
-#include "builtin.h"
-#include "exceptions.h"
+
 #include "types.h"
-#include "native.h"
-#include "options.h"
-#include "tables.h"
-#include "loader.h"
-#include "asmpart.h"
-#include "statistics.h"
-#include "threads/thread.h"
-#include "threads/locks.h"
+#include "mm/memory.h"
+#include "native/native.h"
 #include "toolbox/logging.h"
-#include "toolbox/memory.h"
+#include "vm/builtin.h"
+#include "vm/exceptions.h"
+#include "vm/global.h"
+#include "vm/loader.h"
+#include "vm/options.h"
+#include "vm/statistics.h"
+#include "vm/tables.h"
 
 
 hashtable utf_hash;     /* hashtable for utf8-symbols */