re PR java/20056 ('verification failed: incompatible type on stack' with --indirect-dispatch)

PR java/20056:
	* include/jvm.h (_Jv_Linker::has_field_p): Declare.
	* link.cc (has_field_p): New function.
	* verify.cc (check_field_constant): Added 'putfield' argument.
	(verify_instructions_0): Updated.
	(type::equals): New method.

From-SVN: r95259
This commit is contained in:
Tom Tromey 2005-02-19 01:16:30 +00:00 committed by Tom Tromey
parent 1870a43b3e
commit e207dbea74
4 changed files with 59 additions and 12 deletions

View file

@ -131,6 +131,18 @@ _Jv_Linker::find_field_helper (jclass search, _Jv_Utf8Const *name,
return NULL;
}
bool
_Jv_Linker::has_field_p (jclass search, _Jv_Utf8Const *field_name)
{
for (int i = 0; i < search->field_count; ++i)
{
_Jv_Field *field = &search->fields[i];
if (_Jv_equalUtf8Consts (field->name, field_name))
return true;
}
return false;
}
// Find a field.
// KLASS is the class that is requesting the field.
// OWNER is the class in which the field should be found.