mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 14:59:39 +02:00
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:
@@ -1288,7 +1288,7 @@ void _Jv_ClassReader::handleMethod
|
||||
throw_class_format_error ("erroneous method access flags");
|
||||
|
||||
// FIXME: JVM spec S4.6: if ABSTRACT modifier is set, verify other
|
||||
// flags are not set. Verify flags for interface methods. Verifiy
|
||||
// flags are not set. Verify flags for interface methods. Verify
|
||||
// modifiers for initializers.
|
||||
}
|
||||
}
|
||||
@@ -1378,6 +1378,7 @@ void _Jv_ClassReader::handleMethodsEnd ()
|
||||
{
|
||||
if (def_interp->interpreted_methods[i] != 0)
|
||||
throw_class_format_error ("code provided for abstract method");
|
||||
method->ncode = (void *) &_Jv_ThrowAbstractMethodError;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user