configure.ac (INTERPRETER): New AM_CONDITIONAL.
* 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. From-SVN: r127097
This commit is contained in:
parent
68ae229af3
commit
86acf60c5b
23 changed files with 429 additions and 142 deletions
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue