diff options
author | Tom Tromey <tromey@cygnus.com> | 2000-02-07 21:17:30 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2000-02-07 21:17:30 +0000 |
commit | f39b788a15fb475faa8733c30fc83ff45130340a (patch) | |
tree | faba3a37f43974f358ae5a8683da016bc6316c15 /libjava | |
parent | f766bd4696b6aeec71bf0168c819e562a12aa96f (diff) | |
download | gcc-f39b788a15fb475faa8733c30fc83ff45130340a.zip gcc-f39b788a15fb475faa8733c30fc83ff45130340a.tar.gz gcc-f39b788a15fb475faa8733c30fc83ff45130340a.tar.bz2 |
jni.cc (add_char): Conditional on INTERPRETER.
* jni.cc (add_char): Conditional on INTERPRETER.
(mangled_name): Likewise.
(call): Likewise.
* include/java-interp.h (class _Jv_MethodBase): Conditional on
INTERPRETER.
(class _Jv_JNIMethod): Likewise.
From-SVN: r31839
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 9 | ||||
-rw-r--r-- | libjava/include/java-interp.h | 28 | ||||
-rw-r--r-- | libjava/jni.cc | 11 |
3 files changed, 28 insertions, 20 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index c3d0586..d3078fa 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,12 @@ +2000-02-07 Tom Tromey <tromey@cygnus.com> + + * jni.cc (add_char): Conditional on INTERPRETER. + (mangled_name): Likewise. + (call): Likewise. + * include/java-interp.h (class _Jv_MethodBase): Conditional on + INTERPRETER. + (class _Jv_JNIMethod): Likewise. + 2000-02-04 Warren Levy <warrenl@cygnus.com> * Makefile.am: Added MPN.java and BigInteger.java. diff --git a/libjava/include/java-interp.h b/libjava/include/java-interp.h index 7022411..8111d40 100644 --- a/libjava/include/java-interp.h +++ b/libjava/include/java-interp.h @@ -14,18 +14,6 @@ details. */ #include <jvm.h> #include <java-cpool.h> -// Base class for method representations. Subclasses are interpreted -// and JNI methods. -class _Jv_MethodBase -{ -protected: - // The class which defined this method. - _Jv_InterpClass *defining_class; - - // The method description. - _Jv_Method *self; -}; - #ifdef INTERPRETER #pragma interface @@ -78,6 +66,18 @@ class _Jv_InterpException { friend class _Jv_InterpMethod; }; +// Base class for method representations. Subclasses are interpreted +// and JNI methods. +class _Jv_MethodBase +{ +protected: + // The class which defined this method. + _Jv_InterpClass *defining_class; + + // The method description. + _Jv_Method *self; +}; + class _Jv_InterpMethod : public _Jv_MethodBase { _Jv_ushort max_stack; @@ -169,8 +169,6 @@ struct _Jv_ResolvedMethod { ffi_type * arg_types[0]; }; -#endif /* INTERPRETER */ - class _Jv_JNIMethod : public _Jv_MethodBase { // The underlying function. If NULL we have to look for the @@ -186,4 +184,6 @@ class _Jv_JNIMethod : public _Jv_MethodBase friend void _Jv_PrepareClass(jclass); }; +#endif /* INTERPRETER */ + #endif /* __JAVA_INTERP_H__ */ diff --git a/libjava/jni.cc b/libjava/jni.cc index da964e1..82105a4 100644 --- a/libjava/jni.cc +++ b/libjava/jni.cc @@ -8,12 +8,6 @@ This software is copyrighted work licensed under the terms of the Libgcj License. Please consult the file "LIBGCJ_LICENSE" for details. */ -// Note: currently we take the approach of not checking most -// arguments. Instead we could do more checking conditionally (e.g., -// if DEBUG is defined). That might be beneficial in some cases, -// though to me it seems that one could just as easily use the -// debugger. - #include <config.h> #include <stddef.h> @@ -1205,6 +1199,8 @@ _Jv_JNI_FromReflectedMethod (JNIEnv *, jobject method) +#ifdef INTERPRETER + // Add a character to the buffer, encoding properly. static void add_char (char *buf, jchar c, int *here) @@ -1347,6 +1343,7 @@ _Jv_JNIMethod::call (ffi_cif *cif, void *ret, ffi_raw *args, void *__this) } // The actual call to the JNI function. + // FIXME: if this is a static function we must include the class! ffi_raw_call (cif, (void (*) (...)) _this->function, ret, args); do @@ -1359,6 +1356,8 @@ _Jv_JNIMethod::call (ffi_cif *cif, void *ret, ffi_raw *args, void *__this) JvThrow (env.ex); } +#endif /* INTERPRETER */ + #define NOT_IMPL NULL |