diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-17 00:18:50 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-17 00:18:50 +0000 |
commit | 8505931ad7cc2928b51f2b39556faf1cf10f1498 (patch) | |
tree | 1c077bcd3965d1e954aabcae14e7bacf373670a5 /libjava | |
parent | fa9d8470a98472ba4d66de53110e6ccac200356d (diff) | |
download | gcc-8505931ad7cc2928b51f2b39556faf1cf10f1498.tar.gz |
* link.cc (ensure_class_linked): Removed #ifdef.
(print_class_loaded): Likewise.
(wait_for_state): Likewise.
* java/lang/Class.h (_Jv_IsInterpretedClass): Always declare.
* include/jvm.h (_Jv_IsInterpretedClass): Moved from...
* include/java-interp.h: ... here.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96589 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 9 | ||||
-rw-r--r-- | libjava/include/java-interp.h | 8 | ||||
-rw-r--r-- | libjava/include/jvm.h | 9 | ||||
-rw-r--r-- | libjava/java/lang/Class.h | 6 | ||||
-rw-r--r-- | libjava/link.cc | 11 |
5 files changed, 24 insertions, 19 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 76bfd406d83..7c9560fc8af 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,5 +1,14 @@ 2005-03-16 Tom Tromey <tromey@redhat.com> + * link.cc (ensure_class_linked): Removed #ifdef. + (print_class_loaded): Likewise. + (wait_for_state): Likewise. + * java/lang/Class.h (_Jv_IsInterpretedClass): Always declare. + * include/jvm.h (_Jv_IsInterpretedClass): Moved from... + * include/java-interp.h: ... here. + +2005-03-16 Tom Tromey <tromey@redhat.com> + * gnu/java/lang/MainThread.java (run): Load main class using system class loader. diff --git a/libjava/include/java-interp.h b/libjava/include/java-interp.h index 569286116ee..061520013d7 100644 --- a/libjava/include/java-interp.h +++ b/libjava/include/java-interp.h @@ -1,6 +1,6 @@ // java-interp.h - Header file for the bytecode interpreter. -*- c++ -*- -/* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation +/* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation This file is part of libgcj. @@ -32,12 +32,6 @@ extern "C" { #include <ffi.h> } -extern inline jboolean -_Jv_IsInterpretedClass (jclass c) -{ - return (c->accflags & java::lang::reflect::Modifier::INTERPRETED) != 0; -} - struct _Jv_ResolvedMethod; void _Jv_InitInterpreter (); diff --git a/libjava/include/jvm.h b/libjava/include/jvm.h index 4dfdb4d3767..62347880bb6 100644 --- a/libjava/include/jvm.h +++ b/libjava/include/jvm.h @@ -572,4 +572,13 @@ _Jv_CheckABIVersion (unsigned long value) || value == (GCJ_VERSION + GCJ_BINARYCOMPAT_ADDITION)); } +// It makes the source cleaner if we simply always define this +// function. If the interpreter is not built, it will never return +// 'true'. +extern inline jboolean +_Jv_IsInterpretedClass (jclass c) +{ + return (c->accflags & java::lang::reflect::Modifier::INTERPRETED) != 0; +} + #endif /* __JAVA_JVM_H__ */ diff --git a/libjava/java/lang/Class.h b/libjava/java/lang/Class.h index 70e314e7cb3..a82089dbf9f 100644 --- a/libjava/java/lang/Class.h +++ b/libjava/java/lang/Class.h @@ -233,8 +233,9 @@ jboolean _Jv_CheckAccess (jclass self_klass, jclass other_klass, jint flags); jclass _Jv_GetArrayClass (jclass klass, java::lang::ClassLoader *loader); -#ifdef INTERPRETER jboolean _Jv_IsInterpretedClass (jclass); + +#ifdef INTERPRETER void _Jv_InitField (jobject, jclass, int); class _Jv_ClassReader; @@ -465,8 +466,9 @@ private: friend jclass (::_Jv_GetArrayClass) (jclass klass, java::lang::ClassLoader *loader); -#ifdef INTERPRETER friend jboolean (::_Jv_IsInterpretedClass) (jclass); + +#ifdef INTERPRETER friend void ::_Jv_InitField (jobject, jclass, int); friend class ::_Jv_ClassReader; diff --git a/libjava/link.cc b/libjava/link.cc index b916bf36539..909a7b68a0e 100644 --- a/libjava/link.cc +++ b/libjava/link.cc @@ -1395,9 +1395,7 @@ _Jv_Linker::ensure_class_linked (jclass klass) // a reference to a class we can't access. This can validly // occur in an obscure case involving the InnerClasses // attribute. -#ifdef INTERPRETER if (! _Jv_IsInterpretedClass (klass)) -#endif { // Resolve class constants first, since other constant pool // entries may rely on these. @@ -1652,11 +1650,7 @@ _Jv_Linker::print_class_loaded (jclass klass) // We use a somewhat bogus test for the ABI here. char *abi; -#ifdef INTERPRETER if (_Jv_IsInterpretedClass (klass)) -#else - if (false) -#endif abi = "bytecode"; else if (klass->state == JV_STATE_PRELOADING) abi = "BC-compiled"; @@ -1693,10 +1687,7 @@ _Jv_Linker::wait_for_state (jclass klass, int state) if (gcj::verbose_class_flag && (klass->state == JV_STATE_COMPILED || klass->state == JV_STATE_PRELOADING) -#ifdef INTERPRETER - && ! _Jv_IsInterpretedClass (klass) -#endif - ) + && ! _Jv_IsInterpretedClass (klass)) print_class_loaded (klass); try |