diff options
author | daney <daney@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-07-31 16:17:21 +0000 |
---|---|---|
committer | daney <daney@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-07-31 16:17:21 +0000 |
commit | 6e29f747fdc59495bec2506c276951c1ea7e02e0 (patch) | |
tree | 6dc577fa9ea387e1b09b0eeec8e6facca682d8c6 | |
parent | 249f93223c78cbc8786ea33c9c0d4dd9cd69c06d (diff) | |
download | gcc-6e29f747fdc59495bec2506c276951c1ea7e02e0.tar.gz |
* configure.ac (INTERPRETER): New AM_CONDITIONAL.
* scripts/makemake.tcl (package_map): Mark jdwp and jvmti packages
as being for interpreter only. Place interpreter related files in
'if INTERPRETER' block.
(interpreter_package_files): New list.
(interpreter_header_vars): Ditto.
(emit_package_rule_to_list): Renamed from emit_package_rule with
new target list parameter.
(emit_package_rule): Rewritten to call emit_package_rule_to_list.
(emit_interpreter_rule): New function.
(emit_source_var): Place interpreter related files in
interpreter_header_vars.
* Makefile.am (ACLOCAL_AMFLAGS): Add -I libltdl.
(libgcj_interpret_source_files): New variable.
(libgcj_la_SOURCES): Move jvmti.cc and interpret.cc to
libgcj_interpret_source_files and include
libgcj_interpret_source_files.
(nat_jdwp_source_files): New variable.
(nat_jvmti_source_files): Ditto.
(nat_source_files): Move jdwp and jvmti related files to
nat_jdwp_source_files and nat_jvmti_source_files and include
nat_jdwp_source_files and nat_jvmti_source_files.
* Makefile.in: Regenerate.
* include/Makefile.in: Ditto.
* testsuite/Makefile.in: Ditto.
* gcj/Makefile.in: Ditto.
* sources.am: Ditto.
* configure: Ditto.
* include/config.h.in: Ditto.
* interpret.cc: Remove #ifdef INTERPRETER block.
* stacktrace.cc (UnwindTraceFn): Do not handle proxy frames if
interpreter disabled.
* include/java-interp.h (_Jv_FrameType): Move outside of
#ifdef INTERPRETER block.
* include/execution.h (_Jv_IndirectCompiledEngine::do_get_closure_list,
_Jv_InterpreterEngine, _Jv_soleInterpreterEngine): Place in
#ifdef INTERPRETER block.
* jni.cc (jvmti.h, jvmti-int.h): Only include if INTERPRETER is
defined.
(_Jv_JNI_PopSystemFrame, _Jv_JNI_GetEnv): Only do jvmti processing
if INTERPRETER is defined.
* prims.cc (jvmti.h, jvmti-int.h, Jdwp.h, VMVirtualMachine.h): Only
include if INTERPRETER is defined.
(defaultJdwpOptions, jdwpOptions, jvmti_agent_onload_func,
jvmti_agent_onunload_func, jvmti_agentonload, jvmti_agentonunload,
jvmti_agent_opts, load_jvmti_agent): Only define if INTERPRETER is
defined.
(parse_x_arg): Only process 'runjdwp:' if INTERPRETER is defined.
(parse_init_args): Only process jvmti related options if
INTERPRETER is defined.
(_Jv_CreateJavaVM): Only call _Jv_JVMTI_Init if INTERPRETER is
defined.
(_Jv_RunMain): Only do jvmti and jdwp processing if INTERPRETER is
defined.
* link.cc (jvmti.h, jvmti-int.h): Only include if INTERPRETER is
defined.
(_Jv_ThrowNoClassDefFoundError, _Jv_Linker::create_error_method):
Define if if INTERPRETER is not defined.
(_Jv_Linker::wait_for_state): Only do jvmti proccessing if
INTERPRETER is defined.
* boehm.cc (closure_list_pointer, finalize_closure_list,
_Jv_ClosureListFinalizer): Only define if INTERPRETER is
defined.
* java/lang/natThread.cc (jvmti.h, jvmti-int.h): Only include if
INTERPRETER is defined.
(finish_, _Jv_NotifyThreadStart): Only do jvmti proccessing if
INTERPRETER is defined.
* java/lang/Class.h (_Jv_InterpreterEngine): Move declaration
and friend declaration inside #ifdef INTERPRETER block.
* java/lang/natClass.cc (_Jv_ClosureList::releaseClosures,
_Jv_ClosureList::registerClosure, _Jv_GetInterpClassSourceFile):
Only define if INTERPRETER is defined.
* java/lang/reflect/natVMProxy.cc (UnsupportedOperationException.h):
Include.
(generateProxyClass): Throw UnsupportedOperationException unless
INTERPRETER is defined.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127097 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | libjava/ChangeLog | 79 | ||||
-rw-r--r-- | libjava/Makefile.am | 31 | ||||
-rw-r--r-- | libjava/Makefile.in | 166 | ||||
-rw-r--r-- | libjava/boehm.cc | 2 | ||||
-rwxr-xr-x | libjava/configure | 23 | ||||
-rw-r--r-- | libjava/configure.ac | 1 | ||||
-rw-r--r-- | libjava/gcj/Makefile.in | 15 | ||||
-rw-r--r-- | libjava/include/Makefile.in | 15 | ||||
-rw-r--r-- | libjava/include/config.h.in | 7 | ||||
-rw-r--r-- | libjava/include/execution.h | 7 | ||||
-rw-r--r-- | libjava/include/java-interp.h | 14 | ||||
-rw-r--r-- | libjava/interpret.cc | 4 | ||||
-rw-r--r-- | libjava/java/lang/Class.h | 4 | ||||
-rw-r--r-- | libjava/java/lang/natClass.cc | 4 | ||||
-rw-r--r-- | libjava/java/lang/natThread.cc | 7 | ||||
-rw-r--r-- | libjava/java/lang/reflect/natVMProxy.cc | 12 | ||||
-rw-r--r-- | libjava/jni.cc | 9 | ||||
-rw-r--r-- | libjava/link.cc | 8 | ||||
-rw-r--r-- | libjava/prims.cc | 27 | ||||
-rwxr-xr-x | libjava/scripts/makemake.tcl | 66 | ||||
-rw-r--r-- | libjava/sources.am | 51 | ||||
-rw-r--r-- | libjava/stacktrace.cc | 2 | ||||
-rw-r--r-- | libjava/testsuite/Makefile.in | 15 |
23 files changed, 428 insertions, 141 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 835bd932b0c..a4f7f4f52ea 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,82 @@ +2007-07-31 David Daney <ddaney@avtrex.com> + + * configure.ac (INTERPRETER): New AM_CONDITIONAL. + * scripts/makemake.tcl (package_map): Mark jdwp and jvmti packages + as being for interpreter only. Place interpreter related files in + 'if INTERPRETER' block. + (interpreter_package_files): New list. + (interpreter_header_vars): Ditto. + (emit_package_rule_to_list): Renamed from emit_package_rule with + new target list parameter. + (emit_package_rule): Rewritten to call emit_package_rule_to_list. + (emit_interpreter_rule): New function. + (emit_source_var): Place interpreter related files in + interpreter_header_vars. + * Makefile.am (ACLOCAL_AMFLAGS): Add -I libltdl. + (libgcj_interpret_source_files): New variable. + (libgcj_la_SOURCES): Move jvmti.cc and interpret.cc to + libgcj_interpret_source_files and include + libgcj_interpret_source_files. + (nat_jdwp_source_files): New variable. + (nat_jvmti_source_files): Ditto. + (nat_source_files): Move jdwp and jvmti related files to + nat_jdwp_source_files and nat_jvmti_source_files and include + nat_jdwp_source_files and nat_jvmti_source_files. + * Makefile.in: Regenerate. + * include/Makefile.in: Ditto. + * testsuite/Makefile.in: Ditto. + * gcj/Makefile.in: Ditto. + * sources.am: Ditto. + * configure: Ditto. + * include/config.h.in: Ditto. + * interpret.cc: Remove #ifdef INTERPRETER block. + * stacktrace.cc (UnwindTraceFn): Do not handle proxy frames if + interpreter disabled. + * include/java-interp.h (_Jv_FrameType): Move outside of + #ifdef INTERPRETER block. + * include/execution.h (_Jv_IndirectCompiledEngine::do_get_closure_list, + _Jv_InterpreterEngine, _Jv_soleInterpreterEngine): Place in + #ifdef INTERPRETER block. + * jni.cc (jvmti.h, jvmti-int.h): Only include if INTERPRETER is + defined. + (_Jv_JNI_PopSystemFrame, _Jv_JNI_GetEnv): Only do jvmti processing + if INTERPRETER is defined. + * prims.cc (jvmti.h, jvmti-int.h, Jdwp.h, VMVirtualMachine.h): Only + include if INTERPRETER is defined. + (defaultJdwpOptions, jdwpOptions, jvmti_agent_onload_func, + jvmti_agent_onunload_func, jvmti_agentonload, jvmti_agentonunload, + jvmti_agent_opts, load_jvmti_agent): Only define if INTERPRETER is + defined. + (parse_x_arg): Only process 'runjdwp:' if INTERPRETER is defined. + (parse_init_args): Only process jvmti related options if + INTERPRETER is defined. + (_Jv_CreateJavaVM): Only call _Jv_JVMTI_Init if INTERPRETER is + defined. + (_Jv_RunMain): Only do jvmti and jdwp processing if INTERPRETER is + defined. + * link.cc (jvmti.h, jvmti-int.h): Only include if INTERPRETER is + defined. + (_Jv_ThrowNoClassDefFoundError, _Jv_Linker::create_error_method): + Define if if INTERPRETER is not defined. + (_Jv_Linker::wait_for_state): Only do jvmti proccessing if + INTERPRETER is defined. + * boehm.cc (closure_list_pointer, finalize_closure_list, + _Jv_ClosureListFinalizer): Only define if INTERPRETER is + defined. + * java/lang/natThread.cc (jvmti.h, jvmti-int.h): Only include if + INTERPRETER is defined. + (finish_, _Jv_NotifyThreadStart): Only do jvmti proccessing if + INTERPRETER is defined. + * java/lang/Class.h (_Jv_InterpreterEngine): Move declaration + and friend declaration inside #ifdef INTERPRETER block. + * java/lang/natClass.cc (_Jv_ClosureList::releaseClosures, + _Jv_ClosureList::registerClosure, _Jv_GetInterpClassSourceFile): + Only define if INTERPRETER is defined. + * java/lang/reflect/natVMProxy.cc (UnsupportedOperationException.h): + Include. + (generateProxyClass): Throw UnsupportedOperationException unless + INTERPRETER is defined. + 2007-07-29 Matthias Klose <doko@ubuntu.com> * HACKING: Document regenerating configure. diff --git a/libjava/Makefile.am b/libjava/Makefile.am index ca030e15366..8e89f5a8464 100644 --- a/libjava/Makefile.am +++ b/libjava/Makefile.am @@ -2,7 +2,7 @@ AUTOMAKE_OPTIONS = foreign subdir-objects -ACLOCAL_AMFLAGS = -I . -I .. -I ../config +ACLOCAL_AMFLAGS = -I . -I .. -I ../config -I libltdl # May be used by various substitution variables. gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) @@ -186,8 +186,14 @@ libgij_la_LIBADD = -L$(here)/.libs libgcj.la libgij_la_LDFLAGS = -rpath $(toolexeclibdir) \ -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC) -libgcj_la_SOURCES = prims.cc jni.cc jvmti.cc exception.cc stacktrace.cc \ - link.cc defineclass.cc interpret.cc verify.cc \ +if INTERPRETER +libgcj_interpret_source_files = jvmti.cc interpret.cc +else +libgcj_interpret_source_files = +endif + +libgcj_la_SOURCES = prims.cc jni.cc exception.cc stacktrace.cc \ + link.cc defineclass.cc verify.cc $(libgcj_interpret_source_files) \ $(nat_source_files) ## We need to compile at least the interpreter this way. @@ -830,12 +836,22 @@ grmiregistry_LDADD = -L$(here)/.libs libgcj-tools.la grmiregistry_DEPENDENCIES = libgcj-tools.la ## ################################################################ +if INTERPRETER +nat_jdwp_source_files = \ +gnu/classpath/jdwp/natVMFrame.cc \ +gnu/classpath/jdwp/natVMMethod.cc \ +gnu/classpath/jdwp/natVMVirtualMachine.cc +nat_jvmti_source_files = \ +gnu/gcj/jvmti/natBreakpoint.cc \ +gnu/gcj/jvmti/natNormalBreakpoint.cc +else +nat_jdwp_source_files = +nat_jvmti_source_files = +endif ## This lists all the C++ source files in subdirectories. nat_source_files = \ -gnu/classpath/jdwp/natVMFrame.cc \ -gnu/classpath/jdwp/natVMMethod.cc \ -gnu/classpath/jdwp/natVMVirtualMachine.cc \ +$(nat_jdwp_source_files) \ gnu/classpath/natConfiguration.cc \ gnu/classpath/natSystemProperties.cc \ gnu/classpath/natVMStackWalker.cc \ @@ -850,8 +866,7 @@ gnu/gcj/convert/natOutput_EUCJIS.cc \ gnu/gcj/convert/natOutput_SJIS.cc \ gnu/gcj/io/natSimpleSHSStream.cc \ gnu/gcj/io/shs.cc \ -gnu/gcj/jvmti/natBreakpoint.cc \ -gnu/gcj/jvmti/natNormalBreakpoint.cc \ +$(nat_jvmti_source_files) \ gnu/gcj/runtime/natFinalizerThread.cc \ gnu/gcj/runtime/natSharedLibLoader.cc \ gnu/gcj/runtime/natSystemClassLoader.cc \ diff --git a/libjava/Makefile.in b/libjava/Makefile.in index cc460e88917..b9cd3c02144 100644 --- a/libjava/Makefile.in +++ b/libjava/Makefile.in @@ -79,7 +79,8 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/../compile \ @XLIB_AWT_TRUE@am__append_17 = $(xlib_nat_headers) subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/libltdl/acinclude.m4 \ + $(top_srcdir)/../config/acx.m4 \ $(top_srcdir)/../config/confsubdir.m4 \ $(top_srcdir)/../config/depstand.m4 \ $(top_srcdir)/../config/enable.m4 \ @@ -155,18 +156,21 @@ lib_gnu_awt_xlib_la_OBJECTS = $(am_lib_gnu_awt_xlib_la_OBJECTS) libgcj_tools_la_LIBADD = am_libgcj_tools_la_OBJECTS = classpath/tools/libgcj_tools_la-tools.lo libgcj_tools_la_OBJECTS = $(am_libgcj_tools_la_OBJECTS) -am__DEPENDENCIES_1 = gnu/awt.lo gnu/awt/j2d.lo gnu/classpath.lo \ - gnu/classpath/debug.lo gnu/classpath/jdwp.lo \ - gnu/classpath/jdwp/event.lo \ - gnu/classpath/jdwp/event/filters.lo \ - gnu/classpath/jdwp/exception.lo gnu/classpath/jdwp/id.lo \ - gnu/classpath/jdwp/processor.lo \ - gnu/classpath/jdwp/transport.lo gnu/classpath/jdwp/util.lo \ - gnu/classpath/jdwp/value.lo gnu/gcj.lo gnu/gcj/convert.lo \ - gnu/gcj/io.lo gnu/gcj/jvmti.lo gnu/gcj/runtime.lo \ - gnu/gcj/util.lo gnu/java/awt.lo gnu/java/awt/color.lo \ - gnu/java/awt/dnd.lo gnu/java/awt/font.lo \ - gnu/java/awt/font/autofit.lo gnu/java/awt/font/opentype.lo \ +@INTERPRETER_TRUE@am__DEPENDENCIES_1 = gnu/classpath/jdwp.lo \ +@INTERPRETER_TRUE@ gnu/classpath/jdwp/event.lo \ +@INTERPRETER_TRUE@ gnu/classpath/jdwp/event/filters.lo \ +@INTERPRETER_TRUE@ gnu/classpath/jdwp/exception.lo \ +@INTERPRETER_TRUE@ gnu/classpath/jdwp/id.lo \ +@INTERPRETER_TRUE@ gnu/classpath/jdwp/processor.lo \ +@INTERPRETER_TRUE@ gnu/classpath/jdwp/transport.lo \ +@INTERPRETER_TRUE@ gnu/classpath/jdwp/util.lo \ +@INTERPRETER_TRUE@ gnu/classpath/jdwp/value.lo gnu/gcj/jvmti.lo +am__DEPENDENCIES_2 = gnu/awt.lo gnu/awt/j2d.lo gnu/classpath.lo \ + gnu/classpath/debug.lo gnu/gcj.lo gnu/gcj/convert.lo \ + gnu/gcj/io.lo gnu/gcj/runtime.lo gnu/gcj/util.lo \ + gnu/java/awt.lo gnu/java/awt/color.lo gnu/java/awt/dnd.lo \ + gnu/java/awt/font.lo gnu/java/awt/font/autofit.lo \ + gnu/java/awt/font/opentype.lo \ gnu/java/awt/font/opentype/truetype.lo gnu/java/awt/image.lo \ gnu/java/awt/java2d.lo gnu/java/awt/peer.lo \ gnu/java/awt/peer/headless.lo gnu/java/awt/print.lo \ @@ -275,8 +279,9 @@ am__DEPENDENCIES_1 = gnu/awt.lo gnu/awt/j2d.lo gnu/classpath.lo \ javax/swing/text/rtf.lo javax/swing/tree.lo \ javax/swing/undo.lo javax/transaction.lo \ javax/transaction/xa.lo org/ietf/jgss.lo sun/misc.lo \ - sun/reflect.lo sun/reflect/annotation.lo sun/reflect/misc.lo -am__DEPENDENCIES_2 = gnu-CORBA.lo gnu-java-awt-dnd-peer-gtk.lo \ + sun/reflect.lo sun/reflect/annotation.lo sun/reflect/misc.lo \ + $(am__DEPENDENCIES_1) +am__DEPENDENCIES_3 = gnu-CORBA.lo gnu-java-awt-dnd-peer-gtk.lo \ gnu-java-awt-peer-gtk.lo gnu-java-awt-peer-swing.lo \ gnu-java-beans.lo gnu-java-lang-management.lo \ gnu-java-util-prefs-gconf.lo gnu-javax-management.lo \ @@ -286,12 +291,12 @@ am__DEPENDENCIES_2 = gnu-CORBA.lo gnu-java-awt-dnd-peer-gtk.lo \ gnu-xml-validation.lo gnu-xml-xpath.lo java-lang-management.lo \ javax-imageio.lo javax-rmi.lo javax-xml.lo org-omg.lo \ org-relaxng.lo org-w3c.lo org-xml.lo -am__DEPENDENCIES_3 = $(patsubst classpath/resource/%,%,$(addsuffix \ +am__DEPENDENCIES_4 = $(patsubst classpath/resource/%,%,$(addsuffix \ .lo,$(property_files))) -am__DEPENDENCIES_4 = -am__libgcj_la_SOURCES_DIST = prims.cc jni.cc jvmti.cc exception.cc \ - stacktrace.cc link.cc defineclass.cc interpret.cc verify.cc \ - gnu/classpath/jdwp/natVMFrame.cc \ +am__DEPENDENCIES_5 = +am__libgcj_la_SOURCES_DIST = prims.cc jni.cc exception.cc \ + stacktrace.cc link.cc defineclass.cc verify.cc jvmti.cc \ + interpret.cc gnu/classpath/jdwp/natVMFrame.cc \ gnu/classpath/jdwp/natVMMethod.cc \ gnu/classpath/jdwp/natVMVirtualMachine.cc \ gnu/classpath/natConfiguration.cc \ @@ -355,10 +360,13 @@ am__libgcj_la_SOURCES_DIST = prims.cc jni.cc jvmti.cc exception.cc \ java/util/zip/natInflater.cc sun/misc/natUnsafe.cc boehm.cc \ nogc.cc posix.cc win32.cc darwin.cc posix-threads.cc \ win32-threads.cc no-threads.cc -am__objects_2 = gnu/classpath/jdwp/natVMFrame.lo \ - gnu/classpath/jdwp/natVMMethod.lo \ - gnu/classpath/jdwp/natVMVirtualMachine.lo \ - gnu/classpath/natConfiguration.lo \ +@INTERPRETER_TRUE@am__objects_2 = jvmti.lo interpret.lo +@INTERPRETER_TRUE@am__objects_3 = gnu/classpath/jdwp/natVMFrame.lo \ +@INTERPRETER_TRUE@ gnu/classpath/jdwp/natVMMethod.lo \ +@INTERPRETER_TRUE@ gnu/classpath/jdwp/natVMVirtualMachine.lo +@INTERPRETER_TRUE@am__objects_4 = gnu/gcj/jvmti/natBreakpoint.lo \ +@INTERPRETER_TRUE@ gnu/gcj/jvmti/natNormalBreakpoint.lo +am__objects_5 = $(am__objects_3) gnu/classpath/natConfiguration.lo \ gnu/classpath/natSystemProperties.lo \ gnu/classpath/natVMStackWalker.lo gnu/gcj/natCore.lo \ gnu/gcj/convert/JIS0208_to_Unicode.lo \ @@ -369,9 +377,7 @@ am__objects_2 = gnu/classpath/jdwp/natVMFrame.lo \ gnu/gcj/convert/natOutput_EUCJIS.lo \ gnu/gcj/convert/natOutput_SJIS.lo \ gnu/gcj/io/natSimpleSHSStream.lo gnu/gcj/io/shs.lo \ - gnu/gcj/jvmti/natBreakpoint.lo \ - gnu/gcj/jvmti/natNormalBreakpoint.lo \ - gnu/gcj/runtime/natFinalizerThread.lo \ + $(am__objects_4) gnu/gcj/runtime/natFinalizerThread.lo \ gnu/gcj/runtime/natSharedLibLoader.lo \ gnu/gcj/runtime/natSystemClassLoader.lo \ gnu/gcj/runtime/natStringBuffer.lo gnu/gcj/util/natDebug.lo \ @@ -417,19 +423,19 @@ am__objects_2 = gnu/classpath/jdwp/natVMFrame.lo \ java/util/concurrent/atomic/natAtomicLong.lo \ java/util/logging/natLogger.lo java/util/zip/natDeflater.lo \ java/util/zip/natInflater.lo sun/misc/natUnsafe.lo -@USING_BOEHMGC_TRUE@am__objects_3 = boehm.lo -@USING_NOGC_TRUE@am__objects_4 = nogc.lo -@USING_POSIX_PLATFORM_TRUE@am__objects_5 = posix.lo -@USING_WIN32_PLATFORM_TRUE@am__objects_6 = win32.lo -@USING_DARWIN_CRT_TRUE@am__objects_7 = darwin.lo -@USING_POSIX_THREADS_TRUE@am__objects_8 = posix-threads.lo -@USING_WIN32_THREADS_TRUE@am__objects_9 = win32-threads.lo -@USING_NO_THREADS_TRUE@am__objects_10 = no-threads.lo -am_libgcj_la_OBJECTS = prims.lo jni.lo jvmti.lo exception.lo \ - stacktrace.lo link.lo defineclass.lo interpret.lo verify.lo \ - $(am__objects_2) $(am__objects_3) $(am__objects_4) \ +@USING_BOEHMGC_TRUE@am__objects_6 = boehm.lo +@USING_NOGC_TRUE@am__objects_7 = nogc.lo +@USING_POSIX_PLATFORM_TRUE@am__objects_8 = posix.lo +@USING_WIN32_PLATFORM_TRUE@am__objects_9 = win32.lo +@USING_DARWIN_CRT_TRUE@am__objects_10 = darwin.lo +@USING_POSIX_THREADS_TRUE@am__objects_11 = posix-threads.lo +@USING_WIN32_THREADS_TRUE@am__objects_12 = win32-threads.lo +@USING_NO_THREADS_TRUE@am__objects_13 = no-threads.lo +am_libgcj_la_OBJECTS = prims.lo jni.lo exception.lo stacktrace.lo \ + link.lo defineclass.lo verify.lo $(am__objects_2) \ $(am__objects_5) $(am__objects_6) $(am__objects_7) \ - $(am__objects_8) $(am__objects_9) $(am__objects_10) + $(am__objects_8) $(am__objects_9) $(am__objects_10) \ + $(am__objects_11) $(am__objects_12) $(am__objects_13) libgcj_la_OBJECTS = $(am_libgcj_la_OBJECTS) am_libgcj_bc_la_OBJECTS = libgcj_bc.lo libgcj_bc_la_OBJECTS = $(am_libgcj_bc_la_OBJECTS) @@ -624,6 +630,8 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRETER = @INTERPRETER@ +INTERPRETER_FALSE = @INTERPRETER_FALSE@ +INTERPRETER_TRUE = @INTERPRETER_TRUE@ JAR = @JAR@ JAVA_HOME = @JAVA_HOME@ JAVA_HOME_SET_FALSE = @JAVA_HOME_SET_FALSE@ @@ -800,7 +808,7 @@ toolexecdir = @toolexecdir@ toolexeclibdir = @toolexeclibdir@ toolexecmainlibdir = @toolexecmainlibdir@ AUTOMAKE_OPTIONS = foreign subdir-objects -ACLOCAL_AMFLAGS = -I . -I .. -I ../config +ACLOCAL_AMFLAGS = -I . -I .. -I ../config -I libltdl # May be used by various substitution variables. gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) @@ -890,8 +898,10 @@ libgij_la_LIBADD = -L$(here)/.libs libgcj.la libgij_la_LDFLAGS = -rpath $(toolexeclibdir) \ -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC) -libgcj_la_SOURCES = prims.cc jni.cc jvmti.cc exception.cc \ - stacktrace.cc link.cc defineclass.cc interpret.cc verify.cc \ +@INTERPRETER_FALSE@libgcj_interpret_source_files = +@INTERPRETER_TRUE@libgcj_interpret_source_files = jvmti.cc interpret.cc +libgcj_la_SOURCES = prims.cc jni.cc exception.cc stacktrace.cc link.cc \ + defineclass.cc verify.cc $(libgcj_interpret_source_files) \ $(nat_source_files) $(am__append_7) $(am__append_8) \ $(am__append_9) $(am__append_10) $(am__append_11) \ $(am__append_12) $(am__append_13) $(am__append_14) @@ -7307,24 +7317,40 @@ sun_reflect_misc_source_files = \ sun/reflect/misc/ReflectUtil.java sun_reflect_misc_header_files = $(patsubst %.java,%.h,$(sun_reflect_misc_source_files)) +@INTERPRETER_FALSE@interpreter_packages_source_files = +@INTERPRETER_TRUE@interpreter_packages_source_files = \ +@INTERPRETER_TRUE@ gnu/classpath/jdwp.list \ +@INTERPRETER_TRUE@ gnu/classpath/jdwp/event.list \ +@INTERPRETER_TRUE@ gnu/classpath/jdwp/event/filters.list \ +@INTERPRETER_TRUE@ gnu/classpath/jdwp/exception.list \ +@INTERPRETER_TRUE@ gnu/classpath/jdwp/id.list \ +@INTERPRETER_TRUE@ gnu/classpath/jdwp/processor.list \ +@INTERPRETER_TRUE@ gnu/classpath/jdwp/transport.list \ +@INTERPRETER_TRUE@ gnu/classpath/jdwp/util.list \ +@INTERPRETER_TRUE@ gnu/classpath/jdwp/value.list \ +@INTERPRETER_TRUE@ gnu/gcj/jvmti.list + +@INTERPRETER_FALSE@interpreter_header_files = +@INTERPRETER_TRUE@interpreter_header_files = \ +@INTERPRETER_TRUE@ $(gnu_classpath_jdwp_header_files) \ +@INTERPRETER_TRUE@ $(gnu_classpath_jdwp_event_header_files) \ +@INTERPRETER_TRUE@ $(gnu_classpath_jdwp_event_filters_header_files) \ +@INTERPRETER_TRUE@ $(gnu_classpath_jdwp_exception_header_files) \ +@INTERPRETER_TRUE@ $(gnu_classpath_jdwp_id_header_files) \ +@INTERPRETER_TRUE@ $(gnu_classpath_jdwp_processor_header_files) \ +@INTERPRETER_TRUE@ $(gnu_classpath_jdwp_transport_header_files) \ +@INTERPRETER_TRUE@ $(gnu_classpath_jdwp_util_header_files) \ +@INTERPRETER_TRUE@ $(gnu_classpath_jdwp_value_header_files) \ +@INTERPRETER_TRUE@ $(gnu_gcj_jvmti_header_files) + all_packages_source_files = \ gnu/awt.list \ gnu/awt/j2d.list \ gnu/classpath.list \ gnu/classpath/debug.list \ - gnu/classpath/jdwp.list \ - gnu/classpath/jdwp/event.list \ - gnu/classpath/jdwp/event/filters.list \ - gnu/classpath/jdwp/exception.list \ - gnu/classpath/jdwp/id.list \ - gnu/classpath/jdwp/processor.list \ - gnu/classpath/jdwp/transport.list \ - gnu/classpath/jdwp/util.list \ - gnu/classpath/jdwp/value.list \ gnu/gcj.list \ gnu/gcj/convert.list \ gnu/gcj/io.list \ - gnu/gcj/jvmti.list \ gnu/gcj/runtime.list \ gnu/gcj/util.list \ gnu/java/awt.list \ @@ -7558,26 +7584,17 @@ all_packages_source_files = \ sun/misc.list \ sun/reflect.list \ sun/reflect/annotation.list \ - sun/reflect/misc.list + sun/reflect/misc.list \ + $(interpreter_packages_source_files) ordinary_header_files = \ $(gnu_awt_header_files) \ $(gnu_awt_j2d_header_files) \ $(gnu_classpath_header_files) \ $(gnu_classpath_debug_header_files) \ - $(gnu_classpath_jdwp_header_files) \ - $(gnu_classpath_jdwp_event_header_files) \ - $(gnu_classpath_jdwp_event_filters_header_files) \ - $(gnu_classpath_jdwp_exception_header_files) \ - $(gnu_classpath_jdwp_id_header_files) \ - $(gnu_classpath_jdwp_processor_header_files) \ - $(gnu_classpath_jdwp_transport_header_files) \ - $(gnu_classpath_jdwp_util_header_files) \ - $(gnu_classpath_jdwp_value_header_files) \ $(gnu_gcj_header_files) \ $(gnu_gcj_convert_header_files) \ $(gnu_gcj_io_header_files) \ - $(gnu_gcj_jvmti_header_files) \ $(gnu_gcj_runtime_header_files) \ $(gnu_gcj_tools_gcj_dbtool_header_files) \ $(gnu_gcj_util_header_files) \ @@ -7808,7 +7825,8 @@ ordinary_header_files = \ $(sun_misc_header_files) \ $(sun_reflect_header_files) \ $(sun_reflect_annotation_header_files) \ - $(sun_reflect_misc_header_files) + $(sun_reflect_misc_header_files) \ + $(interpreter_header_files) bc_objects = \ gnu-CORBA.lo \ @@ -8046,10 +8064,19 @@ grmiregistry_LDFLAGS = --main=gnu.classpath.tools.rmiregistry.Main \ grmiregistry_LINK = $(GCJLINK) grmiregistry_LDADD = -L$(here)/.libs libgcj-tools.la grmiregistry_DEPENDENCIES = libgcj-tools.la +@INTERPRETER_FALSE@nat_jdwp_source_files = +@INTERPRETER_TRUE@nat_jdwp_source_files = \ +@INTERPRETER_TRUE@gnu/classpath/jdwp/natVMFrame.cc \ +@INTERPRETER_TRUE@gnu/classpath/jdwp/natVMMethod.cc \ +@INTERPRETER_TRUE@gnu/classpath/jdwp/natVMVirtualMachine.cc + +@INTERPRETER_FALSE@nat_jvmti_source_files = +@INTERPRETER_TRUE@nat_jvmti_source_files = \ +@INTERPRETER_TRUE@gnu/gcj/jvmti/natBreakpoint.cc \ +@INTERPRETER_TRUE@gnu/gcj/jvmti/natNormalBreakpoint.cc + nat_source_files = \ -gnu/classpath/jdwp/natVMFrame.cc \ -gnu/classpath/jdwp/natVMMethod.cc \ -gnu/classpath/jdwp/natVMVirtualMachine.cc \ +$(nat_jdwp_source_files) \ gnu/classpath/natConfiguration.cc \ gnu/classpath/natSystemProperties.cc \ gnu/classpath/natVMStackWalker.cc \ @@ -8064,8 +8091,7 @@ gnu/gcj/convert/natOutput_EUCJIS.cc \ gnu/gcj/convert/natOutput_SJIS.cc \ gnu/gcj/io/natSimpleSHSStream.cc \ gnu/gcj/io/shs.cc \ -gnu/gcj/jvmti/natBreakpoint.cc \ -gnu/gcj/jvmti/natNormalBreakpoint.cc \ +$(nat_jvmti_source_files) \ gnu/gcj/runtime/natFinalizerThread.cc \ gnu/gcj/runtime/natSharedLibLoader.cc \ gnu/gcj/runtime/natSystemClassLoader.cc \ @@ -9726,7 +9752,7 @@ distclean-tags: distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) - $(mkdir_p) $(distdir)/. $(distdir)/.. $(distdir)/../config $(distdir)/scripts + $(mkdir_p) $(distdir)/. $(distdir)/.. $(distdir)/../config $(distdir)/libltdl $(distdir)/scripts @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ diff --git a/libjava/boehm.cc b/libjava/boehm.cc index 3aa0acba987..4a7fc4a8230 100644 --- a/libjava/boehm.cc +++ b/libjava/boehm.cc @@ -380,6 +380,7 @@ _Jv_AllocRawObj (jsize size) return (void *) GC_MALLOC (size ? size : 1); } +#ifdef INTERPRETER typedef _Jv_ClosureList *closure_list_pointer; /* Release closures in a _Jv_ClosureList. */ @@ -402,6 +403,7 @@ _Jv_ClosureListFinalizer () NULL, NULL, NULL); return clpp; } +#endif // INTERPRETER static void call_finalizer (GC_PTR obj, GC_PTR client_data) diff --git a/libjava/configure b/libjava/configure index 8fb5af52679..174cac73704 100755 --- a/libjava/configure +++ b/libjava/configure @@ -459,7 +459,7 @@ ac_includes_default="\ #endif" ac_subdirs_all="$ac_subdirs_all classpath libltdl" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os build_libsubdir build_subdir host_subdir target_subdir multi_basedir host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical LN_S mkinstalldirs JAVA_MAINTAINER_MODE_TRUE JAVA_MAINTAINER_MODE_FALSE CC ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CFLAGS CXXFLAGS LDFLAGS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE AS ac_ct_AS LD ac_ct_LD AR ac_ct_AR RANLIB ac_ct_RANLIB JAR ZIP UNZIP MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBGCJ_CFLAGS LIBGCJ_CXXFLAGS LIBGCJ_JAVAFLAGS LIBGCJ_LD_SYMBOLIC LIBGCJ_LD_SYMBOLIC_FUNCTIONS LIBGCJDEBUG TOOLKIT XLIB_AWT_TRUE XLIB_AWT_FALSE X_AWT_TRUE X_AWT_FALSE GCJ_FOR_ECJX GCJH host_exeext INCLTDL LIBLTDL DIRLTDL LIBTOOL SED EGREP FGREP GREP DUMPBIN ac_ct_DUMPBIN NM lt_ECHO CPP CPPFLAGS CXXCPP GCJ GCJFLAGS GCJDEPMODE am__fastdepGCJ_TRUE am__fastdepGCJ_FALSE subdirs TESTSUBDIR_TRUE TESTSUBDIR_FALSE ECJ_BUILD_JAR ECJ_JAR BUILD_ECJ1_TRUE BUILD_ECJ1_FALSE INSTALL_ECJ_JAR_TRUE INSTALL_ECJ_JAR_FALSE JAVA_HOME_SET_TRUE JAVA_HOME_SET_FALSE JAVA_HOME INTERPRETER LIBFFI LIBFFIINCS PLATFORM USING_WIN32_PLATFORM_TRUE USING_WIN32_PLATFORM_FALSE USING_POSIX_PLATFORM_TRUE USING_POSIX_PLATFORM_FALSE USING_DARWIN_CRT_TRUE USING_DARWIN_CRT_FALSE SYSTEMSPEC LIBGCJTESTSPEC ZLIBSPEC ZLIBTESTSPEC X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS extra_ldflags_libjava GCLIBS GCINCS GCDEPS GCSPEC JC1GCSPEC GCTESTSPEC USING_BOEHMGC_TRUE USING_BOEHMGC_FALSE USING_NOGC_TRUE USING_NOGC_FALSE THREADLIBS THREADINCS THREADDEPS THREADSPEC THREADSTARTFILESPEC THREADLDFLAGS THREADCXXFLAGS USING_POSIX_THREADS_TRUE USING_POSIX_THREADS_FALSE USING_WIN32_THREADS_TRUE USING_WIN32_THREADS_FALSE USING_NO_THREADS_TRUE USING_NO_THREADS_FALSE USE_LIBGCJ_BC_TRUE USE_LIBGCJ_BC_FALSE LIBGCJ_SPEC HASH_SYNC_SPEC USING_GCC_TRUE USING_GCC_FALSE LIBICONV LTLIBICONV PKG_CONFIG GTK_CFLAGS GTK_LIBS GLIB_CFLAGS GLIB_LIBS LIBART_CFLAGS LIBART_LIBS CLASSPATH_SEPARATOR ZLIBS SYS_ZLIBS ZINCS DIVIDESPEC CHECKREFSPEC EXCEPTIONSPEC BACKTRACESPEC IEEESPEC NATIVE_TRUE NATIVE_FALSE ENABLE_SHARED_TRUE ENABLE_SHARED_FALSE NEEDS_DATA_START_TRUE NEEDS_DATA_START_FALSE GCC_UNWIND_INCLUDE toolexecdir toolexecmainlibdir toolexeclibdir GCJVERSION dbexecdir gxx_include_dir libstdcxx_incdir PERL SYSDEP_SOURCES ANONVERSCRIPT_TRUE ANONVERSCRIPT_FALSE LD_START_STATIC_SPEC LD_FINISH_STATIC_SPEC here LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os build_libsubdir build_subdir host_subdir target_subdir multi_basedir host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical LN_S mkinstalldirs JAVA_MAINTAINER_MODE_TRUE JAVA_MAINTAINER_MODE_FALSE CC ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CFLAGS CXXFLAGS LDFLAGS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE AS ac_ct_AS LD ac_ct_LD AR ac_ct_AR RANLIB ac_ct_RANLIB JAR ZIP UNZIP MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBGCJ_CFLAGS LIBGCJ_CXXFLAGS LIBGCJ_JAVAFLAGS LIBGCJ_LD_SYMBOLIC LIBGCJ_LD_SYMBOLIC_FUNCTIONS LIBGCJDEBUG TOOLKIT XLIB_AWT_TRUE XLIB_AWT_FALSE X_AWT_TRUE X_AWT_FALSE GCJ_FOR_ECJX GCJH host_exeext INCLTDL LIBLTDL DIRLTDL LIBTOOL SED EGREP FGREP GREP DUMPBIN ac_ct_DUMPBIN NM lt_ECHO CPP CPPFLAGS CXXCPP GCJ GCJFLAGS GCJDEPMODE am__fastdepGCJ_TRUE am__fastdepGCJ_FALSE subdirs TESTSUBDIR_TRUE TESTSUBDIR_FALSE ECJ_BUILD_JAR ECJ_JAR BUILD_ECJ1_TRUE BUILD_ECJ1_FALSE INSTALL_ECJ_JAR_TRUE INSTALL_ECJ_JAR_FALSE JAVA_HOME_SET_TRUE JAVA_HOME_SET_FALSE JAVA_HOME INTERPRETER INTERPRETER_TRUE INTERPRETER_FALSE LIBFFI LIBFFIINCS PLATFORM USING_WIN32_PLATFORM_TRUE USING_WIN32_PLATFORM_FALSE USING_POSIX_PLATFORM_TRUE USING_POSIX_PLATFORM_FALSE USING_DARWIN_CRT_TRUE USING_DARWIN_CRT_FALSE SYSTEMSPEC LIBGCJTESTSPEC ZLIBSPEC ZLIBTESTSPEC X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS extra_ldflags_libjava GCLIBS GCINCS GCDEPS GCSPEC JC1GCSPEC GCTESTSPEC USING_BOEHMGC_TRUE USING_BOEHMGC_FALSE USING_NOGC_TRUE USING_NOGC_FALSE THREADLIBS THREADINCS THREADDEPS THREADSPEC THREADSTARTFILESPEC THREADLDFLAGS THREADCXXFLAGS USING_POSIX_THREADS_TRUE USING_POSIX_THREADS_FALSE USING_WIN32_THREADS_TRUE USING_WIN32_THREADS_FALSE USING_NO_THREADS_TRUE USING_NO_THREADS_FALSE USE_LIBGCJ_BC_TRUE USE_LIBGCJ_BC_FALSE LIBGCJ_SPEC HASH_SYNC_SPEC USING_GCC_TRUE USING_GCC_FALSE LIBICONV LTLIBICONV PKG_CONFIG GTK_CFLAGS GTK_LIBS GLIB_CFLAGS GLIB_LIBS LIBART_CFLAGS LIBART_LIBS CLASSPATH_SEPARATOR ZLIBS SYS_ZLIBS ZINCS DIVIDESPEC CHECKREFSPEC EXCEPTIONSPEC BACKTRACESPEC IEEESPEC NATIVE_TRUE NATIVE_FALSE ENABLE_SHARED_TRUE ENABLE_SHARED_FALSE NEEDS_DATA_START_TRUE NEEDS_DATA_START_FALSE GCC_UNWIND_INCLUDE toolexecdir toolexecmainlibdir toolexeclibdir GCJVERSION dbexecdir gxx_include_dir libstdcxx_incdir PERL SYSDEP_SOURCES ANONVERSCRIPT_TRUE ANONVERSCRIPT_FALSE LD_START_STATIC_SPEC LD_FINISH_STATIC_SPEC here LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -18487,6 +18487,16 @@ fi INTERPRETER="$libgcj_interpreter" + +if test "$libgcj_interpreter" = yes; then + INTERPRETER_TRUE= + INTERPRETER_FALSE='#' +else + INTERPRETER_TRUE='#' + INTERPRETER_FALSE= +fi + + echo "$as_me:$LINENO: checking for exception model to use" >&5 echo $ECHO_N "checking for exception model to use... $ECHO_C" >&6 ac_ext=cc @@ -18501,7 +18511,7 @@ if test "${enable_sjlj_exceptions+set}" = set; then : else cat > conftest.$ac_ext << EOF -#line 18504 "configure" +#line 18514 "configure" struct S { ~S(); }; void bar(); void foo() @@ -27948,6 +27958,13 @@ echo "$as_me: error: conditional \"JAVA_HOME_SET\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi +if test -z "${INTERPRETER_TRUE}" && test -z "${INTERPRETER_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"INTERPRETER\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"INTERPRETER\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi if test -z "${USING_WIN32_PLATFORM_TRUE}" && test -z "${USING_WIN32_PLATFORM_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"USING_WIN32_PLATFORM\" was never defined. Usually this means the macro was only invoked conditionally." >&5 @@ -29180,6 +29197,8 @@ s,@JAVA_HOME_SET_TRUE@,$JAVA_HOME_SET_TRUE,;t t s,@JAVA_HOME_SET_FALSE@,$JAVA_HOME_SET_FALSE,;t t s,@JAVA_HOME@,$JAVA_HOME,;t t s,@INTERPRETER@,$INTERPRETER,;t t +s,@INTERPRETER_TRUE@,$INTERPRETER_TRUE,;t t +s,@INTERPRETER_FALSE@,$INTERPRETER_FALSE,;t t s,@LIBFFI@,$LIBFFI,;t t s,@LIBFFIINCS@,$LIBFFIINCS,;t t s,@PLATFORM@,$PLATFORM,;t t diff --git a/libjava/configure.ac b/libjava/configure.ac index 1a9452d7018..70af506dd0f 100644 --- a/libjava/configure.ac +++ b/libjava/configure.ac @@ -564,6 +564,7 @@ if test "$libgcj_interpreter" = yes; then fi INTERPRETER="$libgcj_interpreter" AC_SUBST(INTERPRETER) +AM_CONDITIONAL(INTERPRETER, test "$libgcj_interpreter" = yes) AC_MSG_CHECKING([for exception model to use]) AC_LANG_PUSH(C++) diff --git a/libjava/gcj/Makefile.in b/libjava/gcj/Makefile.in index d5966044821..8b4c28ec229 100644 --- a/libjava/gcj/Makefile.in +++ b/libjava/gcj/Makefile.in @@ -42,7 +42,9 @@ DIST_COMMON = $(gcj_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/libgcj-config.h.in \ $(toolgcj_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/libltdl/acinclude.m4 \ + $(top_srcdir)/../config/acx.m4 \ + $(top_srcdir)/../config/confsubdir.m4 \ $(top_srcdir)/../config/depstand.m4 \ $(top_srcdir)/../config/enable.m4 \ $(top_srcdir)/../config/gxx-include-dir.m4 \ @@ -57,10 +59,11 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ $(top_srcdir)/../config/no-executables.m4 \ $(top_srcdir)/../config/tls.m4 \ $(top_srcdir)/../config/unwind_ipinfo.m4 \ - $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \ - $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \ - $(top_srcdir)/mingwld.m4 $(top_srcdir)/pkg.m4 \ - $(top_srcdir)/shlibpath.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltgcc.m4 \ + $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \ + $(top_srcdir)/../ltversion.m4 $(top_srcdir)/mingwld.m4 \ + $(top_srcdir)/pkg.m4 $(top_srcdir)/shlibpath.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) CONFIG_HEADER = $(top_builddir)/include/config.h libgcj-config.h @@ -150,6 +153,8 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRETER = @INTERPRETER@ +INTERPRETER_FALSE = @INTERPRETER_FALSE@ +INTERPRETER_TRUE = @INTERPRETER_TRUE@ JAR = @JAR@ JAVA_HOME = @JAVA_HOME@ JAVA_HOME_SET_FALSE = @JAVA_HOME_SET_FALSE@ diff --git a/libjava/include/Makefile.in b/libjava/include/Makefile.in index bd2d95d3bec..49f8767e09c 100644 --- a/libjava/include/Makefile.in +++ b/libjava/include/Makefile.in @@ -41,7 +41,9 @@ subdir = include DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/config.h.in $(tool_include__HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/libltdl/acinclude.m4 \ + $(top_srcdir)/../config/acx.m4 \ + $(top_srcdir)/../config/confsubdir.m4 \ $(top_srcdir)/../config/depstand.m4 \ $(top_srcdir)/../config/enable.m4 \ $(top_srcdir)/../config/gxx-include-dir.m4 \ @@ -56,10 +58,11 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ $(top_srcdir)/../config/no-executables.m4 \ $(top_srcdir)/../config/tls.m4 \ $(top_srcdir)/../config/unwind_ipinfo.m4 \ - $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \ - $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \ - $(top_srcdir)/mingwld.m4 $(top_srcdir)/pkg.m4 \ - $(top_srcdir)/shlibpath.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltgcc.m4 \ + $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \ + $(top_srcdir)/../ltversion.m4 $(top_srcdir)/mingwld.m4 \ + $(top_srcdir)/pkg.m4 $(top_srcdir)/shlibpath.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) CONFIG_HEADER = config.h $(top_builddir)/gcj/libgcj-config.h @@ -149,6 +152,8 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRETER = @INTERPRETER@ +INTERPRETER_FALSE = @INTERPRETER_FALSE@ +INTERPRETER_TRUE = @INTERPRETER_TRUE@ JAR = @JAR@ JAVA_HOME = @JAVA_HOME@ JAVA_HOME_SET_FALSE = @JAVA_HOME_SET_FALSE@ diff --git a/libjava/include/config.h.in b/libjava/include/config.h.in index b47f248686e..99da702417c 100644 --- a/libjava/include/config.h.in +++ b/libjava/include/config.h.in @@ -46,6 +46,9 @@ /* Define to 1 if you have the <bstring.h> header file. */ #undef HAVE_BSTRING_H +/* Define to 1 if the target assembler supports thread-local storage. */ +#undef HAVE_CC_TLS + /* Define to 1 if you have the `chmod' function. */ #undef HAVE_CHMOD @@ -379,6 +382,10 @@ library search path. */ #undef LTDL_SHLIBPATH_VAR +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR + /* Define if MinGW libgcj uses the Windows UNICODE OS API. */ #undef MINGW_LIBGCJ_UNICODE diff --git a/libjava/include/execution.h b/libjava/include/execution.h index eac6133c5b7..c48b2fc3273 100644 --- a/libjava/include/execution.h +++ b/libjava/include/execution.h @@ -199,6 +199,7 @@ struct _Jv_IndirectCompiledEngine : public _Jv_CompiledEngine _Jv_Free (aux->field_initializers); } +#ifdef INTERPRETER static _Jv_ClosureList **do_get_closure_list (jclass klass) { _Jv_IndirectCompiledClass *aux = get_aux_info (klass); @@ -208,9 +209,10 @@ struct _Jv_IndirectCompiledEngine : public _Jv_CompiledEngine return aux->closures; } +#endif }; - +#ifdef INTERPRETER // This handles interpreted code. class _Jv_InterpreterEngine : public _Jv_ExecutionEngine @@ -266,8 +268,9 @@ class _Jv_InterpreterEngine : public _Jv_ExecutionEngine } }; - extern _Jv_InterpreterEngine _Jv_soleInterpreterEngine; +#endif // INTERPRETER + extern _Jv_CompiledEngine _Jv_soleCompiledEngine; extern _Jv_IndirectCompiledEngine _Jv_soleIndirectCompiledEngine; #endif // __JAVA_EXECUTION_H__ diff --git a/libjava/include/java-interp.h b/libjava/include/java-interp.h index f0b77f97b35..b0d0da411c1 100644 --- a/libjava/include/java-interp.h +++ b/libjava/include/java-interp.h @@ -15,6 +15,13 @@ details. */ #include <java-cpool.h> #include <gnu/gcj/runtime/NameFinder.h> +enum _Jv_FrameType +{ + frame_native, + frame_interpreter, + frame_proxy +}; + #ifdef INTERPRETER #pragma interface @@ -373,13 +380,6 @@ public: } }; -enum _Jv_FrameType -{ - frame_native, - frame_interpreter, - frame_proxy -}; - // The composite call stack as represented by a linked list of frames class _Jv_Frame { diff --git a/libjava/interpret.cc b/libjava/interpret.cc index 092f3dd5f00..0622c3998f3 100644 --- a/libjava/interpret.cc +++ b/libjava/interpret.cc @@ -43,8 +43,6 @@ details. */ #include <gnu/gcj/jvmti/Breakpoint.h> #include <gnu/gcj/jvmti/BreakpointManager.h> -#ifdef INTERPRETER - // Execution engine for interpreted code. _Jv_InterpreterEngine _Jv_soleInterpreterEngine; @@ -1932,5 +1930,3 @@ _Jv_CompileMethod (_Jv_InterpMethod* method) } } #endif // DIRECT_THREADED - -#endif // INTERPRETER diff --git a/libjava/java/lang/Class.h b/libjava/java/lang/Class.h index 10a25eb6c73..d4a918483c3 100644 --- a/libjava/java/lang/Class.h +++ b/libjava/java/lang/Class.h @@ -97,9 +97,9 @@ class _Jv_Linker; class _Jv_ExecutionEngine; class _Jv_CompiledEngine; class _Jv_IndirectCompiledEngine; -class _Jv_InterpreterEngine; #ifdef INTERPRETER +class _Jv_InterpreterEngine; class _Jv_ClassReader; class _Jv_InterpClass; class _Jv_InterpMethod; @@ -619,6 +619,7 @@ private: friend class ::_Jv_ClassReader; friend class ::_Jv_InterpClass; friend class ::_Jv_InterpMethod; + friend class ::_Jv_InterpreterEngine; #endif friend class ::_Jv_StackTrace; @@ -633,7 +634,6 @@ private: friend class ::_Jv_ExecutionEngine; friend class ::_Jv_CompiledEngine; friend class ::_Jv_IndirectCompiledEngine; - friend class ::_Jv_InterpreterEngine; friend class ::_Jv_ClosureList; friend void ::_Jv_sharedlib_register_hook (jclass klass); diff --git a/libjava/java/lang/natClass.cc b/libjava/java/lang/natClass.cc index 754681d832a..47d7739c715 100644 --- a/libjava/java/lang/natClass.cc +++ b/libjava/java/lang/natClass.cc @@ -671,6 +671,7 @@ java::lang::Class::finalize (void) engine->unregister(this); } +#ifdef INTERPRETER void _Jv_ClosureList::releaseClosures (_Jv_ClosureList **closures) { @@ -692,6 +693,7 @@ _Jv_ClosureList::registerClosure (jclass klass, void *ptr) this->next = *closures; *closures = this; } +#endif // This implements the initialization process for a class. From Spec // section 12.4.2. @@ -2065,6 +2067,7 @@ _Jv_GetClassState (jclass klass) return klass->state; } +#ifdef INTERPRETER jstring _Jv_GetInterpClassSourceFile (jclass klass) { @@ -2077,3 +2080,4 @@ _Jv_GetInterpClassSourceFile (jclass klass) return NULL; } +#endif diff --git a/libjava/java/lang/natThread.cc b/libjava/java/lang/natThread.cc index 42f18c4eb3a..d6abff13f54 100644 --- a/libjava/java/lang/natThread.cc +++ b/libjava/java/lang/natThread.cc @@ -27,8 +27,11 @@ details. */ #include <java/lang/NullPointerException.h> #include <jni.h> + +#ifdef INTERPRETER #include <jvmti.h> #include "jvmti-int.h" +#endif #ifdef ENABLE_JVMPI #include <jvmpi.h> @@ -217,8 +220,10 @@ java::lang::Thread::finish_ () nt->park_helper.deactivate (); group->removeThread (this); +#ifdef INTERPRETER if (JVMTI_REQUESTED_EVENT (ThreadEnd)) _Jv_JVMTI_PostEvent (JVMTI_EVENT_THREAD_END, this, nt->jni_env); +#endif #ifdef ENABLE_JVMPI if (_Jv_JVMPI_Notify_THREAD_END) @@ -258,11 +263,13 @@ java::lang::Thread::finish_ () static void _Jv_NotifyThreadStart (java::lang::Thread* thread) { +#ifdef INTERPRETER if (JVMTI_REQUESTED_EVENT (ThreadStart)) { natThread *nt = reinterpret_cast<natThread *> (thread->data); _Jv_JVMTI_PostEvent (JVMTI_EVENT_THREAD_START, thread, nt->jni_env); } +#endif #ifdef ENABLE_JVMPI if (_Jv_JVMPI_Notify_THREAD_START) diff --git a/libjava/java/lang/reflect/natVMProxy.cc b/libjava/java/lang/reflect/natVMProxy.cc index 1d9a3c6a551..a1b7dfcc398 100644 --- a/libjava/java/lang/reflect/natVMProxy.cc +++ b/libjava/java/lang/reflect/natVMProxy.cc @@ -42,6 +42,7 @@ details. */ #include <java/lang/IllegalArgumentException.h> #include <java/lang/Integer.h> #include <java/lang/StringBuffer.h> +#include <java/lang/UnsupportedOperationException.h> #include <java/lang/VMClassLoader.h> #include <java/lang/VMCompiler.h> #include <java/lang/reflect/InvocationHandler.h> @@ -65,6 +66,15 @@ details. */ using namespace java::lang::reflect; using namespace java::lang; +#ifndef INTERPRETER +jclass +java::lang::reflect::VMProxy::generateProxyClass + (ClassLoader *, Proxy$ProxyData *) +{ + throw new UnsupportedOperationException ( + JvNewStringLatin1 ("Interpreter not available")); +} +#else typedef void (*closure_fun) (ffi_cif*, void*, void**, void*); static void *ncode (int method_index, jclass klass, _Jv_Method *self, closure_fun fun); static void run_proxy (ffi_cif*, void*, void**, void*); @@ -444,3 +454,5 @@ ncode (int method_index, jclass klass, _Jv_Method *self, closure_fun fun) self->ncode = code; return self->ncode; } + +#endif // INTERPRETER diff --git a/libjava/jni.cc b/libjava/jni.cc index 549d4fb06d3..8660753ee9b 100644 --- a/libjava/jni.cc +++ b/libjava/jni.cc @@ -22,9 +22,10 @@ details. */ #ifdef ENABLE_JVMPI #include <jvmpi.h> #endif +#ifdef INTERPRETER #include <jvmti.h> #include "jvmti-int.h" - +#endif #include <java/lang/Class.h> #include <java/lang/ClassLoader.h> #include <java/lang/Throwable.h> @@ -452,7 +453,8 @@ _Jv_JNI_PopSystemFrame (JNIEnv *env) _Jv_JNI_PopLocalFrame (env, NULL, MARK_SYSTEM); else env->locals = NULL; - + +#ifdef INTERPRETER if (__builtin_expect (env->ex != NULL, false)) { jthrowable t = env->ex; @@ -461,6 +463,7 @@ _Jv_JNI_PopSystemFrame (JNIEnv *env) _Jv_ReportJVMTIExceptionThrow (t); throw t; } +#endif } template<typename T> T extract_from_jvalue(jvalue const & t); @@ -2535,12 +2538,14 @@ _Jv_JNI_GetEnv (JavaVM *, void **penv, jint version) } #endif +#ifdef INTERPRETER // Handle JVMTI requests if (version == JVMTI_VERSION_1_0) { *penv = (void *) _Jv_GetJVMTIEnv (); return 0; } +#endif // FIXME: do we really want to support 1.1? if (version != JNI_VERSION_1_4 && version != JNI_VERSION_1_2 diff --git a/libjava/link.cc b/libjava/link.cc index 1d873acf288..3b4f37d1d3c 100644 --- a/libjava/link.cc +++ b/libjava/link.cc @@ -33,8 +33,10 @@ details. */ #include <limits.h> #include <java-cpool.h> #include <execution.h> +#ifdef INTERPRETER #include <jvmti.h> #include "jvmti-int.h" +#endif #include <java/lang/Class.h> #include <java/lang/String.h> #include <java/lang/StringBuffer.h> @@ -853,7 +855,7 @@ _Jv_ThrowNoSuchMethodError () throw new java::lang::NoSuchMethodError; } -#if defined USE_LIBFFI && FFI_CLOSURES +#if defined USE_LIBFFI && FFI_CLOSURES && defined(INTERPRETER) // A function whose invocation is prepared using libffi. It gets called // whenever a static method of a missing class is invoked. The data argument // holds a reference to a String denoting the missing class. @@ -1039,7 +1041,7 @@ _Jv_Linker::find_iindex (jclass *ifaces, jshort *offsets, jshort num) return i; } -#if defined USE_LIBFFI && FFI_CLOSURES +#if defined USE_LIBFFI && FFI_CLOSURES && defined(INTERPRETER) // We use a structure of this type to store the closure that // represents a missing method. struct method_closure @@ -2069,6 +2071,7 @@ _Jv_Linker::wait_for_state (jclass klass, int state) throw new java::lang::LinkageError; } +#ifdef INTERPRETER if (__builtin_expect (klass->state == JV_STATE_LINKED, false) && state >= JV_STATE_LINKED && JVMTI_REQUESTED_EVENT (ClassPrepare)) @@ -2077,4 +2080,5 @@ _Jv_Linker::wait_for_state (jclass klass, int state) _Jv_JVMTI_PostEvent (JVMTI_EVENT_CLASS_PREPARE, self, jni_env, klass); } +#endif } diff --git a/libjava/prims.cc b/libjava/prims.cc index 5d3a260e9d0..d94cd92cbc7 100644 --- a/libjava/prims.cc +++ b/libjava/prims.cc @@ -32,8 +32,10 @@ details. */ #include <java/lang/ThreadGroup.h> #endif +#ifdef INTERPRETER #include <jvmti.h> #include "jvmti-int.h" +#endif #ifndef DISABLE_GETENV_PROPERTIES #include <ctype.h> @@ -67,8 +69,12 @@ details. */ #include <gnu/gcj/runtime/ExtensionClassLoader.h> #include <gnu/gcj/runtime/FinalizerThread.h> #include <execution.h> + +#ifdef INTERPRETER #include <gnu/classpath/jdwp/Jdwp.h> #include <gnu/classpath/jdwp/VMVirtualMachine.h> +#endif // INTERPRETER + #include <gnu/java/lang/MainThread.h> #ifdef USE_LTDL @@ -105,6 +111,7 @@ int _Jv_argc; // Debugging options static bool remoteDebug = false; +#ifdef INTERPRETER static char defaultJdwpOptions[] = ""; static char *jdwpOptions = defaultJdwpOptions; @@ -117,6 +124,7 @@ typedef jint jvmti_agent_onunload_func (JavaVM *vm); static jvmti_agent_onload_func *jvmti_agentonload = NULL; static jvmti_agent_onunload_func *jvmti_agentonunload = NULL; static char *jvmti_agent_opts; +#endif // INTERPRETER // Argument support. int @@ -1173,6 +1181,7 @@ parse_x_arg (char* option_string) { remoteDebug = true; } +#ifdef INTERPRETER else if (! strncmp (option_string, "runjdwp:", 8)) { if (strlen (option_string) > 8) @@ -1184,6 +1193,7 @@ parse_x_arg (char* option_string) return -1; } } +#endif // INTERPRETER else if (! strncmp (option_string, "bootclasspath:", 14)) { // FIXME: add a parse_bootclasspath_arg function @@ -1372,6 +1382,7 @@ parse_verbose_args (char* option_string, return 0; } +#ifdef INTERPRETER // This function loads the agent functions for JVMTI from the library indicated // by name. It returns a negative value on failure, the value of which // indicates where ltdl failed, it also prints an error message. @@ -1427,6 +1438,7 @@ load_jvmti_agent (const char *name) // If LTDL cannot be used, return an error code indicating this. return -99; } +#endif // INTERPRETER static jint parse_init_args (JvVMInitArgs* vm_args) @@ -1481,6 +1493,7 @@ parse_init_args (JvVMInitArgs* vm_args) continue; } +#ifdef INTERPRETER else if (! strncmp (option_string, "-agentlib", sizeof ("-agentlib") - 1)) { char *strPtr; @@ -1575,6 +1588,7 @@ parse_init_args (JvVMInitArgs* vm_args) JVMTI::enabled = true; continue; } +#endif // INTERPRETER else { int r = -1; @@ -1666,7 +1680,10 @@ _Jv_CreateJavaVM (JvVMInitArgs* vm_args) _Jv_platform_initialize (); _Jv_JNI_Init (); + +#ifdef INTERPRETER _Jv_JVMTI_Init (); +#endif _Jv_GCInitializeFinalizers (&::gnu::gcj::runtime::FinalizerThread::finalizerReady); @@ -1734,7 +1751,8 @@ _Jv_RunMain (JvVMInitArgs *vm_args, jclass klass, const char *name, int argc, main_thread = new MainThread (JvNewStringUTF (name), arg_vec, is_jar); _Jv_AttachCurrentThread (main_thread); - + +#ifdef INTERPRETER // Start JVMTI if an agent function has been found. if (jvmti_agentonload) (*jvmti_agentonload) (_Jv_GetJavaVM (), jvmti_agent_opts, NULL); @@ -1755,6 +1773,7 @@ _Jv_RunMain (JvVMInitArgs *vm_args, jclass klass, const char *name, int argc, // Send VMInit if (JVMTI_REQUESTED_EVENT (VMInit)) _Jv_JVMTI_PostEvent (JVMTI_EVENT_VM_INIT, main_thread); +#endif // INTERPRETER } catch (java::lang::Throwable *t) { @@ -1769,6 +1788,7 @@ _Jv_RunMain (JvVMInitArgs *vm_args, jclass klass, const char *name, int argc, _Jv_ThreadRun (main_thread); +#ifdef INTERPRETER // Send VMDeath if (JVMTI_REQUESTED_EVENT (VMDeath)) { @@ -1776,10 +1796,11 @@ _Jv_RunMain (JvVMInitArgs *vm_args, jclass klass, const char *name, int argc, JNIEnv *jni_env = _Jv_GetCurrentJNIEnv (); _Jv_JVMTI_PostEvent (JVMTI_EVENT_VM_DEATH, thread, jni_env); } - - // Run JVMTI AgentOnUnload if it exists and an agent is loaded. + + // Run JVMTI AgentOnUnload if it exists and an agent is loaded. if (jvmti_agentonunload) (*jvmti_agentonunload) (_Jv_GetJavaVM ()); +#endif // INTERPRETER // If we got here then something went wrong, as MainThread is not // supposed to terminate. diff --git a/libjava/scripts/makemake.tcl b/libjava/scripts/makemake.tcl index ab8a85d2c29..b1789a16d89 100755 --- a/libjava/scripts/makemake.tcl +++ b/libjava/scripts/makemake.tcl @@ -36,6 +36,11 @@ proc verbose {text} { # objects in this package are not used. Note however that # most ignored files are actually handled by listing them in # 'standard.omit' +# * interpreter +# objects in this package (and possibly sub-packages, +# if they do not appear in the map) are only compiled if +# the interpreter is enabled. They are compiled as with the +# 'package' specifier. # # If a package does not appear in the map, the default is 'package'. global package_map @@ -93,6 +98,19 @@ set package_map(gnu/javax/swing/text/html/parser/support) package set package_map(gnu/gcj/xlib) package set package_map(gnu/awt/xlib) package +# These packages should only be included if the interpreter is +# enabled. +set package_map(gnu/classpath/jdwp) interpreter +set package_map(gnu/classpath/jdwp/event) interpreter +set package_map(gnu/classpath/jdwp/event/filters) interpreter +set package_map(gnu/classpath/jdwp/exception) interpreter +set package_map(gnu/classpath/jdwp/id) interpreter +set package_map(gnu/classpath/jdwp/processor) interpreter +set package_map(gnu/classpath/jdwp/transport) interpreter +set package_map(gnu/classpath/jdwp/util) interpreter +set package_map(gnu/classpath/jdwp/value) interpreter +set package_map(gnu/gcj/jvmti) interpreter + # Some BC ABI packages have classes which must not be compiled BC. # This maps such packages to a grep expression for excluding such # classes. @@ -138,9 +156,16 @@ set properties_files {} # List of all '@' files that we are going to compile. set package_files {} +# List of all '@' files that we are going to compile if the +# interpreter is enabled. +set interpreter_package_files {} + # List of all header file variables. set header_vars {} +# List of all header file variables for interpreter packages. +set interpreter_header_vars {} + # List of all BC object files. set bc_objects {} @@ -300,8 +325,8 @@ proc emit_bc_rule {package} { } # Emit a rule for a 'package' package. -proc emit_package_rule {package} { - global package_map exclusion_map package_files +proc emit_package_rule_to_list {package package_files_list} { + global package_map exclusion_map $package_files_list if {$package == "."} { set pkgname ordinary @@ -333,10 +358,20 @@ proc emit_package_rule {package} { if {$pkgname != "gnu/gcj/xlib" && $pkgname != "gnu/awt/xlib" && $pkgname != "gnu/gcj/tools/gcj_dbtool"} { - lappend package_files $lname + lappend $package_files_list $lname } } +proc emit_package_rule {package} { + global package_files + emit_package_rule_to_list $package package_files +} + +proc emit_interpreter_rule {package} { + global interpreter_package_files + emit_package_rule_to_list $package interpreter_package_files +} + # Emit a rule to build a package full of 'ordinary' files, that is, # one .o for each .java. proc emit_ordinary_rule {package} { @@ -382,7 +417,7 @@ proc emit_process_package_rule {platform} { # Emit a source file variable for a package, and corresponding header # file variable, if needed. proc emit_source_var {package} { - global package_map name_map dir_map header_vars + global package_map name_map dir_map header_vars interpreter_header_vars if {$package == "."} { set pkgname ordinary @@ -428,7 +463,11 @@ proc emit_source_var {package} { puts "${uname}_header_files = $result" puts "" if {$pkgname != "gnu/gcj/xlib" && $pkgname != "gnu/awt/xlib"} { - lappend header_vars "${uname}_header_files" + if {$package_map($package) == "interpreter"} { + lappend interpreter_header_vars "${uname}_header_files" + } else { + lappend header_vars "${uname}_header_files" + } } } } @@ -490,6 +529,8 @@ foreach package [lsort [array names package_map]] { emit_ordinary_rule $package } elseif {$package_map($package) == "package"} { emit_package_rule $package + } elseif {$package_map($package) == "interpreter"} { + emit_interpreter_rule $package } else { error "unrecognized type: $package_map($package)" } @@ -499,6 +540,21 @@ emit_process_package_rule Ecos emit_process_package_rule Win32 emit_process_package_rule Posix +puts "if INTERPRETER" +pp_var interpreter_packages_source_files $interpreter_package_files +pp_var interpreter_header_files $interpreter_header_vars "\$(" ")" +puts "" +puts "else" +puts "" +puts "interpreter_packages_source_files=" +puts "" +puts "interpreter_header_files=" +puts "" +puts "endif" + +lappend package_files {$(interpreter_packages_source_files)} +lappend header_vars interpreter_header_files + pp_var all_packages_source_files $package_files pp_var ordinary_header_files $header_vars "\$(" ")" pp_var bc_objects $bc_objects diff --git a/libjava/sources.am b/libjava/sources.am index 89097563d71..41f23fcdd9f 100644 --- a/libjava/sources.am +++ b/libjava/sources.am @@ -8537,12 +8537,9 @@ java/process-Posix.list: java/lang/PosixProcess.java -include java/process-Posix.deps +if INTERPRETER -all_packages_source_files = \ - gnu/awt.list \ - gnu/awt/j2d.list \ - gnu/classpath.list \ - gnu/classpath/debug.list \ +interpreter_packages_source_files = \ gnu/classpath/jdwp.list \ gnu/classpath/jdwp/event.list \ gnu/classpath/jdwp/event/filters.list \ @@ -8552,10 +8549,36 @@ all_packages_source_files = \ gnu/classpath/jdwp/transport.list \ gnu/classpath/jdwp/util.list \ gnu/classpath/jdwp/value.list \ + gnu/gcj/jvmti.list + +interpreter_header_files = \ + $(gnu_classpath_jdwp_header_files) \ + $(gnu_classpath_jdwp_event_header_files) \ + $(gnu_classpath_jdwp_event_filters_header_files) \ + $(gnu_classpath_jdwp_exception_header_files) \ + $(gnu_classpath_jdwp_id_header_files) \ + $(gnu_classpath_jdwp_processor_header_files) \ + $(gnu_classpath_jdwp_transport_header_files) \ + $(gnu_classpath_jdwp_util_header_files) \ + $(gnu_classpath_jdwp_value_header_files) \ + $(gnu_gcj_jvmti_header_files) + +else + +interpreter_packages_source_files= + +interpreter_header_files= + +endif + +all_packages_source_files = \ + gnu/awt.list \ + gnu/awt/j2d.list \ + gnu/classpath.list \ + gnu/classpath/debug.list \ gnu/gcj.list \ gnu/gcj/convert.list \ gnu/gcj/io.list \ - gnu/gcj/jvmti.list \ gnu/gcj/runtime.list \ gnu/gcj/util.list \ gnu/java/awt.list \ @@ -8789,26 +8812,17 @@ all_packages_source_files = \ sun/misc.list \ sun/reflect.list \ sun/reflect/annotation.list \ - sun/reflect/misc.list + sun/reflect/misc.list \ + $(interpreter_packages_source_files) ordinary_header_files = \ $(gnu_awt_header_files) \ $(gnu_awt_j2d_header_files) \ $(gnu_classpath_header_files) \ $(gnu_classpath_debug_header_files) \ - $(gnu_classpath_jdwp_header_files) \ - $(gnu_classpath_jdwp_event_header_files) \ - $(gnu_classpath_jdwp_event_filters_header_files) \ - $(gnu_classpath_jdwp_exception_header_files) \ - $(gnu_classpath_jdwp_id_header_files) \ - $(gnu_classpath_jdwp_processor_header_files) \ - $(gnu_classpath_jdwp_transport_header_files) \ - $(gnu_classpath_jdwp_util_header_files) \ - $(gnu_classpath_jdwp_value_header_files) \ $(gnu_gcj_header_files) \ $(gnu_gcj_convert_header_files) \ $(gnu_gcj_io_header_files) \ - $(gnu_gcj_jvmti_header_files) \ $(gnu_gcj_runtime_header_files) \ $(gnu_gcj_tools_gcj_dbtool_header_files) \ $(gnu_gcj_util_header_files) \ @@ -9039,7 +9053,8 @@ ordinary_header_files = \ $(sun_misc_header_files) \ $(sun_reflect_header_files) \ $(sun_reflect_annotation_header_files) \ - $(sun_reflect_misc_header_files) + $(sun_reflect_misc_header_files) \ + $(interpreter_header_files) bc_objects = \ gnu-CORBA.lo \ diff --git a/libjava/stacktrace.cc b/libjava/stacktrace.cc index c3fbdf4e6a4..8b97cf13e3d 100644 --- a/libjava/stacktrace.cc +++ b/libjava/stacktrace.cc @@ -138,7 +138,6 @@ _Jv_StackTrace::UnwindTraceFn (struct _Unwind_Context *context, void *state_ptr) state->interp_frame = state->interp_frame->next_interp; } else -#endif // We handle proxies in the same way as interpreted classes if (_Jv_is_proxy (func_addr)) { @@ -148,6 +147,7 @@ _Jv_StackTrace::UnwindTraceFn (struct _Unwind_Context *context, void *state_ptr) state->interp_frame = state->interp_frame->next_interp; } else +#endif { #ifdef HAVE_GETIPINFO _Unwind_Ptr ip; diff --git a/libjava/testsuite/Makefile.in b/libjava/testsuite/Makefile.in index 542311cab42..795106c737d 100644 --- a/libjava/testsuite/Makefile.in +++ b/libjava/testsuite/Makefile.in @@ -39,7 +39,9 @@ target_triplet = @target@ subdir = testsuite DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/libltdl/acinclude.m4 \ + $(top_srcdir)/../config/acx.m4 \ + $(top_srcdir)/../config/confsubdir.m4 \ $(top_srcdir)/../config/depstand.m4 \ $(top_srcdir)/../config/enable.m4 \ $(top_srcdir)/../config/gxx-include-dir.m4 \ @@ -54,10 +56,11 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ $(top_srcdir)/../config/no-executables.m4 \ $(top_srcdir)/../config/tls.m4 \ $(top_srcdir)/../config/unwind_ipinfo.m4 \ - $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \ - $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \ - $(top_srcdir)/mingwld.m4 $(top_srcdir)/pkg.m4 \ - $(top_srcdir)/shlibpath.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltgcc.m4 \ + $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \ + $(top_srcdir)/../ltversion.m4 $(top_srcdir)/mingwld.m4 \ + $(top_srcdir)/pkg.m4 $(top_srcdir)/shlibpath.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) CONFIG_HEADER = $(top_builddir)/include/config.h \ @@ -138,6 +141,8 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRETER = @INTERPRETER@ +INTERPRETER_FALSE = @INTERPRETER_FALSE@ +INTERPRETER_TRUE = @INTERPRETER_TRUE@ JAR = @JAR@ JAVA_HOME = @JAVA_HOME@ JAVA_HOME_SET_FALSE = @JAVA_HOME_SET_FALSE@ |