re PR libgcj/5670 (verify.cc not properly merging states)
2002-02-13 Todd Stock <toddastock@yahoo.com> Fix for PR libgcj/5670: * verify.cc (is_assignable_from_slow): If `source' is interface, recursively look for merge with `target'. From-SVN: r49769
This commit is contained in:
parent
6c4cf6956e
commit
30fbb95c05
2 changed files with 20 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2002-02-13 Todd Stock <toddastock@yahoo.com>
|
||||||
|
|
||||||
|
Fix for PR libgcj/5670:
|
||||||
|
* verify.cc (is_assignable_from_slow): If `source' is interface,
|
||||||
|
recursively look for merge with `target'.
|
||||||
|
|
||||||
2002-02-14 Martin Kahlert <martin.kahlert@infineon.com>
|
2002-02-14 Martin Kahlert <martin.kahlert@infineon.com>
|
||||||
|
|
||||||
* include/jni.h: Fix typo.
|
* include/jni.h: Fix typo.
|
||||||
|
|
|
@ -259,10 +259,22 @@ private:
|
||||||
if (source == NULL)
|
if (source == NULL)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
else if (source->isInterface ())
|
||||||
|
{
|
||||||
|
for (int i = 0; i < target->interface_count; ++i)
|
||||||
|
{
|
||||||
|
// We use a recursive call because we also need to
|
||||||
|
// check superinterfaces.
|
||||||
|
if (is_assignable_from_slow (target->interfaces[i], source))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
target = target->getSuperclass ();
|
||||||
|
if (target == NULL)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
else if (target == &java::lang::Object::class$)
|
else if (target == &java::lang::Object::class$)
|
||||||
return true;
|
return true;
|
||||||
else if (source->isInterface ()
|
else if (source == &java::lang::Object::class$)
|
||||||
|| source == &java::lang::Object::class$)
|
|
||||||
return false;
|
return false;
|
||||||
else
|
else
|
||||||
source = source->getSuperclass ();
|
source = source->getSuperclass ();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue