diff options
author | Tom Tromey <tromey@redhat.com> | 2002-12-05 07:43:45 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2002-12-05 07:43:45 +0000 |
commit | eaa2834f9f7aeb81115213fcfb0d2e055afc779e (patch) | |
tree | c34b3facbe8521cce08d485b456e9ded07c686e8 /libjava/defineclass.cc | |
parent | 83f0a003b8206e33923ea484ec74e3ecee1f0c03 (diff) | |
download | gcc-eaa2834f9f7aeb81115213fcfb0d2e055afc779e.zip gcc-eaa2834f9f7aeb81115213fcfb0d2e055afc779e.tar.gz gcc-eaa2834f9f7aeb81115213fcfb0d2e055afc779e.tar.bz2 |
Class.h (_Jv_SetVTableEntries): Updated declaration.
* java/lang/Class.h (_Jv_SetVTableEntries): Updated declaration.
* resolve.cc: Don't include AbstractMethodError.h.
(_Jv_abstractMethodError): Removed.
* defineclass.cc (handleMethodsBegin): Initialize method index to
-1.
* java/lang/natClass.cc (_Jv_LayoutVTableMethods): Don't set
method index for "new" final method.
(_Jv_SetVTableEntries): Compare index against -1 instead of using
isVirtualMethod. Added `flags' argument.
(_Jv_MakeVTable): Throw exception for abstract method in concrete
class.
From-SVN: r59847
Diffstat (limited to 'libjava/defineclass.cc')
-rw-r--r-- | libjava/defineclass.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/libjava/defineclass.cc b/libjava/defineclass.cc index 6a250da..dc35002 100644 --- a/libjava/defineclass.cc +++ b/libjava/defineclass.cc @@ -1184,15 +1184,17 @@ void _Jv_ClassReader::handleFieldsEnd () void _Jv_ClassReader::handleMethodsBegin (int count) { - def->methods = (_Jv_Method*) - _Jv_AllocBytes (sizeof (_Jv_Method)*count); + def->methods = (_Jv_Method *) _Jv_AllocBytes (sizeof (_Jv_Method) * count); def->interpreted_methods = (_Jv_MethodBase **) _Jv_AllocBytes (sizeof (_Jv_MethodBase *) * count); for (int i = 0; i < count; i++) - def->interpreted_methods[i] = 0; + { + def->interpreted_methods[i] = 0; + def->methods[i].index = (_Jv_ushort) -1; + } def->method_count = count; } @@ -1376,12 +1378,14 @@ throw_internal_error (char *msg) throw new java::lang::InternalError (JvNewStringLatin1 (msg)); } -static void throw_incompatible_class_change_error (jstring msg) +static void +throw_incompatible_class_change_error (jstring msg) { throw new java::lang::IncompatibleClassChangeError (msg); } -static void throw_class_circularity_error (jstring msg) +static void +throw_class_circularity_error (jstring msg) { throw new java::lang::ClassCircularityError (msg); } |