lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.

2003-10-22  Andrew Haley  <aph@redhat.com>

        * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
        (java_get_callee_fndecl): New.

        * jcf-parse.c (java_parse_file): Call emit_catch_table().

        * java-tree.h (ctable_decl): New.
        (catch_classes):  New.
        (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.

        * decl.c (java_init_decl_processing): Add catch_class_type.
        Add ctable_decl.
        Add catch_classes field.

        * class.c (build_indirect_class_ref): Break out from
        build_class_ref.
        (make_field_value): Check flag_indirect_dispatch.
        (make_class_data): Ditto.
        Tidy uses of PUSH_FIELD_VALUE.
        Add field catch_classes.
        (make_catch_class_record): New.

        * java-tree.h (PUSH_FIELD_VALUE): Tidy.

2003-10-22  Andrew Haley  <aph@redhat.com>

        * java/lang/natClass.cc (initializeClass): Call
        _Jv_linkExceptionClassTable.
        (_Jv_LinkSymbolTable): Call )_Jv_ThrowNoSuchMethodError.  Call
        _Jv_Defer_Resolution on a method whose ncode is NULL.
        (_Jv_linkExceptionClassTable): New function.
        (_Jv_LayoutVTableMethods): If superclass looks like a constant pool
        entry, look it up.
        * java/lang/Class.h (struct _Jv_CatchClass): New.
        (_Jv_linkExceptionClassTable): New friend.
        (_Jv_Defer_Resolution): New friend.
        (class Class.catch_classes): New field.
        * include/java-interp.h (Jv_Defer_Resolution): New method.
        (_Jv_PrepareClass): Make a friend of _Jv_MethodBase.
        (_Jv_MethodBase.deferred): New field.
        (_Jv_Defer_Resolution): New function.
        * resolve.cc (_Jv_PrepareClass): Resolve deferred handlers.
        * exception.cc (get_ttype_entry): Change return type to void**.
        (PERSONALITY_FUNCTION): Remove all code related to using a
        Utf8Const* for a match type.  Change match type to be a pointer to
        a pointer, rather than a pointer to a Class.
        * defineclass.cc (handleCodeAttribute): Initialize
        method->deferred.
        (handleMethodsEnd): Likewise.

From-SVN: r72886
This commit is contained in:
Andrew Haley 2003-10-24 09:29:43 +00:00 committed by Andrew Haley
parent c769a35d59
commit 904715853c
14 changed files with 360 additions and 66 deletions

View file

@ -131,6 +131,12 @@ struct _Jv_AddressTable
void *addresses[];
};
struct _Jv_CatchClass
{
java::lang::Class **address;
_Jv_Utf8Const *classname;
};
#define JV_PRIMITIVE_VTABLE ((_Jv_VTable *) -1)
#define JV_CLASS(Obj) ((jclass) (*(_Jv_VTable **) Obj)->clas)
@ -336,6 +342,7 @@ private:
friend void _Jv_LayoutVTableMethods (jclass klass);
friend void _Jv_SetVTableEntries (jclass, _Jv_VTable *, jboolean *);
friend void _Jv_MakeVTable (jclass);
friend void _Jv_linkExceptionClassTable (jclass);
friend jboolean _Jv_CheckAccess (jclass self_klass, jclass other_klass,
jint flags);
@ -365,6 +372,8 @@ private:
friend void _Jv_PrepareClass (jclass);
friend void _Jv_PrepareMissingMethods (jclass base, jclass iface_class);
friend void _Jv_Defer_Resolution (void *cl, _Jv_Method *meth, void **);
friend class _Jv_ClassReader;
friend class _Jv_InterpClass;
friend class _Jv_InterpMethod;
@ -414,6 +423,7 @@ private:
_Jv_MethodSymbol *otable_syms;
_Jv_AddressTable *atable;
_Jv_MethodSymbol *atable_syms;
_Jv_CatchClass *catch_classes;
// Interfaces implemented by this class.
jclass *interfaces;
// The class loader for this class.