natClass.cc (getMethod): Compute offset relative to klass's methods table, not this's table.

* java/lang/natClass.cc (getMethod): Compute offset relative to
	`klass's methods table, not `this's table.

	* java/lang/reflect/natMethod.cc (_Jv_CallNonvirtualMethodA):
	In unwrapping/widening case, check whether `k' is null, not
	whether it is primitive.  Initialize `num' from `argelts', not
	`paramelts'.  Correct create and pass arguments to ffi_call.
	Don't let presence of `this' argument affect index used to look in
	argument arrays.
	(COPY): Set appropriate element in `values' vector.

From-SVN: r31253
This commit is contained in:
Tom Tromey 2000-01-06 00:56:21 +00:00 committed by Tom Tromey
parent fe5a581031
commit 41ecf9300e
3 changed files with 38 additions and 25 deletions

View file

@ -477,7 +477,8 @@ java::lang::Class::getMethod (jstring name, JArray<jclass> *param_types)
break;
Method *rmethod = new Method ();
rmethod->offset = (char*) (&klass->methods[i]) - (char*) methods;
rmethod->offset = ((char *) (&klass->methods[i])
- (char *) klass->methods);
rmethod->declaringClass = klass;
return rmethod;
}