diff options
author | Alexandre Petit-Bianco <apbianco@gcc.gnu.org> | 2001-08-17 14:07:07 -0700 |
---|---|---|
committer | Alexandre Petit-Bianco <apbianco@gcc.gnu.org> | 2001-08-17 14:07:07 -0700 |
commit | 171262081c9cd444023acbd55ef265e9cffcd47b (patch) | |
tree | 48423fd61c7cb8b8e91a0e83679b52ebad7e88a7 /gcc/java/java-tree.h | |
parent | 0779eeb2815ca0a74eed65f8f558123e5e953a81 (diff) | |
download | gcc-171262081c9cd444023acbd55ef265e9cffcd47b.zip gcc-171262081c9cd444023acbd55ef265e9cffcd47b.tar.gz gcc-171262081c9cd444023acbd55ef265e9cffcd47b.tar.bz2 |
[multiple changes]
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 )
From-SVN: r44982
Diffstat (limited to 'gcc/java/java-tree.h')
-rw-r--r-- | gcc/java/java-tree.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h index d114747..ef4e063 100644 --- a/gcc/java/java-tree.h +++ b/gcc/java/java-tree.h @@ -251,9 +251,12 @@ enum java_tree_index JTI_STRING_TYPE_NODE, JTI_STRING_PTR_TYPE_NODE, JTI_THROWABLE_TYPE_NODE, + JTI_EXCEPTION_TYPE_NODE, JTI_RUNTIME_EXCEPTION_TYPE_NODE, JTI_ERROR_EXCEPTION_TYPE_NODE, JTI_RAWDATA_PTR_TYPE_NODE, + JTI_CLASS_NOT_FOUND_TYPE_NODE, + JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_BYTE_ARRAY_TYPE_NODE, JTI_SHORT_ARRAY_TYPE_NODE, @@ -278,6 +281,7 @@ enum java_tree_index JTI_INIT_IDENTIFIER_NODE, JTI_CLINIT_IDENTIFIER_NODE, JTI_FINIT_IDENTIFIER_NODE, + JTI_INSTINIT_IDENTIFIER_NODE, JTI_FINIT_LEG_IDENTIFIER_NODE, JTI_VOID_SIGNATURE_NODE, JTI_LENGTH_IDENTIFIER_NODE, @@ -408,12 +412,18 @@ extern tree java_global_trees[JTI_MAX]; java_global_trees[JTI_STRING_PTR_TYPE_NODE] #define throwable_type_node \ java_global_trees[JTI_THROWABLE_TYPE_NODE] +#define exception_type_node \ + java_global_trees[JTI_EXCEPTION_TYPE_NODE] #define runtime_exception_type_node \ java_global_trees[JTI_RUNTIME_EXCEPTION_TYPE_NODE] #define error_exception_type_node \ java_global_trees[JTI_ERROR_EXCEPTION_TYPE_NODE] #define rawdata_ptr_type_node \ java_global_trees[JTI_RAWDATA_PTR_TYPE_NODE] +#define class_not_found_type_node \ + java_global_trees[JTI_CLASS_NOT_FOUND_TYPE_NODE] +#define no_class_def_found_type_node \ + java_global_trees[JTI_NO_CLASS_DEF_FOUND_TYPE_NODE] #define byte_array_type_node \ java_global_trees[JTI_BYTE_ARRAY_TYPE_NODE] @@ -463,6 +473,8 @@ extern tree java_global_trees[JTI_MAX]; java_global_trees[JTI_FINIT_IDENTIFIER_NODE] /* "finit$" */ #define finit_leg_identifier_node \ java_global_trees[JTI_FINIT_LEG_IDENTIFIER_NODE] /* "$finit$" */ +#define instinit_identifier_node \ + java_global_trees[JTI_INSTINIT_IDENTIFIER_NODE] /* "instinit$" */ #define void_signature_node \ java_global_trees[JTI_VOID_SIGNATURE_NODE] /* "()V" */ #define length_identifier_node \ @@ -598,7 +610,7 @@ extern tree java_global_trees[JTI_MAX]; #define nativecode_ptr_array_type_node \ java_global_trees[JTI_NATIVECODE_PTR_ARRAY_TYPE_NODE] -#define PREDEF_FILENAMES_SIZE 7 +#define PREDEF_FILENAMES_SIZE 10 extern tree predef_filenames[PREDEF_FILENAMES_SIZE]; #define nativecode_ptr_type_node ptr_type_node @@ -937,7 +949,7 @@ struct lang_decl_var #define TYPE_PACKAGE_LIST(T) (TYPE_LANG_SPECIFIC(T)->package_list) #define TYPE_PRIVATE_INNER_CLASS(T) (TYPE_LANG_SPECIFIC(T)->pic) #define TYPE_PROTECTED_INNER_CLASS(T) (TYPE_LANG_SPECIFIC(T)->poic) -#define TYPE_HAS_FINAL_VARIABLE(T) (TYPE_LANG_SPECIFIC(T)->afv) +#define TYPE_HAS_FINAL_VARIABLE(T) (TYPE_LANG_SPECIFIC(T)->hfv) struct lang_type { @@ -955,7 +967,7 @@ struct lang_type tree package_list; /* List of package names, progressive */ unsigned pic:1; /* Private Inner Class. */ unsigned poic:1; /* Protected Inner Class. */ - unsigned afv:1; /* Has final variables */ + unsigned hfv:1; /* Has final variables */ }; #ifdef JAVA_USE_HANDLES @@ -1197,6 +1209,7 @@ struct rtx_def * java_lang_expand_expr PARAMS ((tree, rtx, enum machine_mode, #define DECL_INIT_P(DECL) (ID_INIT_P (DECL_NAME (DECL))) #define DECL_FINIT_P(DECL) (ID_FINIT_P (DECL_NAME (DECL))) #define DECL_CLINIT_P(DECL) (ID_CLINIT_P (DECL_NAME (DECL))) +#define DECL_INSTINIT_P(DECL) (ID_INSTINIT_P (DECL_NAME (DECL))) /* Predicates on method identifiers. Kept close to other macros using them */ @@ -1209,6 +1222,7 @@ struct rtx_def * java_lang_expand_expr PARAMS ((tree, rtx, enum machine_mode, || (ID) == finit_leg_identifier_node) #define ID_CLINIT_P(ID) ((ID) == clinit_identifier_node) #define ID_CLASSDOLLAR_P(ID) ((ID) == classdollar_identifier_node) +#define ID_INSTINIT_P(ID) ((ID) == instinit_identifier_node) /* Access flags etc for a variable/field (a FIELD_DECL): */ |