resolve.cc (ncode): Set args_raw_size.

* resolve.cc (ncode): Set args_raw_size.  Compute jni_cif and
	jni_arg_types.
	(init_cif): Added `rtype_p' argument.
	* include/java-interp.h (class _Jv_MethodBase): Added
	args_raw_size.
	(class _Jv_InterpMethod): Removed args_raw_size.
	(class _Jv_JNIMethod): Added jni_cif and jni_arg_types fields.
	* jni.cc (call): Pass JNIEnv and (for static methods only) the
	class pointer as well as the ordinary arguments.

From-SVN: r31995
This commit is contained in:
Tom Tromey 2000-02-16 00:07:34 +00:00 committed by Tom Tromey
parent f295bdb5eb
commit d348bda453
4 changed files with 71 additions and 9 deletions

View file

@ -76,6 +76,9 @@ protected:
// The method description.
_Jv_Method *self;
// Size of raw arguments.
_Jv_ushort args_raw_size;
};
class _Jv_InterpMethod : public _Jv_MethodBase
@ -85,7 +88,6 @@ class _Jv_InterpMethod : public _Jv_MethodBase
int code_length;
_Jv_ushort exc_count;
_Jv_ushort args_raw_size;
unsigned char* bytecode ()
{
@ -175,6 +177,12 @@ class _Jv_JNIMethod : public _Jv_MethodBase
// function.
void *function;
// This is the CIF used by the JNI function.
ffi_cif jni_cif;
// These are the argument types used by the JNI function.
ffi_type **jni_arg_types;
// This function is used when making a JNI call from the interpreter.
static void call (ffi_cif *, void *, ffi_raw *, void *);