aboutsummaryrefslogtreecommitdiff
path: root/libjava/link.cc
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2005-06-15 19:11:43 +0000
committerTom Tromey <tromey@gcc.gnu.org>2005-06-15 19:11:43 +0000
commitfbb4c46b2d6b1cb70f05c25e01462d90282aece5 (patch)
treed75a57626d585261ba5d3eae3b74954aa5b37586 /libjava/link.cc
parent92b5fbc5aebba9d16fb3247ad0b77020132a2427 (diff)
downloadgcc-fbb4c46b2d6b1cb70f05c25e01462d90282aece5.zip
gcc-fbb4c46b2d6b1cb70f05c25e01462d90282aece5.tar.gz
gcc-fbb4c46b2d6b1cb70f05c25e01462d90282aece5.tar.bz2
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
Diffstat (limited to 'libjava/link.cc')
-rw-r--r--libjava/link.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/libjava/link.cc b/libjava/link.cc
index 3fe0734..e97b31b 100644
--- a/libjava/link.cc
+++ b/libjava/link.cc
@@ -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);
}