re PR libgcj/21906 (hang when invoking abstract method)

gcc/java/:
	PR libgcj/21906:
	* class.c (make_method_value): Use soft_abstractmethod_node for
	abstract method.
	* java-tree.h (soft_abstractmethod_node): New define.
	(JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
	* decl.c (java_init_decl_processing): Initialize
	soft_abstractmethod_node.
libjava/:
	PR libgcj/21906:
	* defineclass.cc (handleMethodsEnd): Set ncode for abstract
	methods.
	* include/jvm.h (_Jv_ThrowAbstractMethodError): Declare.
	* link.cc (_Jv_ThrowAbstractMethodError): Renamed.  No longer
	static.
	(append_partial_itable): Use it.
	(set_vtable_entries): Likewise.

From-SVN: r100992
This commit is contained in:
Tom Tromey 2005-06-15 19:11:43 +00:00 committed by Tom Tromey
parent 92b5fbc5ae
commit fbb4c46b2d
8 changed files with 46 additions and 6 deletions

View file

@ -714,8 +714,8 @@ _Jv_ThrowNoSuchMethodError ()
}
// This is put in empty vtable slots.
static void
_Jv_abstractMethodError (void)
void
_Jv_ThrowAbstractMethodError ()
{
throw new java::lang::AbstractMethodError();
}
@ -767,7 +767,7 @@ _Jv_Linker::append_partial_itable (jclass klass, jclass iface,
(_Jv_GetMethodString (klass, meth));
if ((meth->accflags & Modifier::ABSTRACT) != 0)
itable[pos] = (void *) &_Jv_abstractMethodError;
itable[pos] = (void *) &_Jv_ThrowAbstractMethodError;
else
itable[pos] = meth->ncode;
}
@ -1228,7 +1228,8 @@ _Jv_Linker::set_vtable_entries (jclass klass, _Jv_VTable *vtable)
if ((meth->accflags & Modifier::ABSTRACT))
// FIXME: it might be nice to have a libffi trampoline here,
// so we could pass in the method name and other information.
vtable->set_method(meth->index, (void *) &_Jv_abstractMethodError);
vtable->set_method(meth->index,
(void *) &_Jv_ThrowAbstractMethodError);
else
vtable->set_method(meth->index, meth->ncode);
}