* configure.ac (static-classpath): Removed.
authorChristian Thalinger <twisti@complang.tuwien.ac.at>
Wed, 5 Sep 2007 14:46:18 +0000 (16:46 +0200)
committerChristian Thalinger <twisti@complang.tuwien.ac.at>
Wed, 5 Sep 2007 14:46:18 +0000 (16:46 +0200)
* src/cacao/Makefile.am,
src/native/Makefile.am,
src/native/include/Makefile.am: Removed WITH_STATIC_CLASSPATH if's.

* src/native/native.c (native_findfunction): Removed.
* src/native/native.h (nativeref, nativecompref): Removed.
(native_findfunction): Removed.

* src/native/tools/Makefile.am: Removed.
* src/native/tools/gennativetable.c: Likewise.

* src/cacao/cacao.c,
src/vm/jit/alpha/codegen.c,
src/vm/jit/alpha/patcher.c,
src/vm/jit/arm/codegen.c,
src/vm/jit/arm/patcher.c,
src/vm/jit/i386/codegen.c,
src/vm/jit/i386/patcher.c,
src/vm/jit/intrp/java.vmg,
src/vm/jit/intrp/patcher.c,
src/vm/jit/jit.c,
src/vm/jit/m68k/codegen.c,
src/vm/jit/m68k/patcher.c,
src/vm/jit/mips/codegen.c,
src/vm/jit/mips/patcher.c,
src/vm/jit/patcher-common.h,
src/vm/jit/patcher.h,
src/vm/jit/powerpc/codegen.c,
src/vm/jit/powerpc/patcher.c,
src/vm/jit/powerpc64/codegen.c,
src/vm/jit/powerpc64/patcher.c,
src/vm/jit/s390/codegen.c,
src/vm/jit/s390/patcher.c,
src/vm/jit/sparc64/codegen.c,
src/vm/jit/sparc64/patcher.c,
src/vm/jit/x86_64/codegen.c,
src/vm/jit/x86_64/patcher.c,
src/vm/properties.c: Removed WITH_STATIC_CLASSPATH #ifdef's.

35 files changed:
configure.ac
src/cacao/Makefile.am
src/cacao/cacao.c
src/native/Makefile.am
src/native/include/Makefile.am
src/native/native.c
src/native/native.h
src/native/tools/Makefile.am [deleted file]
src/native/tools/gennativetable.c [deleted file]
src/vm/jit/alpha/codegen.c
src/vm/jit/alpha/patcher.c
src/vm/jit/arm/codegen.c
src/vm/jit/arm/patcher.c
src/vm/jit/i386/codegen.c
src/vm/jit/i386/patcher.c
src/vm/jit/intrp/java.vmg
src/vm/jit/intrp/patcher.c
src/vm/jit/jit.c
src/vm/jit/m68k/codegen.c
src/vm/jit/m68k/patcher.c
src/vm/jit/mips/codegen.c
src/vm/jit/mips/patcher.c
src/vm/jit/patcher-common.h
src/vm/jit/patcher.h
src/vm/jit/powerpc/codegen.c
src/vm/jit/powerpc/patcher.c
src/vm/jit/powerpc64/codegen.c
src/vm/jit/powerpc64/patcher.c
src/vm/jit/s390/codegen.c
src/vm/jit/s390/patcher.c
src/vm/jit/sparc64/codegen.c
src/vm/jit/sparc64/patcher.c
src/vm/jit/x86_64/codegen.c
src/vm/jit/x86_64/patcher.c
src/vm/properties.c

index dee41dcb28223782744a6ee8146b2b821bf4c7e7..b5413e8b11cb49b41164ebdb34739f7bbd72bad9 100644 (file)
@@ -349,15 +349,13 @@ AC_DEFINE_UNQUOTED([CACAO_LIBDIR], "${CACAO_LIBDIR}", [library installation pref
 AC_SUBST(CACAO_LIBDIR)
 
 
-dnl Features
+AC_CHECK_ENABLE_LTDL
 
 AC_CHECK_ENABLE_JAVA
 AC_CHECK_ENABLE_JIT
 
-dnl with-options
 AC_CHECK_WITH_CACAOH
 
-dnl check for stuff that should be done in software
 AC_CHECK_SOFTFLOAT
 AC_CHECK_SOFT_FLOAT_CMP
 AC_CHECK_SOFT_DOUBLE_CMP
@@ -872,29 +870,6 @@ AC_CHECK_WITH_CLASSPATH_INCLUDEDIR
 AC_CHECK_WITH_JRE_LAYOUT
 
 
-dnl check if GNU Classpath should be linked statically into CACAO
-AC_MSG_CHECKING(whether to link GNU Classpath native libraries statically into CACAO)
-AC_ARG_WITH([static-classpath],
-            [AS_HELP_STRING(--with-static-classpath,link GNU classpath native libraries statically into CACAO [[default=no]])],
-            [case "${enableval}" in
-                yes) WITH_STATIC_CLASSPATH=yes;;
-                *) WITH_STATIC_CLASSPATH=no;;
-             esac],
-            [WITH_STATIC_CLASSPATH=no])
-AC_MSG_RESULT(${WITH_STATIC_CLASSPATH})
-
-if test x"${WITH_STATIC_CLASSPATH}" = "xyes"; then
-    AC_DEFINE([WITH_STATIC_CLASSPATH], 1, [link GNU classpath native libraries statically into CACAO])
-
-    dnl check for some classpath related stuff when we link statically
-    AM_ICONV_LINK
-else
-    AC_CHECK_ENABLE_LTDL
-fi
-AM_CONDITIONAL([WITH_STATIC_CLASSPATH], test x"${WITH_STATIC_CLASSPATH}" = "xyes")
-AC_SUBST(WITH_STATIC_CLASSPATH)
-
-
 dnl check for some programs we need
 
 case "${WITH_CLASSPATH}" in
@@ -950,7 +925,6 @@ AC_CONFIG_FILES([Makefile]
                [src/native/Makefile]
                [src/native/include/Makefile]
                [src/native/jvmti/Makefile]
-               [src/native/tools/Makefile]
                [src/native/vm/Makefile]
                [src/native/vm/cldc1.1/Makefile]
                [src/native/vm/gnu/Makefile]
index 780ee621317aad9c0d1cb2592a35be60b55ba3a6..16529cdceba3c2d99abd757a7e83f6adb2e9be1b 100644 (file)
@@ -67,35 +67,6 @@ CACAO_LIBS = \
        libjvm.la
 endif
 
-if WITH_STATIC_CLASSPATH
-cacao_LDFLAGS += \
-       $(LTLIBICONV)
-
-CLASSPATH_LIBS = \
-       $(CLASSPATH_LIBDIR)/classpath/libjavaio.a \
-       $(CLASSPATH_LIBDIR)/classpath/libjavanio.a \
-       $(CLASSPATH_LIBDIR)/classpath/libjavanet.a \
-       $(CLASSPATH_LIBDIR)/classpath/libjavautil.a \
-       $(CLASSPATH_LIBDIR)/classpath/libjavalang.a \
-       $(CLASSPATH_LIBDIR)/classpath/libjavalangreflect.a
-
-CACAO_LIBS += \
-       $(CLASSPATH_LIBS)
-
-#if USE_GTK_PEER
-#cacao_CFLAGS = \
-#      $(GTK_CFLAGS) $(CAIRO_CFLAGS) $(PANGOFT2_CFLAGS) \
-#      $(XML_CFLAGS) $(XSLT_CFLAGS)
-#
-#cacao_LDFLAGS += \
-#      $(GTK_LIBS) $(CAIRO_LIBS) $(PANGOFT2_LIBS) $(X_LIBS) -lXtst \
-#      $(XML_LIBS) $(XSLT_LIBS)
-#
-#CLASSPATH_LIBS += \
-#      $(CLASSPATH_LIBDIR)/classpath/libgtkpeer.a
-#endif
-endif
-
 if ENABLE_RT_TIMING
 cacao_LDFLAGS += -lrt
 endif
index ac005387bfbc27aad3c8abd55b6ee0ed5f59559f..8ab94aaedf97396bfe5a04fd18b4478cd337ebf5 100644 (file)
@@ -67,7 +67,7 @@ static JavaVMInitArgs *cacao_options_prepare(int argc, char **argv);
 
 int main(int argc, char **argv)
 {
-#if defined(ENABLE_LIBJVM) && !defined(WITH_STATIC_CLASSPATH)
+#if defined(ENABLE_LIBJVM)
        char           *path;
 #endif
 
@@ -92,7 +92,7 @@ int main(int argc, char **argv)
        
        /* load and initialize a Java VM, return a JNI interface pointer in env */
 
-#if defined(ENABLE_LIBJVM) && !defined(WITH_STATIC_CLASSPATH)
+#if defined(ENABLE_LIBJVM)
 # if defined(WITH_JRE_LAYOUT)
        /* SUN also uses a buffer of 4096-bytes (strace is your friend). */
 
@@ -166,7 +166,7 @@ int main(int argc, char **argv)
        if (jvmti) jvmti_set_phase(JVMTI_PHASE_START);
 #endif
 
-#if !defined(WITH_STATIC_CLASSPATH) && defined(ENABLE_LIBJVM)
+#if defined(ENABLE_LIBJVM)
        if (!(libjvm_vm_run = lt_dlsym(libjvm_handle, "vm_run"))) {
                fprintf(stderr, "lt_dlsym failed: %s\n", lt_dlerror());
                abort();
index 1c19fa66fc76acd7a29b8a92426b909d7ce83cac..8cb17b562df183739d54a40fd245c2e5e35fdb52 100644 (file)
@@ -31,28 +31,11 @@ SUBDIRS = \
        include \
        vm
 
-CLEANFILES = \
-       nativetable.inc
-
 if ENABLE_JVMTI
 SUBDIRS += jvmti
 JVMTI_LIB = jvmti/libjvmti.la
 endif
 
-if WITH_STATIC_CLASSPATH
-SUBDIRS += tools
-
-GENNATIVETABLE=$(top_builddir)/src/native/tools/gennativetable
-
-CLASSPATH = $(top_builddir)/src/lib/classes/:$(CLASSPATH_GLIBJ_ZIP)
-
-$(srcdir)/native.c: nativetable.inc
-
-nativetable.inc: $(CACAO_VM_ZIP) $(CLASSPATH_GLIBJ_ZIP) $(top_builddir)/src/native/tools/gennativetable
-       echo    $(GENNATIVETABLE) -bootclasspath $(CLASSPATH) > $(top_builddir)/src/native/nativetable.inc
-       if `$(GENNATIVETABLE) -bootclasspath $(CLASSPATH) > $(top_builddir)/src/native/nativetable.inc` ; then true; else rm -f $(top_builddir)/src/native/nativetable.inc; exit 1; fi
-endif
-
 noinst_LTLIBRARIES = libnative.la
 
 if ENABLE_JNI
index ed0577cb02f06746f282c21e1758ae6b173b21a6..83462b109dee3c46bcf08081f351c0240af5f5e5 100644 (file)
@@ -122,21 +122,6 @@ ADDITIONAL_IMPLEMENTED_VM_CLASSES_HEADER_FILES = \
        java_security_VMAccessController.h
 endif
 
-ADDITIONAL_STATIC_CLASSPATH_HEADER_FILES = \
-       java_net_DatagramPacket.h \
-       java_net_InetAddress.h \
-       \
-       gnu_java_net_PlainDatagramSocketImpl.h \
-       gnu_java_net_PlainSocketImpl.h \
-       gnu_java_nio_PipeImpl.h \
-       gnu_java_nio_channels_FileChannelImpl.h \
-       gnu_java_nio_charset_iconv_IconvEncoder.h \
-       gnu_java_nio_charset_iconv_IconvDecoder.h \
-       java_lang_VMProcess.h \
-       java_net_SocketImpl.h \
-       java_nio_MappedByteBufferImpl.h \
-       java_nio_channels_spi_SelectorProvider.h
-
 CLEANFILES = \
        *.h
 
@@ -159,11 +144,6 @@ DO_HEADER_FILES += \
        $(GEN_JVMTI_HEADER_FILES)
 endif
 
-if WITH_STATIC_CLASSPATH
-DO_HEADER_FILES += \
-       $(ADDITIONAL_STATIC_CLASSPATH_HEADER_FILES)
-endif
-
 if WITH_CLASSPATH_GNU
 CLASSPATH = $(top_builddir)/src/lib/classes/:$(CLASSPATH_CLASSES)
 VM_ZIP = $(top_builddir)/src/lib/vm.zip
index 072ef81fe8730758cc423a19d2c6ce21a5d415e4..fbe258afe6506e36357cf478eb9620c036ec308a 100644 (file)
 #endif
 
 
-/* include table of native functions ******************************************/
-
-#if defined(WITH_STATIC_CLASSPATH)
-# include "native/nativetable.inc"
-#endif
-
-
-/* tables for methods *********************************************************/
-
-#if defined(WITH_STATIC_CLASSPATH)
-#define NATIVETABLESIZE  (sizeof(nativetable)/sizeof(struct nativeref))
-
-/* table for fast string comparison */
-static nativecompref nativecomptable[NATIVETABLESIZE];
-
-/* string comparsion table initialized */
-static bool nativecompdone = false;
-#endif
-
-
 /* global variables ***********************************************************/
 
 static avl_tree_t *tree_native_methods;
@@ -184,7 +164,6 @@ static s4 native_tree_native_methods_comparator(const void *treenode, const void
 
 *******************************************************************************/
 
-#if !defined(WITH_STATIC_CLASSPATH)
 static utf *native_make_overloaded_function(utf *name, utf *descriptor)
 {
        char *newname;
@@ -680,63 +659,6 @@ hashtable_library_name_entry *native_library_find(utf *filename,
 
        return ne;
 }
-#endif /* !defined(WITH_STATIC_CLASSPATH) */
-
-
-/* native_findfunction *********************************************************
-
-   Looks up a method (must have the same class name, method name,
-   descriptor and 'static'ness) and returns a function pointer to it.
-   Returns: function pointer or NULL (if there is no such method)
-
-   Remark: For faster operation, the names/descriptors are converted
-   from C strings to Unicode the first time this function is called.
-
-*******************************************************************************/
-
-#if defined(WITH_STATIC_CLASSPATH)
-functionptr native_findfunction(utf *cname, utf *mname, utf *desc,
-                                                               bool isstatic)
-{
-       /* entry of table for fast string comparison */
-       struct nativecompref *n;
-       s4 i;
-
-       isstatic = isstatic ? true : false;
-       
-       if (!nativecompdone) {
-               for (i = 0; i < NATIVETABLESIZE; i++) {
-                       nativecomptable[i].classname  = 
-                               utf_new_char(nativetable[i].classname);
-
-                       nativecomptable[i].methodname = 
-                               utf_new_char(nativetable[i].methodname);
-
-                       nativecomptable[i].descriptor =
-                               utf_new_char(nativetable[i].descriptor);
-
-                       nativecomptable[i].isstatic   = nativetable[i].isstatic;
-                       nativecomptable[i].func       = nativetable[i].func;
-               }
-
-               nativecompdone = true;
-       }
-
-       for (i = 0; i < NATIVETABLESIZE; i++) {
-               n = &(nativecomptable[i]);
-
-               if (cname == n->classname && mname == n->methodname &&
-                   desc == n->descriptor && isstatic == n->isstatic)
-                       return n->func;
-       }
-
-       /* no function was found, throw exception */
-
-       exceptions_throw_unsatisfiedlinkerror(mname);
-
-       return NULL;
-}
-#endif /* defined(WITH_STATIC_CLASSPATH) */
 
 
 /* native_resolve_function *****************************************************
@@ -879,7 +801,7 @@ functionptr native_resolve_function(methodinfo *m)
 
        return f;
 }
-#endif /* !defined(WITH_STATIC_CLASSPATH) */
+#endif
 
 
 /* native_new_and_init *********************************************************
index 1f721b1773dbdd40d842e3b072eda0c56995adbc..822d9bd9f17a9cd1828e596b041a4b36423b5ae9 100644 (file)
 #define NATIVE_METHODS_COUNT    sizeof(methods) / sizeof(JNINativeMethod)
 
 
-/* table for locating native methods */
-
-#if defined(WITH_STATIC_CLASSPATH)
-typedef struct nativeref nativeref;
-typedef struct nativecompref nativecompref;
-#endif
-
-
 /* native_methods_node_t ******************************************************/
 
 typedef struct native_methods_node_t native_methods_node_t;
@@ -96,25 +88,6 @@ struct hashtable_library_name_entry {
 #endif
 
 
-struct nativeref {
-       char       *classname;
-       char       *methodname;
-       char       *descriptor;
-       bool        isstatic;
-       functionptr func;
-};
-
-/* table for fast string comparison */
-
-struct nativecompref {
-       utf        *classname;
-       utf        *methodname;
-       utf        *descriptor;
-       bool        isstatic;
-       functionptr func;
-};
-
-
 /* function prototypes ********************************************************/
 
 bool native_init(void);
@@ -122,27 +95,17 @@ bool native_init(void);
 void native_method_register(utf *classname, const JNINativeMethod *methods,
                                                        int32_t count);
 
-#if defined(WITH_STATIC_CLASSPATH)
-
-functionptr native_findfunction(utf *cname, utf *mname, utf *desc,
-                                                               bool isstatic);
-
-#else /* defined(WITH_STATIC_CLASSPATH) */
-
-# if defined(ENABLE_LTDL)
+#if defined(ENABLE_LTDL)
 lt_dlhandle native_library_open(utf *filename);
 void        native_library_add(utf *filename, classloader *loader,
                                                           lt_dlhandle handle);
 hashtable_library_name_entry *native_library_find(utf *filename,
                                                                                                  classloader *loader);
-# endif
+#endif
 
 functionptr native_resolve_function(methodinfo *m);
 
-#endif /* defined(WITH_STATIC_CLASSPATH) */
-
 java_handle_t *native_new_and_init(classinfo *c);
-
 java_handle_t *native_new_and_init_string(classinfo *c, java_handle_t *s);
 
 #endif /* _NATIVE_H */
diff --git a/src/native/tools/Makefile.am b/src/native/tools/Makefile.am
deleted file mode 100644 (file)
index c789dbc..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-## src/native/tools/Makefile.am
-##
-## Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
-## C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
-## E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
-## J. Wenninger, Institut f. Computersprachen - TU Wien
-##
-## This file is part of CACAO.
-##
-## This program is free software; you can redistribute it and/or
-## modify it under the terms of the GNU General Public License as
-## published by the Free Software Foundation; either version 2, or (at
-## your option) any later version.
-##
-## This program is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-## 02110-1301, USA.
-##
-## Contact: cacao@cacaojvm.org
-##
-## Authors: Christian Thalinger
-
-
-AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR)/$(OS_DIR) -I$(top_builddir)/src
-
-LIBS =
-
-noinst_PROGRAMS = gennativetable
-
-gennativetable_SOURCES = gennativetable.c
-
-gennativetable_LDADD = \
-       $(top_builddir)/src/cacaoh/libcacaoh.la \
-       $(top_builddir)/src/fdlibm/libfdlibm.la
-
-gennativetable_DEPENDENCIES = \
-       $(gennativetable_LDADD)
-
-
-## Local variables:
-## mode: Makefile
-## indent-tabs-mode: t
-## c-basic-offset: 4
-## tab-width: 8
-## compile-command: "automake --add-missing"
-## End:
diff --git a/src/native/tools/gennativetable.c b/src/native/tools/gennativetable.c
deleted file mode 100644 (file)
index 7a9fe12..0000000
+++ /dev/null
@@ -1,344 +0,0 @@
-/* src/native/tools/gennativetable.c - generate nativetable.h for native.c
-
-   Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
-   C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
-   E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
-   J. Wenninger, Institut f. Computersprachen - TU Wien
-
-   This file is part of CACAO.
-
-   This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2, or (at
-   your option) any later version.
-
-   This program is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-   02110-1301, USA.
-
-   Contact: cacao@cacaojvm.org
-
-   Authors: Christian Thalinger
-
-   Changes:
-
-*/
-
-
-#include "config.h"
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "vm/types.h"
-
-#include "cacaoh/headers.h"
-#include "mm/gc-common.h"
-#include "mm/memory.h"
-
-#if defined(ENABLE_THREADS)
-# include "threads/native/threads.h"
-#endif
-
-#include "toolbox/chain.h"
-#include "vm/classcache.h"
-#include "vm/exceptions.h"
-#include "vm/global.h"
-#include "vm/loader.h"
-#include "vm/options.h"
-#include "vm/stringlocal.h"
-#include "vm/suck.h"
-
-
-/* define heap sizes **********************************************************/
-
-#define HEAP_MAXSIZE      4 * 1024 * 1024   /* default 4MB                    */
-#define HEAP_STARTSIZE    100 * 1024        /* default 100kB                  */
-
-#define ACC_NATIVELY_OVERLOADED    0x10000000
-
-
-/* define cacaoh options ******************************************************/
-
-enum {
-       OPT_HELP,
-       OPT_VERSION,
-       OPT_VERBOSE,
-       OPT_BOOTCLASSPATH,
-
-       DUMMY
-};
-
-
-opt_struct opts[] = {
-       { "help",             false, OPT_HELP          },
-       { "version",          false, OPT_VERSION       },
-       { "verbose",          false, OPT_VERBOSE       },
-       { "bootclasspath",    true,  OPT_BOOTCLASSPATH },
-       { NULL,               false, 0                 }
-};
-
-
-static JavaVMInitArgs *gennativetable_options_prepare(int argc, char **argv);
-
-
-int main(int argc, char **argv)
-{
-       JavaVMInitArgs *vm_args;
-       char *bootclasspath;
-
-       chain *nativemethod_chain;
-       classcache_name_entry *nmen;
-       classcache_class_entry *clsen;
-       classinfo *c;
-       s4 i;
-       s4 j;
-       u4 slot;
-       methodinfo *m;
-       methodinfo *m2;
-       bool nativelyoverloaded;
-
-#if defined(DISABLE_GC)
-       gc_init(HEAP_MAXSIZE, HEAP_STARTSIZE);
-#endif
-
-       vm_args = gennativetable_options_prepare(argc, argv);
-
-       while ((i = options_get(opts, vm_args)) != OPT_DONE) {
-               switch (i) {
-               case OPT_IGNORE:
-                       break;
-
-               case OPT_HELP:
-/*                     usage(); */
-                       break;
-
-               case OPT_BOOTCLASSPATH:
-                       bootclasspath = MNEW(char, strlen(opt_arg) + strlen("0"));
-                       strcpy(bootclasspath, opt_arg);
-                       break;
-
-               case OPT_VERSION:
-/*                     version(); */
-                       break;
-
-               case OPT_VERBOSE:
-                       opt_verbose = true;
-                       loadverbose = true;
-                       linkverbose = true;
-                       break;
-
-               default:
-/*                     usage(); */
-                       ;
-               }
-       }
-
-       /* initialize the garbage collector */
-
-       gc_init(HEAP_MAXSIZE, HEAP_STARTSIZE);
-
-#if defined(ENABLE_THREADS)
-       threads_preinit();
-#endif
-
-       /* initialize the string hashtable stuff: lock (must be done
-          _after_ threads_preinit) */
-
-       if (!string_init())
-               throw_main_exception_exit();
-
-       /* initialize the utf8 hashtable stuff: lock, often used utf8 strings
-          (must be done _after_ threads_preinit) */
-
-       if (!utf8_init())
-               throw_main_exception_exit();
-
-       /* initialize the classcache hashtable stuff: lock, hashtable
-          (must be done _after_ threads_preinit) */
-
-       if (!classcache_init())
-               throw_main_exception_exit();
-
-       /* initialize the loader with bootclasspath (must be done _after_
-          thread_preinit) */
-
-       if (!suck_init())
-               throw_main_exception_exit();
-
-       suck_add(bootclasspath);
-
-       /* initialize the loader subsystems (must be done _after_
-       classcache_init) */
-
-       if (!loader_init())
-               throw_main_exception_exit();
-
-
-       /*********************** Load JAVA classes  **************************/
-
-       nativemethod_chain = chain_new();
-       ident_chain = chain_new();
-
-       /* load all classes from bootclasspath */
-
-       loader_load_all_classes();
-
-       /* link all classes */
-
-       for (slot = 0; slot < hashtable_classcache.size; slot++) {
-               nmen = (classcache_name_entry *) hashtable_classcache.ptr[slot];
-
-               for (; nmen; nmen = nmen->hashlink) {
-                       /* iterate over all class entries */
-
-                       for (clsen = nmen->classes; clsen; clsen = clsen->next) {
-                               c = clsen->classobj;
-
-                               if (c == NULL)
-                                       continue;
-
-                               /* find overloaded methods */
-
-                               for (i = 0; i < c->methodscount; i++) {
-                                       m = &(c->methods[i]);
-
-                                       if (!(m->flags & ACC_NATIVE))
-                                               continue;
-
-                                       if (!(m->flags & ACC_NATIVELY_OVERLOADED)) {
-                                               nativelyoverloaded = false;
-                               
-                                               for (j = i + 1; j < c->methodscount; j++) {
-                                                       m2 = &(c->methods[j]);
-
-                                                       if (!(m2->flags & ACC_NATIVE))
-                                                               continue;
-
-                                                       if (m->name == m2->name) {
-                                                               m2->flags          |= ACC_NATIVELY_OVERLOADED;
-                                                               nativelyoverloaded  = true;
-                                                       }
-                                               }
-
-                                               if (nativelyoverloaded == true)
-                                                       m->flags |= ACC_NATIVELY_OVERLOADED;
-                                       }
-                               }
-
-                               for (j = 0; j < c->methodscount; j++) {
-                                       m = &(c->methods[j]);
-
-                                       if (m->flags & ACC_NATIVE) {
-                                               chain_addlast(nativemethod_chain, m);
-                                       }
-                               }
-                       }
-               }
-       }
-
-       /* create table of native-methods */
-
-       file = stdout;
-
-       fprintf(file, "/* This file is machine generated, don't edit it! */\n\n"); 
-
-       m = chain_first(nativemethod_chain);
-
-       while (m) {
-               printmethod(m);
-               m = chain_next(nativemethod_chain);
-       }
-
-       fprintf(file, "static nativeref nativetable[] = {\n");
-
-       m = chain_first(nativemethod_chain);
-
-       while (m) {
-        fprintf(file, "   { \"");
-
-               print_classname(m->class);
-               fprintf(file, "\",\n     \"");
-               utf_fprint_printable_ascii(file, m->name);
-               fprintf(file, "\",\n     \"");
-               utf_fprint_printable_ascii(file, m->descriptor);
-               fprintf(file, "\",\n     ");
-
-               if (m->flags & ACC_STATIC)
-                       fprintf(file, "true");
-               else
-                       fprintf(file, "false");
-
-               fprintf(file, ",\n     ");
-               fprintf(file, "(functionptr) Java_");
-               printID(m->class->name);
-               fprintf(file, "_");
-               printID(m->name);
-        
-               if (m->flags & ACC_NATIVELY_OVERLOADED)
-                       printOverloadPart(m->descriptor);
-
-               fprintf(file,"\n   },\n");
-
-               m = chain_next(nativemethod_chain);
-       }
-
-       chain_free(nativemethod_chain);
-
-       fprintf(file, "};\n");
-
-       fclose(file);
-       
-       /* release all resources */
-
-       loader_close();
-
-       /* everything is ok */
-
-       return 0;
-}
-
-
-/* gennativetable_options_prepare **********************************************
-
-   Prepare the JavaVMInitArgs.
-
-*******************************************************************************/
-
-static JavaVMInitArgs *gennativetable_options_prepare(int argc, char **argv)
-{
-       JavaVMInitArgs *vm_args;
-       s4              i;
-
-       vm_args = NEW(JavaVMInitArgs);
-
-       vm_args->nOptions = argc - 1;
-       vm_args->options  = MNEW(JavaVMOption, argc);
-
-       for (i = 1; i < argc; i++)
-               vm_args->options[i - 1].optionString = argv[i];
-
-       return vm_args;
-}
-
-
-/*
- * These are local overrides for various environment variables in Emacs.
- * Please do not remove this and leave it at the end of the file, where
- * Emacs will automagically detect them.
- * ---------------------------------------------------------------------
- * Local variables:
- * mode: c
- * indent-tabs-mode: t
- * c-basic-offset: 4
- * tab-width: 4
- * End:
- */
index 269e8a7b320a6442a3008a5ac3553d1149a94cd6..73c4aedc3af2a7d964f8398cb318c303f4007055 100644 (file)
@@ -3347,10 +3347,8 @@ void codegen_emit_stub_native(jitdata *jd, methoddesc *nmd, functionptr f)
 
        funcdisp = dseg_add_functionptr(cd, f);
 
-#if !defined(WITH_STATIC_CLASSPATH)
        if (f == NULL)
                patcher_add_patch_ref(jd, PATCHER_resolve_native_function, m, funcdisp);
-#endif
 
 #if defined(ENABLE_GC_CACAO)
        /* Save callee saved integer registers in stackframeinfo (GC may
index 74e97e60517031d065a646e8b20c2b70340268e7..59a9527895ea46ba75156eb8044b31b4620a9fee 100644 (file)
@@ -238,7 +238,6 @@ bool patcher_resolve_classref_to_flags(patchref_t *pr)
 
 *******************************************************************************/
 
-#if !defined(WITH_STATIC_CLASSPATH)
 bool patcher_resolve_native_function(patchref_t *pr)
 {
        methodinfo  *m;
@@ -263,7 +262,6 @@ bool patcher_resolve_native_function(patchref_t *pr)
 
        return true;
 }
-#endif /* !defined(WITH_STATIC_CLASSPATH) */
 
 
 /* patcher_get_putstatic *******************************************************
index a0be6d723f20974e989e0f41418cf42a4c3ce057..6325dfbb7a0421e961a0e580b3b9e52ebc8d33b1 100644 (file)
@@ -3109,14 +3109,12 @@ void codegen_emit_stub_native(jitdata *jd, methoddesc *nmd, functionptr f)
 
        funcdisp = dseg_add_functionptr(cd, f);
 
-#if !defined(WITH_STATIC_CLASSPATH)
        if (f == NULL) {
                patcher_add_patch_ref(jd, PATCHER_resolve_native_function, m, funcdisp);
 
                if (opt_showdisassemble)
                        M_NOP;
        }
-#endif
 
 #if defined(ENABLE_GC_CACAO)
        /* Save callee saved integer registers in stackframeinfo (GC may
index 66510fd6fdea33f0daf7f09d3b6ea7c360fb5482..e4efe479bfe1da0446d81cf54ccbdf6e5636158b 100644 (file)
@@ -530,7 +530,6 @@ bool patcher_resolve_class(patchref_t *pr)
 
 *******************************************************************************/
 
-#if !defined(WITH_STATIC_CLASSPATH)
 bool patcher_resolve_native_function(patchref_t *pr)
 {
        methodinfo  *m;
@@ -555,7 +554,6 @@ bool patcher_resolve_native_function(patchref_t *pr)
 
        return true;
 }
-#endif /* !defined(WITH_STATIC_CLASSPATH) */
 
 
 /*
index 35fbdfa074ce041b09d3b2f4f07b69f86b81e0ac..f68f8e21af74113deae440daae46d26537172cb2 100644 (file)
@@ -3736,10 +3736,8 @@ void codegen_emit_stub_native(jitdata *jd, methoddesc *nmd, functionptr f)
 
        /* get function address (this must happen before the stackframeinfo) */
 
-#if !defined(WITH_STATIC_CLASSPATH)
        if (f == NULL)
                codegen_addpatchref(cd, PATCHER_resolve_native, m, 0);
-#endif
 
        M_AST_IMM((ptrint) f, REG_SP, 4 * 4);
 
index 42f138e1d63aab9d4d4e49c11b7bd3f219a872cd..95131cecfb3323a50a0c5b78383fc2bfd5d962a7 100644 (file)
@@ -972,7 +972,6 @@ bool patcher_athrow_areturn(u1 *sp)
 
 *******************************************************************************/
 
-#if !defined(WITH_STATIC_CLASSPATH)
 bool patcher_resolve_native(u1 *sp)
 {
        u1          *ra;
@@ -1007,7 +1006,6 @@ bool patcher_resolve_native(u1 *sp)
 
        return true;
 }
-#endif /* !defined(WITH_STATIC_CLASSPATH) */
 
 
 /*
index a6921155f04ff3e87204a1979f03c77fd29fcb21..597d23077990256e7e8952ab1d2eea08a8dfd62a 100644 (file)
@@ -1839,7 +1839,6 @@ if (*exceptionptr)
   THROW0;
 
 PATCHER_NATIVECALL ( #am #af #addrcif ... -- )
-#if !defined(WITH_STATIC_CLASSPATH)
 stackframeinfo sfi;
 bool result;
 global_sp = sp;
@@ -1853,9 +1852,6 @@ STORE_ORDER_BARRIER();
 IP[-4] = opt_verbosecall ? INST_ADDR(TRACENATIVECALL) : INST_ADDR(NATIVECALL);
 SET_IP(IP - 4);
 patchersuper_rewrite(IP);
-#else
-assert(false);
-#endif
 
 TRACECALL ( #am -- )
 #if !defined(NDEBUG)
index 51d34cbf0ff22b898c570284a8bdb960b32fb3bc..9e02efddb30c84e9792fde43e0944b34da3988da 100644 (file)
@@ -350,7 +350,6 @@ bool intrp_patcher_checkcast_instanceof(u1 *sp)
 
 *******************************************************************************/
 
-#if !defined(WITH_STATIC_CLASSPATH)
 bool intrp_patcher_resolve_native(u1 *sp)
 {
        ptrint      *ip;
@@ -371,7 +370,6 @@ bool intrp_patcher_resolve_native(u1 *sp)
 
        return true;
 }
-#endif /* !defined(WITH_STATIC_CLASSPATH) */
 
 
 /*
index b8d8cdc2e36c6080ff19684e74aff8934b453390..3d2ce2f32dd8c6044ece75645f5c7c295d1a04b4 100644 (file)
@@ -1290,14 +1290,7 @@ static u1 *jit_compile_intern(jitdata *jd)
        if (m->flags & ACC_NATIVE) {
                functionptr f;
 
-#if defined(WITH_STATIC_CLASSPATH)
-               f = native_findfunction(m->class->name, m->name, m->descriptor,
-                                                               (m->flags & ACC_STATIC));
-               if (f == NULL)
-                       return NULL;
-#else
                f = NULL;
-#endif
 
                code = codegen_generate_stub_native(m, f);
 
index 535589ca85e7f015828abebb52f938ead0932b99..64632b5a846be9c5d6c316b914be083396e9b8e7 100644 (file)
@@ -2622,11 +2622,10 @@ void codegen_emit_stub_native(jitdata *jd, methoddesc *nmd, functionptr f)
        M_AADD_IMM(-(cd->stackframesize*4), REG_SP);
 
        /* get function address (this must happen before the stackframeinfo) */
-#if !defined(WITH_STATIC_CLASSPATH)
        if (f == NULL)  {
                codegen_addpatchref(cd, PATCHER_resolve_native_function, m, 0);
        }
-#endif
+
        M_AMOV_IMM(f, REG_ATMP2); /* do not move this line, the patcher is needed */
 
        M_AST(REG_ATMP2, REG_SP, 4 * 4);
index 7ae6ca2cf9446d349045bdf42417661f8d923cd3..41640b83241200c54288d0275bb1eed333a21205 100644 (file)
@@ -632,7 +632,6 @@ bool patcher_checkcast_interface(u1 *sp)
 
 *******************************************************************************/
 
-#if !defined(WITH_STATIC_CLASSPATH)
 bool patcher_resolve_native_function(u1 *sp)
 {
        methodinfo  *m;
@@ -659,7 +658,6 @@ bool patcher_resolve_native_function(u1 *sp)
 
        return true;
 }
-#endif /* !defined(WITH_STATIC_CLASSPATH) */
 
 
 /* patcher_invokeinterface *****************************************************
index 8252132308bf4951e008b6423f1e5640d23c43b0..9ecb43cd2ad07ccf2b604b006b15c8642fe76f8c 100644 (file)
@@ -3702,10 +3702,8 @@ void codegen_emit_stub_native(jitdata *jd, methoddesc *nmd, functionptr f)
 
        funcdisp = dseg_add_functionptr(cd, f);
 
-#if !defined(WITH_STATIC_CLASSPATH)
        if (f == NULL)
                patcher_add_patch_ref(jd, PATCHER_resolve_native_function, m, funcdisp);
-#endif
 
        /* save integer and float argument registers */
 
index 703ee87695d84a25916d608eb541315712b6d1aa..528a1be4a3cdeea9b84699878bf6c29f09e59e83 100644 (file)
@@ -360,7 +360,6 @@ bool patcher_resolve_classref_to_flags(patchref_t *pr)
 
 *******************************************************************************/
 
-#if !defined(WITH_STATIC_CLASSPATH)
 bool patcher_resolve_native_function(patchref_t *pr)
 {
        methodinfo  *m;
@@ -389,7 +388,6 @@ bool patcher_resolve_native_function(patchref_t *pr)
 
        return true;
 }
-#endif /* !defined(WITH_STATIC_CLASSPATH) */
 
 
 /* patcher_invokestatic_special ************************************************
index 91e46eda06bafdb9a1d498965f5624e7bd789078..cc4328ec1e91fac60f567abd990c74901d830bf1 100644 (file)
@@ -98,10 +98,8 @@ bool patcher_resolve_classref_to_index(patchref_t *pr);
 bool patcher_resolve_classref_to_flags(patchref_t *pr);
 #define PATCHER_resolve_classref_to_flags (functionptr) patcher_resolve_classref_to_flags
 
-#if !defined(WITH_STATIC_CLASSPATH)
 bool patcher_resolve_native_function(patchref_t *pr);
 #define PATCHER_resolve_native_function (functionptr) patcher_resolve_native_function
-#endif
 
 /* old patcher functions */
 
index 2d7f68ea390448667f91a1fd8609695e2a32a0c5..68b167468dd90272c52fbb9a7b7f6abf1e029b35 100644 (file)
@@ -109,10 +109,8 @@ bool patcher_resolve_classref_to_vftbl(u1 *sp);
 bool patcher_resolve_classref_to_flags(u1 *sp);
 #define PATCHER_resolve_classref_to_flags (functionptr) patcher_resolve_classref_to_flags
 
-#if !defined(WITH_STATIC_CLASSPATH)
 bool patcher_resolve_native_function(u1 *sp);
 #define PATCHER_resolve_native_function (functionptr) patcher_resolve_native_function
-#endif
 
 
 bool patcher_get_putstatic(u1 *sp);
@@ -197,10 +195,8 @@ bool patcher_clinit(u1 *sp);
 bool patcher_athrow_areturn(u1 *sp);
 #define PATCHER_athrow_areturn (functionptr) patcher_athrow_areturn
 
-#if !defined(WITH_STATIC_CLASSPATH)
 bool patcher_resolve_native(u1 *sp);
 #define PATCHER_resolve_native (functionptr) patcher_resolve_native
-#endif
 
 
 /* stuff for the interpreter **************************************************/
index 18f6a07ebb5ecec374a0ce799e9d6291f1010fdf..f229802f45466c2762dbe4a0334258facb3df506 100644 (file)
@@ -3175,10 +3175,8 @@ void codegen_emit_stub_native(jitdata *jd, methoddesc *nmd, functionptr f)
 
        funcdisp = dseg_add_functionptr(cd, f);
 
-#if !defined(WITH_STATIC_CLASSPATH)
        if (f == NULL)
                patcher_add_patch_ref(jd, PATCHER_resolve_native_function, m, funcdisp);
-#endif
 
        /* emit trace code */
 
index d941b7d632e95e76426f7c100b245c56d534c7f3..006c8914890affd3a77d621b642ceba3ff23233a 100644 (file)
@@ -266,7 +266,6 @@ bool patcher_resolve_classref_to_flags(patchref_t *pr)
 
 *******************************************************************************/
 
-#if !defined(WITH_STATIC_CLASSPATH)
 bool patcher_resolve_native_function(patchref_t *pr)
 {
        methodinfo  *m;
@@ -295,7 +294,6 @@ bool patcher_resolve_native_function(patchref_t *pr)
 
        return true;
 }
-#endif /* !defined(WITH_STATIC_CLASSPATH) */
 
 
 /* patcher_get_putstatic *******************************************************
index b292ccc170cfa6fb0b82aba2e5dea92172332e95..6db0fc987d19367e65b14fe5c3d725da1065b2ab 100644 (file)
@@ -2774,11 +2774,8 @@ void codegen_emit_stub_native(jitdata *jd, methoddesc *nmd, functionptr f)
 
        funcdisp = dseg_add_functionptr(cd, f);
 
-#if !defined(WITH_STATIC_CLASSPATH)
-       if (f == NULL) {
+       if (f == NULL)
                codegen_addpatchref(cd, PATCHER_resolve_native, m, funcdisp);
-       }
-#endif
 
        /* save integer and float argument registers */
 
index b14fa4268a20b424d1e5c4d9994f82c60770428d..0a5a274b439ab4cba0c5a3d626f9ef0560a7ca87 100644 (file)
@@ -1094,7 +1094,6 @@ bool patcher_athrow_areturn(u1 *sp)
 
 *******************************************************************************/
 
-#if !defined(WITH_STATIC_CLASSPATH)
 bool patcher_resolve_native(u1 *sp)
 {
        u1          *ra;
@@ -1135,7 +1134,6 @@ bool patcher_resolve_native(u1 *sp)
 
        return true;
 }
-#endif /* !defined(WITH_STATIC_CLASSPATH) */
 
 
 /*
index befb98191ecfb7db2e01c2de3cae891d7f4fae70..877afe5c0db03b52fd4ed37bd1878f960bc86b8f 100644 (file)
@@ -3570,10 +3570,8 @@ void codegen_emit_stub_native(jitdata *jd, methoddesc *nmd, functionptr f)
 
        disp = dseg_add_functionptr(cd, f);
 
-#if !defined(WITH_STATIC_CLASSPATH)
        if (f == NULL)
                patcher_add_patch_ref(jd, PATCHER_resolve_native_function, m, disp);
-#endif
 
        M_ILD_DSEG(REG_ITMP1, disp);
 
index 78c9b1797774239993890e7a15dd821e7b926a13..de4de807abef118936b81c0dc48911b14ca171f6 100644 (file)
@@ -530,7 +530,6 @@ bool patcher_athrow_areturn(patchref_t *pr)
 
 *******************************************************************************/
 
-#if !defined(WITH_STATIC_CLASSPATH)
 bool patcher_resolve_native_function(patchref_t *pr)
 {
        methodinfo  *m;
@@ -557,7 +556,7 @@ bool patcher_resolve_native_function(patchref_t *pr)
 
        return true;
 }
-#endif /* !defined(WITH_STATIC_CLASSPATH) */
+
 
 /*
  * These are local overrides for various environment variables in Emacs.
index 65d2783f32d9ddc1f3ca7560b5e5a9f37d372bcf..df1293732b22c93d94375f7e40d3bdea6064ae5d 100644 (file)
@@ -3319,11 +3319,8 @@ void codegen_emit_stub_native(jitdata *jd, methoddesc *nmd, functionptr f)
 
        funcdisp = dseg_add_functionptr(cd, f);
 
-#if !defined(WITH_STATIC_CLASSPATH)
-       if (f == NULL) {
+       if (f == NULL)
                codegen_add_patch_ref(cd, PATCHER_resolve_native, m, funcdisp);
-       }
-#endif
 
        /* save float argument registers */
 
index 0f822d9c6e16f4faf14b0e6f61c236429eb4f349..c38b0860ec61bea70bd068306708ae3b517a2e0f 100644 (file)
@@ -788,7 +788,6 @@ bool patcher_athrow_areturn(u1 *sp)
 
 *******************************************************************************/
 
-#if !defined(WITH_STATIC_CLASSPATH)
 bool patcher_resolve_native(u1 *sp)
 {
        methodinfo  *m;
@@ -819,7 +818,6 @@ bool patcher_resolve_native(u1 *sp)
 
        return true;
 }
-#endif /* !defined(WITH_STATIC_CLASSPATH) */
 
 
 /*
index f896c417df4e537592e538147c34be5d9b9d008f..57382d0788b8c5cccd7f512b0c7ee527c721a79f 100644 (file)
@@ -3166,10 +3166,8 @@ void codegen_emit_stub_native(jitdata *jd, methoddesc *nmd, functionptr f)
 
        /* get function address (this must happen before the stackframeinfo) */
 
-#if !defined(WITH_STATIC_CLASSPATH)
        if (f == NULL)
                codegen_add_patch_ref(cd, PATCHER_resolve_native, m, 0);
-#endif
 
        M_MOV_IMM(f, REG_ITMP3);
 
index 4d6cfa39a2ea415f71b252eb20aed15cacfde8ed..037d9e61787cba749d53727ab2102981cec19fe5 100644 (file)
@@ -920,7 +920,6 @@ bool patcher_athrow_areturn(u1 *sp)
 
 *******************************************************************************/
 
-#if !defined(WITH_STATIC_CLASSPATH)
 bool patcher_resolve_native(u1 *sp)
 {
        u1          *ra;
@@ -954,7 +953,6 @@ bool patcher_resolve_native(u1 *sp)
 
        return true;
 }
-#endif /* !defined(WITH_STATIC_CLASSPATH) */
 
 
 /*
index 1f2e6f0762df2146e08ae720582126628ca102df..fb4b5188c20102def236f672fdda38724306eaa7 100644 (file)
@@ -415,10 +415,6 @@ void properties_set(void)
 
        properties_add("java.class.version", CLASS_VERSION);
 
-#  if defined(WITH_STATIC_CLASSPATH)
-       properties_add("gnu.classpath.boot.library.path", ".");
-       properties_add("java.library.path" , ".");
-#  else
        properties_add("gnu.classpath.boot.library.path", boot_library_path);
 
        /* Get and set java.library.path. */
@@ -429,7 +425,6 @@ void properties_set(void)
                java_library_path = "";
 
        properties_add("java.library.path", java_library_path);
-#  endif
 
        properties_add("java.io.tmpdir", "/tmp");
 
@@ -472,17 +467,10 @@ void properties_set(void)
        properties_add("os.version", utsnamebuf->release);
 #  endif
 
-#  if defined(WITH_STATIC_CLASSPATH)
-       /* This is just for debugging purposes and can cause troubles in
-       GNU Classpath. */
-
-       properties_add("gnu.cpu.endian", "unknown");
-#  else
-#   if WORDS_BIGENDIAN == 1
+#  if WORDS_BIGENDIAN == 1
        properties_add("gnu.cpu.endian", "big");
-#   else
+#  else
        properties_add("gnu.cpu.endian", "little");
-#   endif
 #  endif
 
        properties_add("file.separator", "/");