diff options
author | Alexandre Petit-Bianco <apbianco@redhat.com> | 2001-08-17 21:07:07 +0000 |
---|---|---|
committer | Alexandre Petit-Bianco <apbianco@redhat.com> | 2001-08-17 21:07:07 +0000 |
commit | 11b781ece42424c9bd4be647260b312a8984e24c (patch) | |
tree | 48423fd61c7cb8b8e91a0e83679b52ebad7e88a7 /gcc/java/decl.c | |
parent | 0f4efed79063f1ad98426561a40239dcd4a90888 (diff) |
2001-08-16 Alexandre Petit-Bianco <apbianco@redhat.com>
* jcf-parse.c (load_class): New locals saved and class_loaded. If
loading a class_or_name fails, try considering an innerclass name
and load the enclosing context.
* parse.y (resolve_inner_class): New function.
(find_as_inner_class): Added leading comment.
(register_incomplete_type): Keep the current context as enclosing
context for JDEP_FIELD dependencies.
(do_resolve_class): Locals new_class_decl and super initialized to
NULL. Call resolve_inner_class, explore the enclosing context
superclass if necessary.
Fixes PR java/4007
2001-08-12 Alexandre Petit-Bianco <apbianco@redhat.com>
* decl.c (init_decl_processing): exception_type_node,
class_not_found_type_node, and no_class_def_found_type_node
initialized. predef_filenames augmented accordingly.
instinit_identifier_node initialized.
* java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
* java-tree.h (enum java_tree_index): New entries
JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
(exception_type_node): New macro.
(class_not_found_type_node): Likewise.
(no_class_def_found_type_node): Likewise.
(instinit_identifier_node): Likewise.
(PREDEF_FILENAMES_SIZE): Adjusted.
(TYPE_HAS_FINAL_VARIABLE): Fixed typo.
(struct lang_type): Fixed typo in bitfield name.
(DECL_INSTINIT_P): New macro.
(ID_INSTINIT_P): Likewise.
* jcf-write.c (generate_classfile): instinit$ bears the Synthetic
attribute.
* parse.y (encapsulate_with_try_catch): New function.
(generate_instinit): Likewise.
(build_instinit_invocation): Likewise.
(ctors_unchecked_throws_clause_p): Likewise.
(add_instance_initializer): Deleted.
(build_instance_initializer): Likewise.
(in_instance_initializer): Likewise.
(check_method_redefinition): instinit$ not to be verified.
(java_complete_expand_methods): Generate instinit$, simplified code.
(build_dot_class_method): Eliminated unnecessary locals. Use
encapsulate_with_try_catch, removed unnecessary code.
(fix_constructors): New local iii. Use build_instinit_invocation.
(patch_method_invocation): Added comment.
(maybe_use_access_method): Don't consider instinit$.
(find_applicable_accessible_methods_list): Shorten the search for
instinit$ too.
(java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
(patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
(patch_throw_statement): Likewise. Fixed typo.
2001-08-09 Alexandre Petit-Bianco <apbianco@redhat.com>
* expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
`poplevel' in the right order.
(http://gcc.gnu.org/ml/gcc-patches/2001-08/msg01061.html )
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@44982 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/decl.c')
-rw-r--r-- | gcc/java/decl.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/java/decl.c b/gcc/java/decl.c index abb49fa5acf..ecfa9aa17bc 100644 --- a/gcc/java/decl.c +++ b/gcc/java/decl.c @@ -541,10 +541,16 @@ init_decl_processing () string_ptr_type_node = promote_type (string_type_node); class_type_node = lookup_class (get_identifier ("java.lang.Class")); throwable_type_node = lookup_class (get_identifier ("java.lang.Throwable")); + exception_type_node = lookup_class (get_identifier ("java.lang.Exception")); runtime_exception_type_node = lookup_class (get_identifier ("java.lang.RuntimeException")); error_exception_type_node = lookup_class (get_identifier ("java.lang.Error")); + class_not_found_type_node = + lookup_class (get_identifier ("java.lang.ClassNotFoundException")); + no_class_def_found_type_node = + lookup_class (get_identifier ("java.lang.NoClassDefFoundError")); + rawdata_ptr_type_node = promote_type (lookup_class (get_identifier ("gnu.gcj.RawData"))); @@ -557,6 +563,9 @@ init_decl_processing () predef_filenames [4] = get_identifier ("java/lang/String.java"); predef_filenames [5] = get_identifier ("java/lang/Throwable.java"); predef_filenames [6] = get_identifier ("gnu/gcj/RawData.java"); + predef_filenames [7] = get_identifier ("java/lang/Exception"); + predef_filenames [8] = get_identifier ("java/lang/ClassNotFoundException"); + predef_filenames [9] = get_identifier ("java/lang/NoClassDefFoundError"); methodtable_type = make_node (RECORD_TYPE); layout_type (methodtable_type); @@ -572,6 +581,7 @@ init_decl_processing () /* The new `finit$' special method identifier. This one is now generated in place of `$finit$'. */ finit_identifier_node = get_identifier ("finit$"); + instinit_identifier_node = get_identifier ("instinit$"); void_signature_node = get_identifier ("()V"); length_identifier_node = get_identifier ("length"); this_identifier_node = get_identifier ("this"); |