Commit 3297bb46 by Tom Tromey Committed by Tom Tromey

verify.cc (_Jv_BytecodeVerifier::is_assignable_from_slow): Handle case of array…

verify.cc (_Jv_BytecodeVerifier::is_assignable_from_slow): Handle case of array whose component type is not prepared.

	* verify.cc (_Jv_BytecodeVerifier::is_assignable_from_slow):
	Handle case of array whose component type is not prepared.

From-SVN: r47799
parent ecbcf7b3
2001-12-08 Tom Tromey <tromey@redhat.com>
* verify.cc (_Jv_BytecodeVerifier::is_assignable_from_slow):
Handle case of array whose component type is not prepared.
2001-12-07 Tom Tromey <tromey@redhat.com>
* java/lang/ClassLoader.java (defineClass): Rethrow any
......
......@@ -237,12 +237,9 @@ private:
if (target->isPrimitive () || source->isPrimitive ())
return false;
// _Jv_IsAssignableFrom can handle a target which is an
// interface even if it hasn't been prepared.
if ((target->state > JV_STATE_LINKED || target->isInterface ())
&& source->state > JV_STATE_LINKED)
return _Jv_IsAssignableFrom (target, source);
// Check array case first because we can have an array whose
// component type is not prepared; _Jv_IsAssignableFrom
// doesn't handle this correctly.
if (target->isArray ())
{
if (! source->isArray ())
......@@ -250,6 +247,11 @@ private:
target = target->getComponentType ();
source = source->getComponentType ();
}
// _Jv_IsAssignableFrom can handle a target which is an
// interface even if it hasn't been prepared.
else if ((target->state > JV_STATE_LINKED || target->isInterface ())
&& source->state > JV_STATE_LINKED)
return _Jv_IsAssignableFrom (target, source);
else if (target->isInterface ())
{
for (int i = 0; i < source->interface_count; ++i)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment