jni.cc (_Jv_JNI_GetAnyFieldID): Handle unresolved fields.

* jni.cc (_Jv_JNI_GetAnyFieldID): Handle unresolved fields.
	* java/lang/reflect/natField.cc (getType): Use _Jv_ResolveField
	unconditionally.
	* include/jvm.h (_Jv_ResolveField): Declare.
	* include/java-interp.h (_Jv_ResolveField): Don't declare.
	* resolve.cc (_Jv_ResolveField): No longer conditional on
	INTERPRETER.

From-SVN: r40785
This commit is contained in:
Tom Tromey 2001-03-23 19:15:44 +00:00 committed by Tom Tromey
parent e9f4fa7143
commit 83c64db681
7 changed files with 40 additions and 33 deletions

View file

@ -1,6 +1,6 @@
// natField.cc - Implementation of java.lang.reflect.Field native methods.
/* Copyright (C) 1998, 1999, 2000 Free Software Foundation
/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation
This file is part of libgcj.
@ -44,17 +44,8 @@ jclass
java::lang::reflect::Field::getType ()
{
jfieldID fld = _Jv_FromReflectedField (this);
if (! fld->isResolved())
{
JvSynchronize sync (declaringClass);
if (! fld->isResolved())
{
fld->type
= _Jv_FindClassFromSignature(((Utf8Const*) (fld->type))->data,
declaringClass->getClassLoader());
fld->flags &= ~_Jv_FIELD_UNRESOLVED_FLAG;
}
}
JvSynchronize sync (declaringClass);
_Jv_ResolveField (fld, declaringClass->getClassLoader ());
return fld->type;
}