diff options
author | Tom Tromey <tromey@redhat.com> | 2005-02-19 01:16:30 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2005-02-19 01:16:30 +0000 |
commit | e207dbea7444112a1b1cd3e7ea4e2401d32dc9ea (patch) | |
tree | ec5509829a5ead4d92fffe9ed882573355f2da97 /libjava/link.cc | |
parent | 1870a43b3e9ab55bc5b29284c64be32d08989bf3 (diff) | |
download | gcc-e207dbea7444112a1b1cd3e7ea4e2401d32dc9ea.tar.gz |
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
Diffstat (limited to 'libjava/link.cc')
-rw-r--r-- | libjava/link.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libjava/link.cc b/libjava/link.cc index 8dd809b8687..cfaa3cd363d 100644 --- a/libjava/link.cc +++ b/libjava/link.cc @@ -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. |