From e64c46ce5086d9e20c9d6d1414faa917a96e7379 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 18 Sep 2001 07:22:40 +0200 Subject: [PATCH] parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout. * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout. * jv-scan.c: Likewise. From-SVN: r45671 --- gcc/java/ChangeLog | 2827 ++++++++++++++++++++++---------------------- gcc/java/jv-scan.c | 28 +- gcc/java/parse.y | 32 +- 3 files changed, 1430 insertions(+), 1457 deletions(-) diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index b380aec5983..9b4f61ec14b 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,8 @@ +2001-09-18 Andreas Jaeger + + * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout. + * jv-scan.c: Likewise. + 2001-09-16 Tom Tromey * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call @@ -53,7 +58,7 @@ 2001-09-06 Alexandre Petit-Bianco * java-tree.h (compile_resource_file): Grouped with other prototypes. - * jvspec.c (lang_specific_driver): Removed unused local `ptr.' + * jvspec.c (lang_specific_driver): Removed unused local `ptr.' 2001-09-06 Anthony Green @@ -95,7 +100,7 @@ * jcf-write.c (generate_classfile): Check that field is primitive or string before emitting ConstantValue attribute. - + 2001-08-30 Per Bothner * parse.y (resolve_qualified_expression_name): If creating a @@ -110,7 +115,7 @@ * lang.c (put_decl_node, lang_print_error): Re-arrange for better diagnostics, especially for constructors. - + 2001-08-30 Per Bothner * jcf-write.c (generate_classfile): Don't write ConstantValue @@ -179,7 +184,7 @@ 2001-08-23 Alexandre Petit-Bianco * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a - file smaller than 4 bytes. + file smaller than 4 bytes. * parse.y (check_inner_circular_reference): New function. (check_circular_reference): Likewise. (array_initializer:): Accept {,}. @@ -275,7 +280,7 @@ (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-12 David Edelsohn Revert: @@ -374,7 +379,7 @@ * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): Use ggc_add_tree_root to register roots. - + 2001-07-31 Alexandre Petit-Bianco * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its @@ -712,7 +717,7 @@ 2001-04-27 Bryce McKinlay * parse.y (do_resolve_class): Check for cyclic inheritance during - inner class resolution. + inner class resolution. 2001-04-27 Per Bothner @@ -820,7 +825,7 @@ Fixes PR java/1315. 2001-04-04 Alexandre Petit-Bianco - + * parse.y (resolve_qualified_expression_name): Pass field's DECL_CONTEXT to `not_accessible_p.' (not_accessible_p): Changed parameters order in `inherits_from_p' @@ -836,7 +841,7 @@ * jcf-write.c (generate_classfile): Use CONSTANT_VALUE_P. * parse.y (maybe_build_class_init_for_field): New static function. (resolve_expression_name, resolve_field_access): Use - maybe_build_class_init_for_field instead of build_class_init + maybe_build_class_init_for_field instead of build_class_init This does not do the init if the field is compile-time-constant. (resolve_field_access): Simplify. @@ -851,7 +856,7 @@ 2001-04-02 Zack Weinberg * expr.c (pop_type_0): Save the result of the first - lang_printable_name call in a scratch buffer, so it + lang_printable_name call in a scratch buffer, so it won't be clobbered by the second call. 2001-03-30 Alexandre Petit-Bianco @@ -1027,7 +1032,7 @@ * jvspec.c (jvgenmain_spec): Add flag_check_references. * java-tree.h (flag_check_references): New variable. * lang.c (flag_check_references): Likewise. - * parse.y (patch_invoke): Use java_check_reference. + * parse.y (patch_invoke): Use java_check_reference. (patch_assignment): Allow for extra nesting in _Jv_CheckArrayStore. @@ -1044,7 +1049,7 @@ 2001-03-21 Bryce McKinlay - * gjavah.c (process_file): Mark interface definitions with + * gjavah.c (process_file): Mark interface definitions with "__attribute__ ((java_interface))". 2001-03-21 Alexandre Petit-Bianco @@ -1180,7 +1185,7 @@ * mangle.c (mangle_record_type): Rename 'from_pointer' argument to 'for_pointer'. If this type is for a pointer (argument) mangling, - don't surround the element with 'N..E' if the type name is + don't surround the element with 'N..E' if the type name is unqualified. 2001-03-14 Mark Mitchell @@ -1261,11 +1266,11 @@ Fri Feb 23 15:28:39 2001 Richard Kenner 2001-02-19 Bryce McKinlay - * parse.y (parser_check_super_interface): Don't call + * parse.y (parser_check_super_interface): Don't call check_pkg_class_access for an inner interface. - (parser_check_super): Don't call check_pkg_class_access for inner + (parser_check_super): Don't call check_pkg_class_access for inner class. - (do_resolve_class): Simplify enclosing type loop. Don't call + (do_resolve_class): Simplify enclosing type loop. Don't call check_pkg_class_access if CL and DECL are not set. (find_in_imports_on_demand): Set DECL if class_type needed to be loaded. Don't call check_pkg_class_access for an inner class. @@ -1281,7 +1286,7 @@ Fri Feb 23 15:28:39 2001 Richard Kenner method into array types. * parse.y (patch_method_invocation): Bypass access check on clone call to array instance. - + 2001-02-15 Alexandre Petit-Bianco * expr.c (build_instanceof): Check for arrays when trying fold to @@ -1333,7 +1338,7 @@ Fri Feb 23 15:28:39 2001 Richard Kenner 2001-02-13 Alexandre Petit-Bianco * decl.c (classdollar_identifier_node): Initialize. - * java-tree.h (enum java_tree_index): New entry + * java-tree.h (enum java_tree_index): New entry `JTI_CLASSDOLLAR_IDENTIFIER_NODE.' (classdollar_identifier_node): New macro. (ID_CLASSDOLLAR_P): Likewise. @@ -1367,7 +1372,7 @@ Fri Feb 23 15:28:39 2001 Richard Kenner * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o (JVGENMAIN_OBJS): Likewise. - * java-tree.h (append_gpp_mangled_name): New prototype. + * java-tree.h (append_gpp_mangled_name): New prototype. * jcf-parse.c (ggc_mark_jcf): Argument now `void *.' Removed cast calling `gcc_add_root.' * jvgenmain.c (mangle_obstack): New global, initialized. @@ -1485,7 +1490,7 @@ Sun Feb 4 15:52:44 2001 Richard Kenner * lex.c (java_get_line_col): Likewise. * jcf-parse.c (load_class): Make errors non-fatal. * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV. - + 2001-02-01 Bryce McKinlay * jvgenmain.c (class_mangling_suffix): Remove unused string. @@ -1588,7 +1593,7 @@ Sun Feb 4 15:52:44 2001 Richard Kenner * parse.y (lookup_package_type_and_set_next): Deleted. (resolve_package): Removed unnecessary code. (find_applicable_accessible_methods_list): `finit$' can't be - inherited. + inherited. * verify.c (pop_argument_types): Added missing prototype. 2001-01-23 Bryce McKinlay @@ -1729,7 +1734,7 @@ Sun Feb 4 15:52:44 2001 Richard Kenner * expr.c (expand_java_field_op): Assigning to a final field outside an initializer does not violate JVM spec, so should be warning, not error. (Sun's verifier does not complain - though MicroSoft's does.) - + 2001-01-12 Joseph S. Myers * gjavah.c (version), jcf-dump.c (version): Update copyright year @@ -1757,7 +1762,7 @@ Sun Feb 4 15:52:44 2001 Richard Kenner * expr.c (build_known_method_def): Likewise. (build_jni_stub): Likewise. (java_lang_expand_expr): Likewise. - + 2001-01-10 Tom Tromey * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation. @@ -1774,7 +1779,7 @@ Sun Feb 4 15:52:44 2001 Richard Kenner * parse.y (patch_method_invocation): Message tuned for constructors. (not_accessible_p): Grant `private' access from within enclosing contexts. - + 2001-01-07 Alexandre Petit-Bianco All files with updated copyright when applicable. @@ -1785,7 +1790,7 @@ Sun Feb 4 15:52:44 2001 Richard Kenner (build_class_ref): Call `java_mangle_class_field' instead of `mangle_class_field.' (build_dtable_decl): Rewritten to call `java_mangle_vtable.' - (layout_class): Call `java_mangle_decl' instead of + (layout_class): Call `java_mangle_decl' instead of `mangle_static_field.' (cxx_keywords): Initialized static array moved to `lex.c.' (layout_class_method): Changed leading comment. Simplified to @@ -1824,7 +1829,7 @@ Sun Feb 4 15:52:44 2001 Richard Kenner `emit_unicode_mangled_name.' Turned static. `mangle_obstack' replaces `obstack', removed from the parameter list. (append_gpp_mangled_name): Turned static. `mangle_obstack' - replaces parameter `obstack', removed from the parameter list. Call + replaces parameter `obstack', removed from the parameter list. Call `append_unicode_mangled_name' instead of `emit_unicode_mangled_name. (append_gpp_mangled_classtype): Removed. (compression_table, compression_next): New static variables. @@ -1842,7 +1847,7 @@ Sun Feb 4 15:52:44 2001 Richard Kenner 2001-01-05 Bryce McKinlay From patha@softlab.ericsson.se: - * parse.y (switch_label): Use build, not build1, to construct + * parse.y (switch_label): Use build, not build1, to construct DEFAULT_EXPR. 2001-01-04 Neil Booth @@ -1857,16 +1862,16 @@ Sun Feb 4 15:52:44 2001 Richard Kenner Shorten primitive array allocation path: * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray to create new primitive arrays. - * expr.c (build_newarray): If generating native code, call + * expr.c (build_newarray): If generating native code, call soft_newarray_node with a reference to the primitive TYPE identifier instead of type_value. - + 2000-12-17 Bryce McKinlay Fix for PRs gcj/312 and gcj/253: * parse.y (valid_ref_assignconv_cast_p): Load classes for source and dest if they arn't already. - * class.c (layout_class): Call maybe_layout_super_class on + * class.c (layout_class): Call maybe_layout_super_class on superinterfaces also, but only if compiling from bytecode. Fix for PR gcj/373: @@ -2490,7 +2495,7 @@ Tue Oct 3 13:44:37 2000 Alexandre Petit-Bianco Wed Sep 13 16:06:52 2000 Alexandre Petit-Bianco * decl.c (give_name_to_locals): New local `code_offset'. Call - `maybe_adjust_start_pc'. + `maybe_adjust_start_pc'. * expr.c (note_instructions): New function. (expand_byte_code): Don't collect insn starts here. (peek_opcode_at_pc): New function. @@ -3319,9 +3324,9 @@ Tue Jun 6 11:39:05 2000 Tom Tromey Fri Jun 2 16:48:55 2000 Alexandre Petit-Bianco * class.c (get_dispatch_table): Build the vtable dummy entry list - element with a null purpose. Fixed leading comment. + element with a null purpose. Fixed leading comment. (build_dtable_decl): Build an accurate dtable type when appropriate - and use it. + and use it. 2000-06-02 Richard Henderson @@ -3383,12 +3388,12 @@ Fri Jun 2 16:48:55 2000 Alexandre Petit-Bianco Thu Apr 27 17:47:34 2000 Alexandre Petit-Bianco * jcf-parse.c (jcf_parse_source): Reset current_class and - current_function_decl to NULL before parsing a new file. + current_function_decl to NULL before parsing a new file. Thu Apr 27 17:25:33 2000 Alexandre Petit-Bianco * parse.y (block_end:): If the collected block doesn't feature a - statement, insert an empty statement. + statement, insert an empty statement. 2000-04-17 Alexandre Petit-Bianco @@ -3427,7 +3432,7 @@ Thu Apr 27 17:25:33 2000 Alexandre Petit-Bianco Wed May 17 17:27:44 2000 Andrew Cagney * lang.c (lang_decode_option): Update -Wunused flags by calling - set_Wunused. + set_Wunused. * decl.c (poplevel): Replace warn_unused with warn_unused_label. 2000-05-09 Zack Weinberg @@ -3534,7 +3539,7 @@ Wed May 17 17:27:44 2000 Andrew Cagney Wed Apr 26 14:29:33 2000 Alexandre Petit-Bianco * decl.c (complete_start_java_method): Don't call _Jv_InitClass - from + from 2000-04-26 Tom Tromey @@ -3560,7 +3565,7 @@ Wed Apr 26 14:29:33 2000 Alexandre Petit-Bianco Mon Apr 24 14:59:36 2000 Alexandre Petit-Bianco * parse.y (end_class_declaration): Reset the interface number - counter. + counter. 2000-04-24 Alexandre Petit-Bianco @@ -3589,8 +3594,8 @@ Thu Apr 20 17:41:28 2000 Mo DeJong * parse.h (INTERFACE_INNER_MODIFIERS): New macro. * parse.y (check_class_interface_creation): Fixed comments. Select - permitted modifiers for (inner) interfaces. Changed error message - to report rejected modifiers used with local classes. + permitted modifiers for (inner) interfaces. Changed error message + to report rejected modifiers used with local classes. 2000-04-20 Alexandre Petit-Bianco @@ -3914,31 +3919,31 @@ Tue Mar 14 17:15:41 2000 Alexandre Petit-Bianco there are remaining qualifiers. Take into account `q' might have been cleared after re-qualification. * parse.y (patch_method_invocation): New local `resolved'. - Section dealing with qualified expression rewritten to use - resolve_field_access. + Section dealing with qualified expression rewritten to use + resolve_field_access. Mon Mar 13 12:21:13 2000 Alexandre Petit-Bianco * parse.h (PUSH_CPC): Fixed indentation. (DEBUG_CPC): New macro. (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT, - SET_CPC_INSTANCE_INITIALIZER_STMT): New macros. + SET_CPC_INSTANCE_INITIALIZER_STMT): New macros. * parse.y (class_body_declaration:): Use - SET_CPC_INSTANCE_INITIALIZER_STMT. + SET_CPC_INSTANCE_INITIALIZER_STMT. (method_declaration:): Check for null current_function_decl. (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT. (java_parser_context_pop_initialized_field): Better handling of - empty lists. + empty lists. (maybe_make_nested_class_name): Mark nested class name as - qualified when necessary. + qualified when necessary. (end_class_declaration): Don't call java_parse_context_resume when - one or more error occured. + one or more error occured. (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT. (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and - SET_CPC_INITIALIZER_STMT. + SET_CPC_INITIALIZER_STMT. (method_header): Check for inner classes declaring static methods. (resolve_qualified_expression_name): Handle situation where `this' - is implied. + is implied. Mon Mar 13 11:36:51 2000 Hans Boehm @@ -4022,9 +4027,9 @@ Mon Mar 6 18:07:07 2000 Richard Kenner Thu Mar 2 15:18:33 2000 Alexandre Petit-Bianco * check-init.c (check_init): Removed dead code. Handle (blank) - final variables. + final variables. * parse.y (declare_local_variables): New local `final_p', set it - and use it to initialize LOCAL_FINAL. + and use it to initialize LOCAL_FINAL. (check_final_assignment): Only check FIELD_DECLs. 2000-02-17 Tom Tromey @@ -4121,15 +4126,15 @@ Fri Feb 25 18:41:31 2000 Alexandre Petit-Bianco Fri Feb 25 18:47:25 2000 Alexandre Petit-Bianco * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR: - initialize locals to avoid warnings. Local `exception_type' moved + initialize locals to avoid warnings. Local `exception_type' moved into if statement. Fri Feb 25 18:00:37 2000 Alexandre Petit-Bianco * parse.y (resolve_expression_name): Use `orig' as a second - argument to resolve_field_access. + argument to resolve_field_access. (resolve_field_access): Removed unnecessary code when dealing with - static fields. + static fields. Wed Feb 23 17:41:50 2000 Alexandre Petit-Bianco @@ -4171,7 +4176,7 @@ Wed Nov 03 02:16:00 PST 1999 Pekka Nikander * decl.c (INT_TYPE_SIZE): Define if necessary. (expand_java_return): Handle the case of a native integer smaller - than a JVM integer. + than a JVM integer. 2000-02-18 Martin von Loewis @@ -4182,7 +4187,7 @@ Wed Nov 03 02:16:00 PST 1999 Pekka Nikander Thu Feb 17 14:30:37 2000 Alexandre Petit-Bianco * jcf-write.c (generate_bytecode_insns): Don't generate empty - `finally' clauses. + `finally' clauses. Thu Feb 17 13:20:58 2000 Alexandre Petit-Bianco @@ -4206,11 +4211,11 @@ Thu Feb 17 13:20:58 2000 Alexandre Petit-Bianco 2000-02-15 Alexandre Petit-Bianco * parse.y (outer_field_access_p): Stop in time when outer contexts - are exhausted. + are exhausted. (resolve_qualified_expression_name): Properly qualify *everything* - after a package.type to be resoled as expression names. + after a package.type to be resoled as expression names. (find_applicable_accessible_methods_list): Save/restore `class' to - isolate it from a possible outer context search. + isolate it from a possible outer context search. 2000-02-15 Tom Tromey @@ -4248,38 +4253,38 @@ Sat Feb 12 04:34:04 2000 Alexandre Petit-Bianco Fri Feb 11 17:38:26 2000 Alexandre Petit-Bianco * parse.y (interface_declaration:): No longer tagged - . Re-installed default action. + . Re-installed default action. (class_member_declaration:): Handle inner interfaces. (interface_member_declaration): Handle inner interfaces and - classes. + classes. (create_interface): Push error if one seen. Suspend parsing - context when processing an inner interface. + context when processing an inner interface. (register_fields): Inner class static field limitations not to - apply to inner interfaces. + apply to inner interfaces. Thu Feb 10 22:07:35 2000 Alexandre Petit-Bianco * jcf-parse.c (load_class): Update `java_error_count' when a - class' file can't be found. + class' file can't be found. (parse.y): Avoid (byte)code generation when errors seen. Thu Feb 10 20:10:43 2000 Alexandre Petit-Bianco * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal' - decodes a valid node. + decodes a valid node. (patch_binop): Handle TRUNC_DIV_EXPR. Thu Feb 10 16:04:26 2000 Alexandre Petit-Bianco * parse.y (resolve_package): New local `acc'. Try to progressively - build and guess a package and type name. + build and guess a package and type name. Thu Feb 10 12:52:09 2000 Alexandre Petit-Bianco * parse.y (find_applicable_accessible_methods_list): Load and - layout the search class if necessary. + layout the search class if necessary. (java_complete_tree): Keep to original type of the folded initial - value. + value. 2000-02-09 Alexandre Petit-Bianco @@ -4342,11 +4347,11 @@ Thu Feb 3 20:23:19 2000 Alexandre Petit-Bianco * java-tree.h (FIELD_THISN): New macro. * jcf-write.c (append_synthetic_attribute): New function. (generate_classfile): Set "Synthetic" attribute on this$, - val$ fields, access$ and $finit$ methods. Fixed indentation. + val$ fields, access$ and $finit$ methods. Fixed indentation. * parse.y (add_inner_class_fields): Set FIELD_THISN for created - this$ fields. + this$ fields. (build_outer_field_access): Turned on access functions usage and - generation when compiling to bytecode. + generation when compiling to bytecode. (maybe_use_access_method): Likewise. 2000-01-25 Andrew Haley @@ -4557,29 +4562,29 @@ Tue Feb 1 14:59:35 2000 Alexandre Petit-Bianco Fri Jan 28 20:10:57 2000 Alexandre Petit-Bianco * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS, - FIELD_LOCAL_ALIAS_USED): New macros. + FIELD_LOCAL_ALIAS_USED): New macros. (DECL_FUNCTION_NAP): New macro. (struct lang_decl): New field `nap'. (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros. (struct lang_type): New fields `finit_stmt_list' and - `clinit_stmt_list'. + `clinit_stmt_list'. (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST. * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro. (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS, - UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros. + UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros. (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION, - AIPL_FUNCTION_INVOCATION_READY): New enum fields. + AIPL_FUNCTION_INVOCATION_READY): New enum fields. (BUILD_THROW): Macro line separator re-indented. * parse.y (end_class_declaration): New function. (maybe_generate_pre_expand_clinit): New name for - java_pre_expand_clinit. Create off TYPE_CLINIT_STMT_LIST, - pre-expand static fields. + java_pre_expand_clinit. Create off TYPE_CLINIT_STMT_LIST, + pre-expand static fields. (maybe_generate_clinit): Function deleted. (check_for_static_method_reference): Prototype's parameter list - indented. + indented. (generate_finit): New name for maybe_generate_finit. Changed - leading comment. Function rewritten to use - TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list. + leading comment. Function rewritten to use + TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list. (build_alias_initializer_parameter_list): New function. (java_parser_context_pop_initialized_field): Likewise. (add_inner_class_fields): Likewise. @@ -4587,7 +4592,7 @@ Fri Jan 28 20:10:57 2000 Alexandre Petit-Bianco (class_member_declaration:): Likewise. (formal_parameter_list:): Fixed typos. (formal_parameter:): Use ARG_FINAL_P to mark created tree list - element. Improved error handling. + element. Improved error handling. (block_statement:): Call end_class_declaration. (anonymous_class_creation:): Likewise. (create_anonymous_class): Fixed comments. @@ -4597,25 +4602,25 @@ Fri Jan 28 20:10:57 2000 Alexandre Petit-Bianco (finish_method_declaration): Use UNMARK_FINAL_PARMS. (method_declarator): Propagate final argument flag. (craft_constructor): New local `artificial'. Call - build_alias_initializer_parameter_list. Use - CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP. + build_alias_initializer_parameter_list. Use + CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP. (source_start_java_method): Mark parm decls with LOCAL_FINAL if - necessary. + necessary. (complete_expand_class): Get rid of unused outer context local - alias fields. + alias fields. (java_complete_expand_methods): Fixed leading - comment. Generate/pre-expand first. Changed method - expansion order to regular, $finit$, constructors, . + comment. Generate/pre-expand first. Changed method + expansion order to regular, $finit$, constructors, . (java_complete_expand_method): Set current_function_decl. (fix_constructors): Fix constructor parameter list to account for - outer context local alias initializers. + outer context local alias initializers. (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS. (resolve_expression_name): Lookup outer context local aliases. New - local `access', use it. + local `access', use it. (patch_method_invocation): Patch inner class ctor invocation with - outer context local aliases initialization values. $finit$ - invocation patching now includes things generated with - build_alias_initializer_parameter_list. + outer context local aliases initialization values. $finit$ + invocation patching now includes things generated with + build_alias_initializer_parameter_list. (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS. (build_super_invocation): Likewise. (patch_assignment): Changed comment. @@ -4754,7 +4759,7 @@ Fri Jan 14 18:03:41 2000 Alexandre Petit-Bianco * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'. * parse.y (patch_anonymous_class): New function. (create_anonymous_class): Register incomplete type when the - class/interface to extends/implement isn't known yet. + class/interface to extends/implement isn't known yet. (parser_check_super_interface): Simplify argument to CLASS_INTERFACE. (verify_constructor_super): Tuned error message. @@ -4766,39 +4771,39 @@ Fri Jan 14 00:14:24 2000 Alexandre Petit-Bianco (INNER_CLASS_TYPE_P): Fixed typo in leading comment. * parse.y (create_class): Added leading argument. (maybe_create_class_interface_decl, - check_class_interface_creation): Likewise. + check_class_interface_creation): Likewise. (craft_constructor): New function. (verify_constructor_super): Added argument in prototype. (class_declaration:): Inserted leading argument. (for_begin:): Use FOR_LOOP_P. (anonymous_class_creation): Create WFL of the anonymous class to - instantiate. Call build_new_invocation. Added comments. + instantiate. Call build_new_invocation. Added comments. (check_class_interface_creation): Handle parameter `anonymous' in - verbose mode class creation announce. + verbose mode class creation announce. (link_nested_class_to_enclosing): Exclude anonymous classes. (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on - anonymous class, even though they appear to have an enclosing - context. + anonymous class, even though they appear to have an enclosing + context. (create_interface): Pass extra argument to - check_class_interface_creation. + check_class_interface_creation. (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1. (create_class): Call check_class_interface_creation and - maybe_create_class_interface_decl with extra new argument. Don't - add private this$ to anonymous classes. + maybe_create_class_interface_decl with extra new argument. Don't + add private this$ to anonymous classes. (method_declarator): Insert hidden this$ to anonymous class - constructors. + constructors. (java_fix_constructors): Deleted code creating default - constructor. Call craft_constructor instead. + constructor. Call craft_constructor instead. (java_check_regular_methods): Set `saw_constructor' to 1 for - anonymous classes. + anonymous classes. (fix_constructors): Pass extra argument to verify_constructor_super. (verify_constructor_super): New local `sdecl', use it. Search for - matching constructor (possibly featuring arguments) in super - class. + matching constructor (possibly featuring arguments) in super + class. (lookup_method_invoke): Craft constructor according to arguments - list when dealing with anonymous class constructors. + list when dealing with anonymous class constructors. (build_super_invocation): Pass arguments to anonymous class super - constructors. + constructors. (search_loop): Use FOR_LOOP_P. (labeled_block_contains_loop_p): Likewise. @@ -4808,33 +4813,33 @@ Wed Jan 12 00:38:47 2000 Alexandre Petit-Bianco (enclosing_context_p): New function. (get_access_flags_from_decl): Handle CLASS_STATIC. (maybe_layout_super_class): Extra first argument passed to - do_resolve_class. + do_resolve_class. (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and - ID_INIT_P. + ID_INIT_P. * decl.c (access0_identifier_node): New global. (init_decl_processing): access0_identifier_node initialized. (pushdecl): Set DECL_CONTEXT only on non type decls. * expr.c (lookup_field): Lookup inner class fields in enclosing - contexts. + contexts. (expand_invoke): Use ID_INIT_P. (expand_java_field_op): Use DECL_CLINIT_P. * java-tree.def (CLASS_LITERAL): New tree code. * java-tree.h (DECL_FUNCTION_ACCESS_DECL, - DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros. + DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros. (struct lang_decl): New field `inner_access'. (enclosing_context_p): Prototyped. (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P, - ID_CLINIT_P): New macros. + ID_CLINIT_P): New macros. (CLASS_STATIC): New macro. (CLASS_ACCESS0_GENERATED_P): New macro. (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P, - TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P, - INNER_CLASS_P): New macros. + TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P, + INNER_CLASS_P): New macros. (DECL_INNER_CLASS_LIST): New macro. * jcf-parse.c (yyparse): Avoid the use of ANSI string - concatenation. + concatenation. * jcf-write.c (generate_bytecode_insns): binop: Change the type of - the shift value to int. Fixed typo in comment. + the shift value to int. Fixed typo in comment. * lex.c (inst_id, wpv_id): Initialize. * mangle.c (unicode_mangling_length): Take `$' into account. * parse.h (DRECOVER, RECOVER): Terminate properly. @@ -4844,139 +4849,139 @@ Wed Jan 12 00:38:47 2000 Alexandre Petit-Bianco (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.) (struct parser_ctxt): New fields `marker_beginning', `marked_end'. (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, - GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC, - GET_ENCLOSING_CPC_CONTEXT): New macros. + GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC, + GET_ENCLOSING_CPC_CONTEXT): New macros. (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros. (do_resolve_class): Added extra argument in prototype. * parse.y (resolve_class): Added extra argument in prototype. (maybe_create_class_interface_decl): Likewise. (maybe_use_access_method, build_wfl_wrap): New functions. (java_complete_expand_classes, java_complete_expand_class): - Likewise. + Likewise. (java_parser_context_push_initialized_field, - java_parser_context_suspend, java_parser_context_resume): - Likewise. + java_parser_context_suspend, java_parser_context_resume): + Likewise. (maybe_make_nested_class_name, make_nested_class_name, - set_nested_class_simple_name_value, - link_nested_class_to_enclosing, find_as_inner_class, - find_as_inner_class_do, check_inner_class_redefinition, - build_thisn_assign, build_current_thisn, build_access_to_thisn, - maybe_build_thisn_access_method, build_outer_field_access, - build_outer_field_access_methods, build_outer_field_access_expr, - build_outer_method_access_method, build_new_access_id, - build_outer_field_access_method, outer_field_access_p, - outer_field_expanded_access_p, outer_field_access_fix, - build_incomplete_class_ref, patch_incomplete_class_ref, - create_anonymous_class): Likewise. + set_nested_class_simple_name_value, + link_nested_class_to_enclosing, find_as_inner_class, + find_as_inner_class_do, check_inner_class_redefinition, + build_thisn_assign, build_current_thisn, build_access_to_thisn, + maybe_build_thisn_access_method, build_outer_field_access, + build_outer_field_access_methods, build_outer_field_access_expr, + build_outer_method_access_method, build_new_access_id, + build_outer_field_access_method, outer_field_access_p, + outer_field_expanded_access_p, outer_field_access_fix, + build_incomplete_class_ref, patch_incomplete_class_ref, + create_anonymous_class): Likewise. (inst_id, wpv_id): New static global variables. (synchronized:): New rule, tagged . (type_declaration:): No longer tagged . Call POP_CPC in sub - rules. + rules. (anonymous_class_creation:): New rule, tagged . (NEW_TK): Tagged . (type_literals, array_type_literal): New rules, tagged . (class_declaration:): Removed action when reducing by class_body: (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value - using GET_CPC in sub-rules. + using GET_CPC in sub-rules. (class_member_declaration): Handle inner classes. (method_declaration): When reducing method_header:, reset - current_function_decl when appropriate. + current_function_decl when appropriate. (method_declarator:): Set the number of formal parameter to 0 for - method declared without arguments. + method declared without arguments. (constructor_declarator:): Likewise. (static_initializer:): List of elements kept in a list. (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct - use of the keyword `static' for type declarations. + use of the keyword `static' for type declarations. (block_statement:): Handle inner class declarations. (primary_no_new_array:): Use type_literals:. Fixed comment. Handle - type qualified `this'. + type qualified `this'. (class_instance_creation_expression): Use anonymous_class_creation: to handle inner class instances creation. Handle qualified `new'. (something_dot_new): Added appropriate actions. (create_new_parser_context): New function. (java_push_parser_context, java_parser_context_save_global, - java_parser_context_suspend): Use create_new_parser_context. + java_parser_context_suspend): Use create_new_parser_context. (check_modifiers): Changed leading comment. (check_class_interface_creation): Handle interclasses. (add_superinterfaces): Fixed comment. (create_interface): Build qualified name from the raw_name instead - of its matching WFL. Push the initialized fields list. raw_name added - as an extra argument to maybe_create_class_interface_decl. + of its matching WFL. Push the initialized fields list. raw_name added + as an extra argument to maybe_create_class_interface_decl. (create_class): Build qualified name from the raw_name instead of - its matching WFL. Removed assignment to current_parsed_class_un. + its matching WFL. Removed assignment to current_parsed_class_un. Call PUSH_ERROR before returning an error. Suspend the current - parser context when processing an inner class. Push the - initialized fields list. raw_name added as an extra argument to - maybe_create_class_interface_decl. Add the private this$ - field. + parser context when processing an inner class. Push the + initialized fields list. raw_name added as an extra argument to + maybe_create_class_interface_decl. Add the private this$ + field. (duplicate_declaration_error_p): Use GET_CPC when calling find_field. (register_fields): Get the class type from GET_CPC and handle - previous errors. Added code to handle the creation of static - fields in inner classes. Initialized fields initialization - statements kept in a list of lists. + previous errors. Added code to handle the creation of static + fields in inner classes. Initialized fields initialization + statements kept in a list of lists. (maybe_generate_finit): Initialized fields initialization - statements kept in a list of lists. Use GET_CPC. + statements kept in a list of lists. Use GET_CPC. (maybe_generate_clinit): Likewise. (method_header): Use GET_CPC and GET_CPC_UN. (parser_qualified_classname): Handle inner classes. (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC. (java_fix_constructors): Hide pointer to enclosing context - instance in constructor list when dealing with inner classes. + instance in constructor list when dealing with inner classes. (jdep_resolve_class): Call resolve_class with extra first argument - JDEP_ENCLOSING. + JDEP_ENCLOSING. (resolve_class): Add enclosing context as a first extra argument - to do_resolve_class. + to do_resolve_class. (do_resolve_class): Call find_as_inner_class. Handle WFLs - properly. + properly. (resolve_no_layout): Extra argument added to resolve_class - invocation. + invocation. (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P. (java_get_real_method_name): Use GET_CPC_UN. (check_abstract_method_definitions): Use DECL_CLINIT_P. (java_check_abstract_methods): Handle static method declared in - inner classes by an error. + inner classes by an error. (java_check_regular_methods): Use DECL_CLINIT_P. (source_start_java_method): Also set DECL_MAX_LOCALS. (create_artificial_method): Call java_parser_context_save_global - and java_parser_context_restore_global instead of saving/restoring - the context by hand. + and java_parser_context_restore_global instead of saving/restoring + the context by hand. (expand_start_java_method): Improved verbose mode message. (java_complete_expand_methods): Fixed leading comment. Use - DECL_CLINIT_P. + DECL_CLINIT_P. (fix_constructors): Added assignment to this$ if necessary. (java_expand_classes): Call java_complete_expand_classes instead - of java_complete_expand_methods. + of java_complete_expand_methods. (make_qualified_primary): Simplified. (merge_qualified_name): Optimized for missing left or right parts. (resolve_expression_name): Handle access to outer class fields from - interclasses. + interclasses. (resolve_qualified_expression_name): New macro - RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner - classes. Report error on non appropriate qualification of - `new'. Handle qualified `this'. + RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner + classes. Report error on non appropriate qualification of + `new'. Handle qualified `this'. (not_accessible_p): Allow access to outer class private fields from - inner classes. + inner classes. (patch_method_invocation): Handle method invocations through - access methods and inner class constructor invocations. + access methods and inner class constructor invocations. (find_applicable_accessible_methods_list): Search enclosing - contexts of an inner class. + contexts of an inner class. (search_applicable_methods_list): Fixed typo. (argument_types_convertible): Handle inner class constructors' - hidden outer context reference argument. + hidden outer context reference argument. (qualify_ambiguous_name): Handle qualified `this'. (java_complete_lhs): Handle use of field accessed through - artificial access methods in various cases of assignments. Handle - CLASS_LITERAL node. + artificial access methods in various cases of assignments. Handle + CLASS_LITERAL node. (check_final_assignment): Use DECL_CLINIT_P. (valid_ref_assignconv_cast_p): Handle the destination being an - enclosing context of the source. + enclosing context of the source. (patch_unaryop): Handle use of field accessed through artificial - access methods. + access methods. (patch_return): Use DECL_CLINIT_P. (patch_throw_statement): Use DECL_CLINIT_P. (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P. * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and - ID_INIT_P. + ID_INIT_P. 2000-01-16 Anthony Green @@ -5014,9 +5019,9 @@ Thu Jan 6 00:54:10 2000 Alexandre Petit-Bianco * jcf-write.c (generate_bytecode_conditional): Fixed indentation in method invocation and typo in conditional expression. (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue - the appropriate NOTE_POP. + the appropriate NOTE_POP. * parse.y (patch_binop): Shift value mask to feature the right - type. + type. 1999-12-30 Kaveh R. Ghazi @@ -5074,31 +5079,31 @@ Fri Dec 24 00:25:29 1999 Alexandre Petit-Bianco (../jcf-dump$(exeext):): Link with gcc's errors.o (../gcjh$(exeext):): Likewise. * expr.c (expand_java_NEW): Layout the entire target type instead of - laying out its methods only. + laying out its methods only. (lookup_field): Layout the class after having loaded it. * java-tree.h (java_debug_context): Declared. * jcf-io.c (toplev.h): Included. (find_class): Removed assignment to jcf's outofsynch - field. Force source file to be read if newer than its matching - class file. Tweaked debug messages. + field. Force source file to be read if newer than its matching + class file. Tweaked debug messages. * jcf-parse.c (jcf_out_of_synch): Deleted. (read_class): Call to jcf_out_of_synch removed. * jcf.h (typedef struct JCF): Field `outofsynch' deleted. (jcf_out_of_synch): Prototype deleted. * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag', - `deprecated' and `class_err': integer turned into bit fields. + `deprecated' and `class_err': integer turned into bit fields. New bit fields `saved_data_ctx' and `saved_data'. Fixed comments. * parse.y (package_list): New global. (package_declaration:): Record newly parsed package name. (extra_ctxp_pushed_p): Static global deleted. (java_parser_context_save_global): Create buffer context for the - purpose of saving globals, if necessary. + purpose of saving globals, if necessary. (java_parser_context_restore_global): Pop context pushed for the - purpose of saving globals, if necessary. + purpose of saving globals, if necessary. (java_debug_context_do): New prototype and function. (java_debug_context): Likewise. (do_resolve_class): Use already parsed package names to qualify - and lookup class candidate. + and lookup class candidate. (java_pre_expand_clinit): Removed unnecessary local variable. 1999-12-17 Tom Tromey @@ -5110,9 +5115,9 @@ Fri Dec 24 00:25:29 1999 Alexandre Petit-Bianco Thu Dec 16 00:09:45 1999 Alexandre Petit-Bianco * expr.c (expand_invoke): Layout the loaded class before - attempting to use it. + attempting to use it. (expand_java_field_op): Allow final field assignments to take - place in $finit$. + place in $finit$. * typeck.c (convert): Return error_mark_node if expr is null. 1999-12-14 Alexandre Petit-Bianco @@ -5158,8 +5163,8 @@ Fri Dec 10 21:53:45 1999 Alexandre Petit-Bianco Fri Dec 10 16:13:48 1999 Alexandre Petit-Bianco * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third - operand of a WFL, until the Java front-end gets fixed with regard - to Mark Mitchell's gcc/tree.h patch (1999-12-04.) + operand of a WFL, until the Java front-end gets fixed with regard + to Mark Mitchell's gcc/tree.h patch (1999-12-04.) 1999-12-10 Andrew Haley @@ -5229,7 +5234,7 @@ Tue Nov 23 17:29:40 1999 Alexandre Petit-Bianco Tue Nov 23 10:55:18 1999 Alexandre Petit-Bianco * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE - in case of error. Error message tuned. + in case of error. Error message tuned. 1999-11-21 Anthony Green @@ -5253,12 +5258,12 @@ Tue Nov 23 10:55:18 1999 Alexandre Petit-Bianco Wed Nov 17 21:09:28 1999 Alexandre Petit-Bianco * class.c (layout_class): Always convert TYPE_SIZE_UNIT to - int_type_node: that's what `_Jv_AllocObject' expects. + int_type_node: that's what `_Jv_AllocObject' expects. Thu Nov 11 01:57:14 1999 Alexandre Petit-Bianco * parse.y (lookup_method_invoke): Use lang_printable_name to - reliably build the type name during error report. Fixes PR gcj/97. + reliably build the type name during error report. Fixes PR gcj/97. 1999-11-09 Tom Tromey @@ -5269,9 +5274,9 @@ Thu Nov 11 01:57:14 1999 Alexandre Petit-Bianco Tue Nov 9 12:12:38 1999 Alexandre Petit-Bianco * parse.y (source_end_java_method): Resume permanent allocation, - reversing Apr 27 1998 patch. + reversing Apr 27 1998 patch. (patch_string_cst): Pop obstacks after having pushed the permanent - ones. + ones. 1999-11-05 Tom Tromey @@ -5291,15 +5296,15 @@ Wed Nov 3 15:20:02 MST 1999 Godmar Back Mon Nov 1 23:42:00 1999 Alexandre Petit-Bianco * parse.y (method_header:): Issue error message for rule `type - error'. + error'. (synchronized:): Error report when not using synchronized. Mon Nov 1 01:32:48 1999 Alexandre Petit-Bianco * parse.y (resolve_qualified_expression_name): Prevent `this' from - being used before the superclass constructor has been called. + being used before the superclass constructor has been called. (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P - instead of `CALL_THIS_CONSTRUCTOR_P'. + instead of `CALL_THIS_CONSTRUCTOR_P'. Sat Oct 30 21:35:13 1999 Todd T. Fries @@ -5308,12 +5313,12 @@ Sat Oct 30 21:35:13 1999 Todd T. Fries Fri Oct 29 14:35:18 1999 Alexandre Petit-Bianco * class.c (add_method_1): Set DECL_INLINE to 1 for private, static - and final method. + and final method. Fri Oct 29 14:23:32 1999 Alexandre Petit-Bianco * parse.y (expression_statement:): Call function to report - improper invocation of a constructor. + improper invocation of a constructor. (parse_ctor_invocation_error): New function. 1999-10-26 Mark Mitchell @@ -5334,10 +5339,10 @@ Thu Oct 21 01:27:31 1999 Alexandre Petit-Bianco Wed Oct 20 01:41:47 1999 Alexandre Petit-Bianco * parse.y (java_complete_tree): fold_constant_for_init to work on - permanent_obstack. + permanent_obstack. (java_complete_lhs): Likewise. (array_constructor_check_entry): Complete an initializer element - on permanent_obstack. + on permanent_obstack. 1999-10-19 Tom Tromey @@ -5386,7 +5391,7 @@ Tue Oct 12 22:28:10 1999 Alexandre Petit-Bianco where CHECK_PUT may fail for valid reasons. * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3, - UNSAFE_PUTN): New macros. + UNSAFE_PUTN): New macros. 1999-10-04 Tom Tromey @@ -5422,21 +5427,21 @@ Tue Sep 14 16:24:19 1999 Alexandre Petit-Bianco * jcf-write.c (RELOCATION_VALUE_0): New macro. (RELOCATION_VALUE_1): Likewise. (emit_iinc, emit_reloc, push_constant1, push_constant2, - push_in_const, push_long_const): Prototyped. + push_in_const, push_long_const): Prototyped. (push_constant1): Argument `index' is of type HOST_WIDE_INT. (push_constant2): Likewise. (push_int_const): Cast find_constant1's integer arguments to `jword'. (find_constant_wide): Cast find_constant2's integer arguments to - `jword'. + `jword'. (find_constant_index): Cast find_constant2's and find_constant2's - integer arguments to `jword'. + integer arguments to `jword'. (emit_pop): Argument `value' is of type HOST_WIDE_INT. (emit_switch_reloc): Use RELOCATION_VALUE_0. (emit_if): Use RELOCATION_VALUE_1. (emit_goto): Likewise. (emit_jsr): Likewise. (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second - argument to push_long_const to HOST_WIDE_INT. + argument to push_long_const to HOST_WIDE_INT. 1999-09-15 Andreas Schwab @@ -5449,7 +5454,7 @@ Tue Sep 14 16:24:19 1999 Alexandre Petit-Bianco Thu Sep 16 15:42:39 1999 Alexandre Petit-Bianco * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK - instead of fndecl. + instead of fndecl. 1999-09-16 Kaveh R. Ghazi @@ -5506,12 +5511,12 @@ Sun Sep 12 23:30:09 1999 Kaveh R. Ghazi Sat Sep 11 16:46:44 1999 Alexandre Petit-Bianco * parse.y (find_applicable_accessible_methods_list): Search - abstract classes as interfaces. + abstract classes as interfaces. Thu Sep 9 17:33:28 1999 Alexandre Petit-Bianco * class.c (finish_class): We're now outside a valid method - declaration. Tell the rest of gcc so. + declaration. Tell the rest of gcc so. 1999-09-08 Bruce Korb autogen@linuxbox.com @@ -5607,7 +5612,7 @@ Fri Aug 27 23:31:57 1999 Jeffrey A Law (law@cygnus.com) Thu Aug 26 09:10:58 1999 Alexandre Petit-Bianco * parse.y (lookup_cl): Changed leading comment. Now does its best - to set the column number. + to set the column number. (qualify_ambiguous_name): Take WFL wrappers into account. Wed Aug 25 15:37:15 1999 Gregg Townsend @@ -5685,18 +5690,18 @@ Sun Aug 22 11:07:41 1999 Alexandre Petit-Bianco Thu Aug 19 10:26:18 1999 Alexandre Petit-Bianco * parse.y (method_header): Return a null pointer if the current - class node is null. + class node is null. (finish_method_declaration): Return if the current function decl - is null. + is null. (source_start_java_method): Likewise. (java_method_add_stmt): Likewise. Wed Aug 18 13:17:15 1999 Alexandre Petit-Bianco * class.c (emit_register_class): Removed unnecessary call to - start_sequence. + start_sequence. * parse.y (labeled_block_contains_loop_p): Removed unused local - variable. + variable. Tue Aug 17 22:51:44 1999 Alexandre Petit-Bianco @@ -5982,9 +5987,9 @@ Tue Jul 20 13:20:05 1999 Alexandre Petit-Bianco * parse.y (resolve_and_layout): Check methods only once. (resolve_qualified_expression_name): Verify thrown exceptions - compatibility. + compatibility. (check_thrown_exceptions): Reject exceptions thrown in - initializer. Error message tuned. + initializer. Error message tuned. 1999-07-14 Andrew Haley @@ -5994,27 +5999,27 @@ Tue Jul 20 13:20:05 1999 Alexandre Petit-Bianco Sat Jul 3 22:26:32 1999 Alexandre Petit-Bianco * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed - CALL_EXPR, to avoid order of evaluation changes. + CALL_EXPR, to avoid order of evaluation changes. Fri Jul 2 17:44:08 1999 Alexandre Petit-Bianco * parse.y (qualify_ambiguous_name): Do not use - IDENTIFIER_LOCAL_VALUE when name is a STRING_CST. + IDENTIFIER_LOCAL_VALUE when name is a STRING_CST. Thu Jul 1 23:31:16 1999 Alexandre Petit-Bianco * check-init.c (check_init): Handle MAX_EXPR. * expr.c (force_evaluation_order): Force method call arguments to - be evaluated in left-to-right order. + be evaluated in left-to-right order. * parse.y (qualify_ambiguous_name): Loop again to qualify - NEW_ARRAY_EXPR properly. + NEW_ARRAY_EXPR properly. Wed Jun 30 17:27:58 1999 Alexandre Petit-Bianco * parse.y (patch_invoke): Resolve unresolved invoked method - returned type. + returned type. (qualify_ambiguous_name): STRING_CST to qualify expression for - type name resolution. + type name resolution. 1999-06-24 Andrew Haley @@ -6030,7 +6035,7 @@ Fri Jun 25 13:35:19 1999 Alexandre Petit-Bianco * parse.y (resolve_package): Fixed bogus return statement. (patch_method_invocation): Resolve method invocation beginning with - a package name qualifier. + a package name qualifier. 1999-06-25 Kaveh R. Ghazi @@ -6042,14 +6047,14 @@ Fri Jun 25 13:35:19 1999 Alexandre Petit-Bianco Thu Jun 24 13:12:15 1999 Alexandre Petit-Bianco * parse.y (java_complete_lhs): When doing cross referencing, don't - try to keep file location on a WFL expanded as a CALL_EXPR. + try to keep file location on a WFL expanded as a CALL_EXPR. Wed Jun 23 14:37:15 1999 Alexandre Petit-Bianco * parse.y (finish_method_declaration): Insert a RETURN_EXPR when - compiling to class file a void method with an empty method body. - As a side effect, the bytecode backend will generate the - appropriate `return' instruction. + compiling to class file a void method with an empty method body. + As a side effect, the bytecode backend will generate the + appropriate `return' instruction. Tue Jun 22 20:43:49 1999 Alexandre Petit-Bianco @@ -6079,35 +6084,35 @@ Tue Jun 22 20:43:49 1999 Alexandre Petit-Bianco Mon Jun 14 13:13:39 1999 Alexandre Petit-Bianco * parse.y (qualify_ambiguous_name): Reorganized the post - evaluation of non WFL leading expression nodes. + evaluation of non WFL leading expression nodes. Fri Jun 11 21:37:18 1999 Alexandre Petit-Bianco * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after - CONVERT_EXPR. + CONVERT_EXPR. Thu Jun 10 22:26:17 1999 Alexandre Petit-Bianco * parse.y (qualify_ambiguous_name): Handle qualified expression - beginning with a STRING_CST. + beginning with a STRING_CST. Thu Jun 10 20:27:25 1999 Alexandre Petit-Bianco * parse.y (register_fields): Set DECL_INITIAL on both - pre-initialized static and public fields. + pre-initialized static and public fields. (resolve_field_access): Static field access expressions to always - use pointer types. + use pointer types. (qualify_ambiguous_name): Work out buried CALL_EXPR for proper - qualification. CONVERT_EXPR to be resolved as an expression name. + qualification. CONVERT_EXPR to be resolved as an expression name. (java_complete_lhs): Identify and access qualified final - initialized field in switch statement case expression. + initialized field in switch statement case expression. (fold_constant_for_init): Pre-initialized field decl constant to - be folded. + be folded. Mon Jun 7 16:09:51 1999 Alexandre Petit-Bianco * parse.y (note_possible_classname): Mark returned node with - QUALIFIED_P only if the original class name contained a '/'. + QUALIFIED_P only if the original class name contained a '/'. Sat Jun 5 11:46:59 1999 Anthony Green @@ -6124,13 +6129,13 @@ Wed Jun 2 10:44:38 1999 Anthony Green Wed Jun 2 10:41:24 1999 Anthony Green * expr.c (expand_byte_code): Fill unreachable bytecode regions - with nops and process as usual in order to always set correct EH - ranges. Emit detailed warnings about unreachable bytecodes. + with nops and process as usual in order to always set correct EH + ranges. Emit detailed warnings about unreachable bytecodes. Wed Jun 2 10:35:13 1999 Anthony Green * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as - constant. + constant. Fri May 28 18:22:45 1999 Alexandre Petit-Bianco @@ -6140,26 +6145,26 @@ Fri May 28 18:22:45 1999 Alexandre Petit-Bianco Fri May 28 11:34:05 1999 Alexandre Petit-Bianco * parse.y (fold_constant_for_init): Convert numerical constant - values to the type of the assigned field. + values to the type of the assigned field. Thu May 27 19:57:40 1999 Alexandre Petit-Bianco * expr.c (lookup_field): Relaxed the test on class loading error - detection. + detection. * parse.y (fold_constant_for_init): Enabeled old code. Wed May 26 18:06:02 1999 Alexandre Petit-Bianco * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast' - decide the validity of the cast of a java.lang.Cloneable reference - to an array. + decide the validity of the cast of a java.lang.Cloneable reference + to an array. (patch_conditional_expr): Fixed first argument passed to - binary_numeric_promotion. + binary_numeric_promotion. Wed May 26 15:33:06 1999 Alexandre Petit-Bianco * parse.y (qualify_ambiguous_name): Take into account that a - CONVERT_EXPR might specify a type as a WFL. + CONVERT_EXPR might specify a type as a WFL. Tue May 25 15:06:13 1999 Alexandre Petit-Bianco @@ -6179,13 +6184,13 @@ Mon May 24 13:26:00 1999 Alexandre Petit-Bianco Sat May 22 13:54:41 1999 Alexandre Petit-Bianco * parse.y (formal_parameter:): Construct argument tree list - element even if a yet unsupported final parameter was encountered. + element even if a yet unsupported final parameter was encountered. Tue May 18 00:28:58 1999 Alexandre Petit-Bianco * parse.y (finish_method_declaration): Issue errors for native or - abstract methods declared with a method body, as well as for non - native or non abstract methods with no method body. + abstract methods declared with a method body, as well as for non + native or non abstract methods with no method body. 1999-05-19 Kaveh R. Ghazi @@ -6231,13 +6236,13 @@ Mon May 17 19:20:24 1999 Alexandre Petit-Bianco * parse.y (constructor_block_end:): New rule, tagged . (constructor_body:): Use `constructor_block_end' instead of - `block_end'. + `block_end'. Mon May 17 18:01:40 1999 Alexandre Petit-Bianco * parse.y (statement_nsi:): Pop `for' statement block. (java_complete_lhs): Labeled blocks containing no statement are - marked as completing normally. + marked as completing normally. Fri May 14 12:31:08 1999 Alexandre Petit-Bianco @@ -6247,16 +6252,16 @@ Fri May 14 12:31:08 1999 Alexandre Petit-Bianco Fri May 14 11:57:54 1999 Alexandre Petit-Bianco * check-init.c (check_init): Take into account that - LABELED_BLOCK_STMT can be empty. + LABELED_BLOCK_STMT can be empty. Thu May 13 18:30:48 1999 Alexandre Petit-Bianco * parse.y (java_check_regular_methods): Warning check on not - overriding methods with default access in other packages does not - apply to `'. + overriding methods with default access in other packages does not + apply to `'. (java_complete_lhs): If block body is an empty_stmt_node, replace - it by NULL_TREE. This prevents gcc from generating an irrelevant - warning. + it by NULL_TREE. This prevents gcc from generating an irrelevant + warning. Thu May 13 13:23:38 1999 Alexandre Petit-Bianco @@ -6265,21 +6270,21 @@ Thu May 13 13:23:38 1999 Alexandre Petit-Bianco * java-tree.h (do_not_fold): New global variable, declared. * parse.y (do_not_fold): New global variable, defined. (java_complete_expand_method): Set `do_not_fold' to the value of - `flag_emit_xref'. When doing xrefs: copy the thrown exceptions, - and reinstall them after them have been purged; do not check for - initializations; do not issue missing return errors. + `flag_emit_xref'. When doing xrefs: copy the thrown exceptions, + and reinstall them after them have been purged; do not check for + initializations; do not issue missing return errors. (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes - when doing xrefs. + when doing xrefs. (patch_binop): Skip the fold part when doing xrefs. (build_string_concatenation): Skip the concatenation part when - doing xrefs. + doing xrefs. (patch_synchronized_statement): Do not generate a try-finally when - doing xrefs. + doing xrefs. (patch_throw_statement): When doing xrefs, do not call BUILD_THROW - and keep the location where the throw was seen. + and keep the location where the throw was seen. * typeck.c (convert): When `do_not_fold' is set, do not attempt - any treatment on the converted node an simply return a NOP_EXPR of - the targeted type. + any treatment on the converted node an simply return a NOP_EXPR of + the targeted type. * xref.c (xref_get_data): New function, defined. * xref.h (xref_get_data): New function, declared. (XREF_GET_DATA): Use xref_get_data. @@ -6373,13 +6378,13 @@ Tue May 11 11:46:36 1999 Dave Brolley Fri Apr 30 17:54:40 1999 Alexandre Petit-Bianco * check-init.c (check_init): Exclude a case of error when doing - xrefs. + xrefs. * class.c (layout_class_method): Don't generate the error message - twice when compiling from source. + twice when compiling from source. * lang-options.h: Added `-Wredundant-modifers' and `-Wunusupported-jdk11' flags and help text. * lang.c (lang_decode_option): Added support for - `-Wunsupported-jdk11' and `-Wredundant-modifiers'. + `-Wunsupported-jdk11' and `-Wredundant-modifiers'. flag_static_local_jdk11 and flag_redundant set accordingly. * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK. * parse.h (EXPR_WFL_ADD_COL): New macro. @@ -6388,29 +6393,29 @@ Fri Apr 30 17:54:40 1999 Alexandre Petit-Bianco * parse.y (static_ref_err): New function, prototyped. (CCB_TK): Now tagged . (class_body:): Remember the location of the closing '}' of a class - definition when doing xrefs. + definition when doing xrefs. (block:): Likewise. (block_end:): Likewise. (create_class): Remember the location of the inherited class - identifier when doing xrefs. + identifier when doing xrefs. (register_fields): Added test on first operand of `init' before - testing it TREE_CODE. + testing it TREE_CODE. (method_header): Store the location of the class identifier in the - class decl when doing xrefs. + class decl when doing xrefs. (finish_method_declaration): Don't combine first/last method line - when doing xref. + when doing xref. (java_check_regular_methods): Warning check on not overriding - methods with default access on other packages move before check on - static methods. Initialization of `aflags' also moved up. + methods with default access on other packages move before check on + static methods. Initialization of `aflags' also moved up. (resolve_expression_name): Call static_ref_err to report the error. (static_ref_err): New function, implemented. (resolve_field_access): Returned simplified static field access - when doing xrefs. + when doing xrefs. (resolve_qualified_expression_name): Check for illegal use of - static fields in a non static context. Call static_ref_err to - report error in various places. + static fields in a non static context. Call static_ref_err to + report error in various places. (java_complete_tree): Do not fold initialized static fields when - doing xrefs. + doing xrefs. (java_complete_lhs): Likewise. 1999-04-29 Anthony Green @@ -6422,29 +6427,29 @@ Fri Apr 30 17:54:40 1999 Alexandre Petit-Bianco Sat Apr 24 16:50:19 1999 Alexandre Petit-Bianco * class.c (layout_class_method): Generate 's rtl for - interfaces. + interfaces. * decl.c (complete_start_java_method): Don't call _Jv_InitClass - for interfaces' . + for interfaces' . * expr.c (lookup_field): Search for fields in interfaces. (expand_invoke): Fixed indentation. (expand_java_field_op): Likewise. Use IS_CLINIT. * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed. (IS_CLINIT): New macro. * parse.y (type_declaration:): Call maybe_generate_clinit after an - interface was parsed. + interface was parsed. (maybe_generate_clinit): Don't generate if the current class is an - interface with only fields of primitive types. + interface with only fields of primitive types. (reset_method_name): Use IS_CLINIT. (java_complete_expand_method): Expand when it exists for - interfaces. Use IS_CLINIT. + interfaces. Use IS_CLINIT. (resolve_expression_name): Use DECL_CONTEXT instead of - current_class to build static field references. + current_class to build static field references. (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on - ARRAY_REF when doing xreferencing. + ARRAY_REF when doing xreferencing. (check_final_assignment): Fixed typo in leading comment. Use - IS_CLINIT. + IS_CLINIT. (patch_array_ref): Don't fully expand array references when - xreferencing. + xreferencing. (patch_return): Use IS_CLINIT. (patch_throw_statement): Likewise. @@ -6456,36 +6461,36 @@ Wed Apr 21 11:13:36 1999 Alexandre Petit-Bianco * decl.c (predef_filenames, predef_filenames_size): New globals (init_decl_processing): predef_filenames and predef_filenames_size - initialized. + initialized. * java-tree.h (predef_filenames, predef_filenames_size): Declared - extern. + extern. * jcf-parse.c (predefined_filename_p): New function. (yyparse): Check that files on the command line are specified only - once and issue a warning otherwise. + once and issue a warning otherwise. * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro. * parse.y (source_end_java_method): Nullify NOP method bodies, to - avoid a gcc warning with -W -Wall turned on. + avoid a gcc warning with -W -Wall turned on. (java_expand_classes): Abort if errors were encountered. (java_complete_lhs): If the cross reference flag is set, wrap - field DECL node around a WFL when resolving expression name. + field DECL node around a WFL when resolving expression name. Mon Apr 19 14:44:48 1999 Alexandre Petit-Bianco * lang.c (lang_decode_option): Fixed returned value when parsing - `-fxref=...' and `-Wall'. + `-fxref=...' and `-Wall'. * parse.y (source_end_java_method): Do not generate code when - flag_emit_xref is set. + flag_emit_xref is set. (resolve_expression_name): Do not build static field access when - flag_emit_xref is set. + flag_emit_xref is set. (resolve_field_access): No special treatment on `length' when - flag_emit_xref is set. Do not build qualified static field access - when flag_emit_xref is set. + flag_emit_xref is set. Do not build qualified static field access + when flag_emit_xref is set. (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR - when flag_emit_xref is set. + when flag_emit_xref is set. (patch_assignment): Do not generate array store runtime check when - flag_emit_xref is set. + flag_emit_xref is set. * xref.c (xref_flag_value): Fixed function declaration - indentation. + indentation. (xset_set_data): New function. * xref.h (xref_set_data): Added prototype for new function. (typedef struct xref_flag_table): New field data. @@ -6506,7 +6511,7 @@ Thu Apr 15 13:08:03 1999 Anthony Green Mon Apr 12 18:27:32 1999 Alexandre Petit-Bianco * parse.y (patch_unaryop): Fixed ++/-- operator check on array - references. + references. Tue Apr 6 23:15:52 1999 Jeffrey A Law (law@cygnus.com) @@ -6569,7 +6574,7 @@ Mon Apr 5 11:24:19 1999 Alexandre Petit-Bianco * parse.y (struct parser_ctxt *ctxp): Now global. (declare_local_variables): Use WFL compound value for the - declaration source line value, when doing cross-referencing. + declaration source line value, when doing cross-referencing. 1999-03-31 Tom Tromey @@ -6593,12 +6598,12 @@ Wed Mar 31 11:00:32 1999 Kaveh R. Ghazi Tue Mar 30 11:31:53 1999 Alexandre Petit-Bianco * parse.y (patch_bc_statement): Fixed identation and a bogus - `printf' format. + `printf' format. Tue Mar 30 11:29:29 1999 Alexandre Petit-Bianco * parse.y (patch_assignment): Allow static variables in other - classes to be assigned. + classes to be assigned. Sun Mar 28 22:12:10 1999 Kaveh R. Ghazi @@ -6615,7 +6620,7 @@ Sun Mar 28 22:12:10 1999 Kaveh R. Ghazi Sat Mar 27 15:49:18 1999 Per Bothner * parse.y (complete_loop_body): Rename to finish_loop_body. - (complete_labeled_statement): Rename to finish_labeled_statement. + (complete_labeled_statement): Rename to finish_labeled_statement. (complete_for_loop): Rename to finish_for_loop. (complete_method_declaration): Rename to finish_method_declaration. @@ -6632,14 +6637,14 @@ Sat Mar 27 15:49:18 1999 Per Bothner Sat Mar 27 15:13:21 1999 Alexandre Petit-Bianco * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count - using a WFL compound value. + using a WFL compound value. * parse.y (xref.h): Include. (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the - WFL compound value. + WFL compound value. (register_fields): Set WFL compound value to lineno if doing - xrefs. + xrefs. (java_complete_expand_method): Call expand_xref if flag_emit_xref - is set. + is set. * xref.c (system.h, jcf.h, parse.h, obstack.h): Include. * xref.h (expand_xref): Prototype renamed from xref_generate. @@ -6650,20 +6655,20 @@ Sat Mar 27 14:16:32 1999 Alexandre Petit-Bianco * parse.y (current_static_block): New global variable. (method_body:): Define action. (complete_method_declaration): Set current_function_decl to NULL - when work on the current method is done. + when work on the current method is done. (declare_local_variables): Use GET_CURRENT_BLOCK. (java_method_add_stmt): Likewise. (java_complete_expand_method): Disable the use of `this' when - expanding . + expanding . (enter_a_block): If no current method exist, use - current_static_block to link static initializer blocks. + current_static_block to link static initializer blocks. (exit_block): Rewritten to use current_static_block when no current - method decl exists. + method decl exists. (lookup_name_in_blocks): Use GET_CURRENT_BLOCK. (patch_return): Forbid the use of `return' in static initializers. (patch_throw_statement): Fixed indentation. Issue specific error - for uncaught thrown checked exception in static initializer - blocks. Removed FIXME. + for uncaught thrown checked exception in static initializer + blocks. Removed FIXME. 1999-03-25 Zack Weinberg @@ -6673,8 +6678,8 @@ Sat Mar 27 14:16:32 1999 Alexandre Petit-Bianco Tue Mar 23 10:48:24 1999 Alexandre Petit-Bianco * parse.y (find_applicable_accessible_methods_list): When dealing - with interface: ensure that a given interface or java.lang.Object - are searched only once. + with interface: ensure that a given interface or java.lang.Object + are searched only once. Tue Mar 23 10:05:27 1999 Kaveh R. Ghazi @@ -6698,7 +6703,7 @@ Mon Mar 22 20:14:26 1999 Alexandre Petit-Bianco * Changelog: Fixed 1999-03-22 typos. * lang.c (lang_decode_option): Fixed typo in error string in the - XARG section. + XARG section. 1999-03-22 Alexandre Petit-Bianco @@ -6795,7 +6800,7 @@ Sun Mar 21 08:30:30 1999 Kaveh R. Ghazi write_chunks, adjust_typed_op, generate_bytecode_conditional, generate_bytecode_return, perform_relocations, init_jcf_state, init_jcf_method, release_jcf_state, generate_classfile): - Add static prototype. + Add static prototype. (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED. (make_class_file_name): Const-ify. @@ -6809,8 +6814,8 @@ Sun Mar 21 08:30:30 1999 Kaveh R. Ghazi * lang.c (lang_f_options): Const-ify. * lex.c (java_parse_escape_sequence): Add static prototype. - (java_allocate_new_line): Match definition to existing static - prototype. + (java_allocate_new_line): Match definition to existing static + prototype. * mangle.c Include tree.h/java-tree.h. (unicode_mangling_length, emit_unicode_mangled_name, @@ -6902,7 +6907,7 @@ Sat Mar 13 18:16:34 1999 Per Bothner Fri Mar 12 19:42:55 1999 Kaveh R. Ghazi * constants.c (find_class_or_string_constant): Cast variable `j' - to a `jword' when comparing against one. + to a `jword' when comparing against one. * expr.c (java_lang_expand_expr): Remove unused variables `has_finally_p' and `op0'. @@ -6940,8 +6945,8 @@ Wed Mar 10 23:20:11 1999 Per Bothner Tue Mar 9 11:52:08 1999 Alexandre Petit-Bianco - * parse.y (method_header): Don't set ACC_ABSTRACT flags on - interfaces. + * parse.y (method_header): Don't set ACC_ABSTRACT flags on + interfaces. Fri Mar 5 15:17:29 1999 Per Bothner @@ -6969,7 +6974,7 @@ Sat Mar 6 11:17:16 1999 Kaveh R. Ghazi (parse-scan.o): Depend on toplev.h. * class.c (make_method_value): Add prototype. Make it static. - Remove unused second argument, caller changed. + Remove unused second argument, caller changed. * expr.c (java_lang_expand_expr): Remove unused variable `return_label'. @@ -7140,10 +7145,10 @@ Fri Feb 19 13:00:56 1999 Per Bothner Wed Feb 17 15:47:20 1999 Alexandre Petit-Bianco * parse.y (check_pkg_class_access): Allow private class access - within the same package. + within the same package. (strip_out_static_field_access_decl): New function. (patch_unaryop): Call strip_out_static_field_access_decl on ++/-- - operator argument before testing its nature. + operator argument before testing its nature. Wed Feb 3 12:38:43 1999 Per Bothner @@ -7182,8 +7187,8 @@ Wed Feb 3 12:38:43 1999 Per Bothner Thu Feb 11 21:25:51 1999 Alexandre Petit-Bianco - * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid - of an ancient workaround. + * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid + of an ancient workaround. Wed Feb 10 23:27:33 1999 Jeffrey A Law (law@cygnus.com) @@ -7211,11 +7216,11 @@ Tue Feb 9 19:31:09 1999 Alexandre Petit-Bianco * lex.c (java_lang_cloneable): Initialize. * parse.y (java_lang_cloneable): New static variable. (qualify_ambiguous_name): Take CONVERT_EXPR into account when - doing one more qualification round. + doing one more qualification round. (valid_ref_assignconv_cast_p): Reject null source or - destination. Allow an array to be cast into java.lang.Cloneable. + destination. Allow an array to be cast into java.lang.Cloneable. (patch_cast): Swapped two first arguments to first call to - valid_ref_assignconv_cast_p. + valid_ref_assignconv_cast_p. Mon Feb 8 11:50:50 1999 Alexandre Petit-Bianco @@ -7251,7 +7256,7 @@ Tue Feb 2 19:49:12 1999 Jeffrey A Law (law@cygnus.com) Tue Feb 2 20:04:50 1999 Kaveh R. Ghazi * jvspec.c (xmalloc): Fix the prototype to match the one obtained - from libiberty.h + from libiberty.h Tue Feb 2 10:39:47 1999 Per Bothner @@ -7279,15 +7284,15 @@ Fri Jan 29 18:19:02 1999 Alexandre Petit-Bianco * lex.c (java_read_char): Fixed utf8 decoding. (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff - range. + range. * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed - comments. Local variable `all_primitive' is gone. Broadened - acceptance of `0' to floating point targets. `long' can now be - widened to `double' or `float'. + comments. Local variable `all_primitive' is gone. Broadened + acceptance of `0' to floating point targets. `long' can now be + widened to `double' or `float'. (valid_method_invocation_conversion_p): Added leading - comment. Fixed tabulation. + comment. Fixed tabulation. (build_string_concatenation): Optimize out left or right empty - string constants. + string constants. Thu Jan 28 18:51:26 1999 Per Bothner @@ -7340,16 +7345,16 @@ Thu Jan 28 11:50:11 1999 Alexandre Petit-Bianco * jcf-parse.c (jcf_parse): Don't parse the same class file twice. * parse.y (patch_cast): Allow a boolean to be cast into a - boolean. + boolean. Wed Jan 27 10:19:29 1999 Alexandre Petit-Bianco * parse.y: (class_declaration:): Fixed indentation. (class_member_declaration:): Extra `;' after field declaration now - accepted. + accepted. (interface_declaration:): Removed debug messages in error reports. (patch_binop): Nodes created and returned inherit the orignal - node's COMPOUND_ASSIGN_P flag value. + node's COMPOUND_ASSIGN_P flag value. (patch_cast): Fix cast from char to floating point. Mon Jan 25 17:39:19 1999 Andrew Haley @@ -7470,13 +7475,13 @@ Sat Jan 23 23:02:43 1999 Kaveh R. Ghazi Thu Jan 21 16:00:06 1999 Andrew Haley * typeck.c (convert): Allow conversions to void type: some - optimizations in gcc do this. + optimizations in gcc do this. Thu Jan 21 15:21:49 1999 Andrew Haley * typeck.c (convert_ieee_real_to_integer): New function. (convert): When not using fast-math and using hardware fp, convert - an IEEE NaN to zero. + an IEEE NaN to zero. 1999-01-18 Andrew Haley @@ -7490,7 +7495,7 @@ Sun Jan 17 22:34:22 1999 Alexandre Petit-Bianco * parse.y (do_resolve_class): Removed unused locals. (read_import_dir): Likewise. (resolve_qualified_expression_name): Array creation - expressions are valid primary expressions. + expressions are valid primary expressions. (qualify_ambiguous_name): Likewise. (patch_synchronized_statement): Removed unused local. @@ -7543,11 +7548,11 @@ Wed Jan 13 01:24:54 1999 Alexandre Petit-Bianco (dims:): Uses a stack to keep track of array dimensions. (cast_expression:): Use CURRENT_OSB. (find_expr_with_wfl): Return NULL if node found doesn't meet the - conditions. + conditions. (register_fields): Fixed typos in comment. (check_method_redefinition): Fixed comment indentation. (java_check_regular_methods): Set saved found wfl to NULL after - having reinstalled it in the previously found DECL_NAME. + having reinstalled it in the previously found DECL_NAME. Sun Jan 10 13:36:14 1999 Richard Henderson @@ -7681,7 +7686,7 @@ Mon Dec 14 18:49:29 1998 Per Bothner * parse.y (fold_constant_for_init): New function. (resolve_expression_name): Don't replace static final - constant-initialized fields by its value. + constant-initialized fields by its value. (java_complete_lhs): New. Same as java_complete_tree, except does not replace static final constant-initialized fields by their values. (register_fields): If there is an initializer, set DECL_INITIAL and @@ -7749,7 +7754,7 @@ Sat Dec 12 20:13:19 1998 Per Bothner COMPONENT_REF - only to handle PRIMCLASS.TYPE. * parse.y (patch_synchronized_statement): Don't call monitorexit - unless block CAN_COMPLETE_NORMALLY. Propagate that flag properly. + unless block CAN_COMPLETE_NORMALLY. Propagate that flag properly. * java-tree.h (DECL_LOCAL_STATIC_VALUE): Removed - no longer used. @@ -7810,7 +7815,7 @@ Sat Dec 12 19:21:11 1998 Per Bothner Now is passed the actual array (pointer) type of the value. Set the type of the CONSTRUCTOR to be an ARRAY_TYPE. (patch_array_constructor): Removed - merged into patch_new_array_init. - (java_complete_tree): Update patch_new_array_init. + (java_complete_tree): Update patch_new_array_init. * jcf-write.c (find_constant_index): New function. (generate_bytecode_insns): Use find_constant_index. @@ -7826,55 +7831,55 @@ Sat Dec 12 19:21:11 1998 Per Bothner Thu Dec 10 20:00:54 1998 Alexandre Petit-Bianco * decl.c (long_zero_node, float_zero_node, double_zero_node): New - global variables, initialized. + global variables, initialized. * java-tree.h (long_zero_node, float_zero_node, double_zero_node): - Declared new global variables. + Declared new global variables. * lex.c (java_lex): Return long_zero_node, float_zero_node, - double_zero_node, integer_zero_node upon direct matching. + double_zero_node, integer_zero_node upon direct matching. * parse.y (purify_type_name): Added function prototype. (duplicate_declaration_error_p): Consider new_type as potentially - being a incomplete type. Use purify_type_name on type string. + being a incomplete type. Use purify_type_name on type string. (method_header): saved_type: unused variable removed. Don't figure - return type if method name is invalid. + return type if method name is invalid. (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was - processed by patch_unaryop. + processed by patch_unaryop. (patch_unaryop): Fixed typo in comment. Re-convert pre/post - increment/decrement node into its original type after binary - numeric promotion on its operands. + increment/decrement node into its original type after binary + numeric promotion on its operands. Thu Dec 10 11:02:49 1998 Alexandre Petit-Bianco * parse.y (array_initializer:): Array init operand is NULL_TREE - instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is - now an error. Fixed indentation problems. + instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is + now an error. Fixed indentation problems. (patch_string): Handle error_mark_node as an argument. (patch_new_array_init): Fixed indentation problems. (array_constructor_check_entry): Removed check on null wfl_value. - Return an error if wfl_value's walk returns an error. + Return an error if wfl_value's walk returns an error. Wed Dec 9 15:37:05 1998 Alexandre Petit-Bianco * java-tree.def (NEW_ARRAY_INIT): New Java tree code. * lex.c (java_lex): Remember column position before advancing one - token. Retain location information on OCB_TK. + token. Retain location information on OCB_TK. * lex.h (typedef struct java_lc): Added new field. * parse.h (GET_SKIP_TYPE): New macro. (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE. * parse.y (build_new_array_init, patch_new_array_init, - patch_array_constructor, maybe_build_array_element_wfl, - array_constructor_check_entry): New function prototypes. + patch_array_constructor, maybe_build_array_element_wfl, + array_constructor_check_entry): New function prototypes. (switch_block:): Tagged . (OCB_TK): Tagged . (array_initializer:): Installed actions. (variable_initializer): Build location information on element if - necessary. + necessary. (switch_statement:): Fixed indentation typo. (switch_block:): Redefined default action. (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:. (patch_assignment): Removed duplicate code. (maybe_build_array_element_wfl, build_new_array_init, - patch_new_array_init, patch_array_constructor, - array_constructor_check_entry): New functions. + patch_new_array_init, patch_array_constructor, + array_constructor_check_entry): New functions. Mon Dec 7 15:13:52 1998 Alexandre Petit-Bianco @@ -7883,13 +7888,13 @@ Mon Dec 7 15:13:52 1998 Alexandre Petit-Bianco (array_initializer:): Defined actions. (variable_initializers:): Likewise. (resolve_qualified_expression_name): Use DECL_CONTEXT to build - non-static field accesses. + non-static field accesses. (patch_invoke): Fixed indentation typo. (java_complete_tree): Likewise. (build_labeled_block): Changed leading comment. Generate an error - in case of duplicate loop labels. + in case of duplicate loop labels. (patch_conditional_expr): Patch results of string concatenation - operations. + operations. Sun Dec 6 13:45:00 1998 Per Bothner @@ -7905,7 +7910,7 @@ Sun Dec 6 13:45:00 1998 Per Bothner * java-tree.h (CALL_USING_SUPER): New macro. * parse.y (patch_invoke): Remove im local variable. - (patch_method_invocation, patch_invoke): Don't pass super parameter. + (patch_method_invocation, patch_invoke): Don't pass super parameter. (patch_invoke): Use CALL_USING_SUPER instead of from_super parameter. (resolve_qualified_expression_name): Maybe set CALL_USING_SUPER. @@ -7932,18 +7937,18 @@ Sun Dec 6 13:21:18 1998 Per Bothner Thu Dec 3 17:11:12 1998 Alexandre Petit-Bianco * java-tree.h (java_layout_seen_class_methods): New function - prototype. + prototype. (LAYOUT_SEEN_CLASS_METHODS): Macro removed. * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods. * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro. * parse.y (method_declarator:): Defined action. (issue_warning_error_from_context): input_filename saved, set to - the appropriate value and restored after java_error is called. + the appropriate value and restored after java_error is called. (build_unresolved_array_type): Fixed comment. (register_fields): Use PROMOTE_RECORD_IF_COMPLETE. (method_header): Deal with return type the same way type are - handled for fields and method's parameters and local variables - types are handled. + handled for fields and method's parameters and local variables + types are handled. (check_method_redefinition): Removed extra CR. (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE. (java_layout_seen_class_methods): New function. @@ -7964,22 +7969,22 @@ Wed Dec 2 15:52:25 1998 Alexandre Petit-Bianco on constructors too. * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE. (patch_method_invocation): Define a primary when resolving an - expression name. Augmented comment on code checking illegal `this' - usage. Loosened it test by accepting NEW_CLASS_EXPR. + expression name. Augmented comment on code checking illegal `this' + usage. Loosened it test by accepting NEW_CLASS_EXPR. Tue Dec 1 13:53:24 1998 Alexandre Petit-Bianco * class.c (layout_class_method): Don't report error on non-static - overriding static if the method is private. + overriding static if the method is private. * java-tree.h (finish_class): Prototype added. * lex.c (java_get_line_col): Handle col argument -2 value. * parse.h: All static method declarations moved to parse.y. * parse.y: Now contains all static method declarations previously - found in parse.h. + found in parse.h. (find_expr_with_wfl, missing_return_error, - unreachable_stmt_error): New functions. + unreachable_stmt_error): New functions. (java_get_real_method_name): Identify constructors bearing class - names in source code compiled classes only. + names in source code compiled classes only. (java_complete_expand_methods): Call missing_return_error. (invocation_mode): Private methods invoked as static methods. (java_complete_tree): Call unreachable_stmt_error. @@ -8017,7 +8022,7 @@ Thu Nov 26 12:44:07 1998 Per Bothner soft_monitorenter_node, soft_monitorexit_node, throw_node. * jcf-write.c (generate_bytecode_insns): - Handle pre/post-increment/decrement of long. + Handle pre/post-increment/decrement of long. * jcf-write.c (generate_bytecode_insns): Handle missing exception handler (finally for synchronized). @@ -8061,71 +8066,71 @@ Wed Nov 25 00:50:58 1998 Marc Espie Tue Nov 24 17:06:38 1998 Per Bothner * (generate_classfile): Always write class access flag with - ACC_SUPER set. + ACC_SUPER set. Tue Nov 24 16:34:33 1998 Alexandre Petit-Bianco * class.c (maybe_layout_super_class): New function. (layout_class): Reorganized. Loop on class methods dispatched into - a new function. Call maybe_layout_super_class. + a new function. Call maybe_layout_super_class. (layout_class_methods, layout_class_method): New functions. * expr.c (expand_java_NEW): Call layout_class_methods on loaded - class. + class. (expand_invoke): Likewise. * java-tree.h (all_class_list): New global variable declared. (layout_class_methods, layout_class_method): New function - prototypes. + prototypes. (LAYOUT_SEEN_CLASS_METHODS): New macro. * jcf-parse.c (all_class_list): New global variable. (load_class): Extended what class_or_name can be. Use parser - context mechanism to save globals before calling jcf_parse. + context mechanism to save globals before calling jcf_parse. (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P - is set on the file name. + is set on the file name. (jcf_parse): Layout class methods when Object is loaded, otherwise - record class in all_class_list for delayed method layout. + record class in all_class_list for delayed method layout. (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS. * lang.c (put_decl_node): Decode into the decl context - class name. + class name. * lex.c (java_allocate_new_line): Use xmalloc. * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete - pointers, not TREE_LIST elements. + pointers, not TREE_LIST elements. (struct parser_ctxt): Fixed comment indentations, added comments - and reordered some fields. + and reordered some fields. (java_check_methods): Function prototype removed. * parse.y (java_push_parser_context): Use xmalloc. (java_parser_context_restore_global): Pop extra pushed ctxp only - when there's nothing next. + when there's nothing next. (maybe_create_class_interface_decl): Fixed comment, add new - created class decl to all_class_list. + created class decl to all_class_list. (method_header): Use GET_REAL_TYPE on argument's types. (method_declarator): Use GET_REAL_TYPE, change type to the real - type in TREE_LIST dependency node. Build argument list with the - real type. + type in TREE_LIST dependency node. Build argument list with the + real type. (create_jdep_list): Use xmalloc. Removed allocation error message. (obtain_incomplete_type): Fixed leading comment. Broadened - incoming argument meaning. + incoming argument meaning. (register_incomplete_type): Use xmalloc. Removed allocation error - message. + message. (safe_layout_class): Fixed leading comment. (jdep_resolve_class): Reversed if statement condition and switch - if and else bodies. + if and else bodies. (resolve_and_layout): Fixed leading comment. Broadened incoming - argument meaning. + argument meaning. (complete_class_report_errors): New local variable name, for - clarity. purify_type_name used for all error cases. + clarity. purify_type_name used for all error cases. (java_get_real_method_name): Stricter check on constructors. (java_check_regular_methods): Reverse methods list only if not - already laid out. Layout artificial constructor. + already laid out. Layout artificial constructor. (java_check_methods): Deleted. (source_start_java_method): Obtain incomplete type for patchable - method arguments. + method arguments. (java_layout_classes): Fixed leading comment. Use - LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else - statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS - before returning. Fixed comments. + LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else + statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS + before returning. Fixed comments. (java_expand_classes): Check for errors up front. (patch_method_invocation): Class to search is resolved and laid - out. + out. Tue Nov 24 12:57:13 1998 Per Bothner @@ -8146,7 +8151,7 @@ Tue Nov 24 12:57:13 1998 Per Bothner Thu Nov 19 11:16:55 1998 Alexandre Petit-Bianco * jcf-parse.c (jcf_parse_source): Function returned type is - void. Added prototype. + void. Added prototype. (jcf_parse): Function returned type is void. (yyparse): Remove call to fclose on the last parsed file. @@ -8157,117 +8162,117 @@ Wed Nov 18 23:54:53 1998 Alexandre Petit-Bianco * class.c (unmangle_classname): Set QUALIFIED_P when appropriate. (layout_class): Cope with methods featuring WFL in decl names. * decl.c (unqualified_object_id_node): New global variable, - initialized. + initialized. (build_decl_no_layout): Removed. * expr.c (build_primtype_type_ref): Handle Double. (java_lang_expand_expr): Fixed indentations. * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted. (flag_wall, flag_redundant, flag_not_overriding, - flag_static_local_jdk1_1, unqualified_object_id_node): Global - variable declarations. + flag_static_local_jdk1_1, unqualified_object_id_node): Global + variable declarations. (build_decl_no_layout): Removed prototype. (java_get_real_method_name): Added prototype. (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P. (java_parse_abort_on_error): Macro now just returns. * jcf-parse.c (jcf_parse_source): Check fclose returned - value. Call emit_register_classes if java_report_errors returns - zero. + value. Call emit_register_classes if java_report_errors returns + zero. * lanc.c (flag_wall, flag_redundant, flag_not_overriding, - flag_static_local_jdk1_1): New integer flags. + flag_static_local_jdk1_1): New integer flags. (lang_decode_option): New flags set here. * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros. (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to - the flag_redundant variable. + the flag_redundant variable. (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object - when parsing java.lang.Object class. + when parsing java.lang.Object class. (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal - NULL_TREE to build. + NULL_TREE to build. (resolve_qualified_expression_name): Fixed indentation. (patch_array_ref): Changed prototype. (not_initialized_as_it_should_p): Prototype removed. (java_report_errors): Added function prototype. * parse.y (formal_parameter:): Changed error message for not yet - supported final parameters. + supported final parameters. (class_type_list:): Set both PURPOSE and VALUE of created - TREE_LIST to be class_type. + TREE_LIST to be class_type. (primary_no_new_array:): Handle class literals on primitive types. (parse_warning_context): Reinstalled correct force_error and - do_warning flags setups. + do_warning flags setups. (java_report_errors): Changed prototype. Return java_error_count - value. + value. (variable_redefinition_error): Consider treating variable type as - a fake pointer. + a fake pointer. (create_interface): Warn about redundant abstract modifier if - flag_redundant is set. Changed error message. + flag_redundant is set. Changed error message. (lookup_field_wrapper): Save/restore globals before/after looking - up field. + up field. (duplicate_declaration_error_p): Consider treating declaration - type as a fake pointer. + type as a fake pointer. (register_fields): Extract real type from dependency node. Check - for duplicate field declaration after type adjustment. Use - DECL_INITIAL to store static final initialized values. + for duplicate field declaration after type adjustment. Use + DECL_INITIAL to store static final initialized values. (method_header): Extract real function type from dependency node. (check_abstract_method_header): Use GET_METHOD_NAME. (obtain_incomplete_type): Layout fake pointer type. (safe_layout_class): Don't try to check for methods before layout. (java_complete_class): Don't check for correct throws clause - elements inheritance here. + elements inheritance here. (resolve_and_layout): Broadened name parameter meaning. (reset_method_name): Use GET_METHOD_NAME. (java_get_real_method_name): New function. (java_check_regular_methods): Don't check methods in - java.lang.Object. Verify lineage of throws clause elements. Use - flag_no_overriding in warning report. + java.lang.Object. Verify lineage of throws clause elements. Use + flag_no_overriding in warning report. (check_throws_clauses): Don't check if class was from - bytecode. Use IS_UNCHECKED_EXCEPTION_P macro. + bytecode. Use IS_UNCHECKED_EXCEPTION_P macro. (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag. (declare_local_variables): Use flag_static_local_jdk1_1 to report - warning on unsupported final local variables. Use build_decl - instead of build_decl_no_layout. Get real local variable type from - dependency node. + warning on unsupported final local variables. Use build_decl + instead of build_decl_no_layout. Get real local variable type from + dependency node. (source_start_java_method): Get real parameter type from - dependency node. Call build_decl instead of build_decl_no_layout. + dependency node. Call build_decl instead of build_decl_no_layout. (java_layout_classes): Reverse tree and layout type and class as - required. Mark class as loaded when done. + required. Mark class as loaded when done. (resolve_field_access): Fixed indentation. Restricted condition - leading to static field access code generation. Set field_type - decl's TREE_TYPE if QUAL_DECL_TYPE not available. + leading to static field access code generation. Set field_type + decl's TREE_TYPE if QUAL_DECL_TYPE not available. (resolve_qualified_expression_name): Initialize type_found to - null. Handle static field resolved during qualification. Fixed - layout on non primitive field decl types. + null. Handle static field resolved during qualification. Fixed + layout on non primitive field decl types. (not_accessible_p): Fixed typo in comment. (patch_method_invocation): Resolve and layout class to search from - type. + type. (lookup_method_invoke): Keep integer constant 0 as is. Resolve and - layout non primitive type, if necessary. Make method node only to - report errors. + layout non primitive type, if necessary. Make method node only to + report errors. (find_applicable_accessible_methods_list): Consider WFL'ed method - decl names. Fixed indentation. + decl names. Fixed indentation. (argument_types_convertible): Resolve and layout target type if - necessary. + necessary. (java_complete_tree): Fixed indentation problems. Rewrote - CALL_EXPR thrown exceptions check. Re-installed further processing - of the assignment in certain cases. + CALL_EXPR thrown exceptions check. Re-installed further processing + of the assignment in certain cases. (patch_assignment): Call maybe_build_primttype_type_ref to perform - inlining on class literals. + inlining on class literals. (valid_builtin_assignconv_identity_widening_p): Cope with constant - 0 literal. + 0 literal. (valid_method_invocation_conversion_p): Likewise. (patch_string): Temporary disable forbidden use of `this' in - explicit constructor invocations when doing string concatenation - within their scope. + explicit constructor invocations when doing string concatenation + within their scope. (patch_unaryop): Added comment. Reinstalled code to disable - further check on assignment operation with cast expression RHS. + further check on assignment operation with cast expression RHS. (patch_switch_statement): Fixed indentation. (build_try_statement): Call build_decl instead of - build_decl_no_layout. + build_decl_no_layout. (patch_synchronized_statement): Likewise. (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of - IS_UNCHECKED_EXPRESSION_P. + IS_UNCHECKED_EXPRESSION_P. (check_thrown_exceptions_do): Changed leading comment. Resolve and - layout argument exception type. + layout argument exception type. (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead - of IS_UNCHECKED_EXPRESSION_P. + of IS_UNCHECKED_EXPRESSION_P. Wed Nov 18 14:21:48 1998 Anthony Green @@ -8434,173 +8439,173 @@ Wed Nov 11 19:08:52 1998 Per Bothner Tue Nov 10 12:34:03 1998 Alexandre Petit-Bianco * class.c (is_compiled_class): Call safe_layout_class for class - compiled from source. + compiled from source. * conver.h (convert_to_integer, convert_to_real, - convert_to_pointer): Added prototypes. + convert_to_pointer): Added prototypes. * decl.c (init_decl_processing): Non longer push the decls of - `methodtable', `constants', `Class', `Field', `dispatchTable' - `jexception' and `Method'. + `methodtable', `constants', `Class', `Field', `dispatchTable' + `jexception' and `Method'. * expr.c (build_invokeinterface): New function. (expand_invoke): static variable CLASS_IDENT now in - build_invokeinterface. Use build_invokeinterface. + build_invokeinterface. Use build_invokeinterface. (expand_java_field_op): Moved code to inline - java.lang.PRIMTYPE.TYPE into a function. + java.lang.PRIMTYPE.TYPE into a function. (build_primtype_type_ref): New function. * java-tree.def (INSTANCEOF_EXPR): New tree code. * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED, - FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros. + FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros. (DECL_CONSTRUCTOR_P): Fixed typo in comment. (DECL_LOCAL_STATIC_VALUE): New macro. (build_invokeinterface, build_primtype_type_ref): New function - prototypes. + prototypes. (java_parse_abort_on_error): Macro rewritten. * jcf-parse.c (current_method): Add comment to declaration. (parse_zip_file_entries, process_zip_dir, void parse_source_file): - Function prototypes fixed. + Function prototypes fixed. (jcf_parse_source): push/pop parser context. save/restore global. (parse_source_file): Fixed leading comment. Now take a - IDENTIFIER_NODE as an argument. Doesn't check methods, layout - classes and pop the parser context anymore. + IDENTIFIER_NODE as an argument. Doesn't check methods, layout + classes and pop the parser context anymore. (yyparse): Push parser context, save globals, parse the source - file, restore globals and pop the parser context when processing a - source file. + file, restore globals and pop the parser context when processing a + source file. * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define. * lex.c (java_parse_doc_section): New function. (java_lex): Call java_parse_doc_section when appropriate. Build an - operator around INSTANCEOF_TK. + operator around INSTANCEOF_TK. * lex.h (java_lineterminator, java_sprint_unicode, - java_unicode_2_utf8, java_lex_error, java_store_unicode): - Prototypes rewritten. + java_unicode_2_utf8, java_lex_error, java_store_unicode): + Prototypes rewritten. (java_parse_escape_sequence, java_letter_or_digit_p, - java_parse_doc_section, java_parse_end_comment, java_get_unicode, - java_read_unicode, java_store_unicode, java_read_char, - java_allocate_new_line, java_unget_unicode, java_sneak_unicode): - Added function prototypes. + java_parse_doc_section, java_parse_end_comment, java_get_unicode, + java_read_unicode, java_store_unicode, java_read_char, + java_allocate_new_line, java_unget_unicode, java_sneak_unicode): + Added function prototypes. * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG - define. + define. (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT): - New macros + New macros (struct parser_ctxt): New fields: deprecated, - current_parsed_class_un, gclass_list. + current_parsed_class_un, gclass_list. (fix_method_argument_names, issue_warning_error_from_context, - resolve_package, lookup_package_type): New function prototypes. + resolve_package, lookup_package_type): New function prototypes. (resolve_expression_name): Fixed function prototype. (find_applicable_accessible_methods_list): Fixed indentation, added extra argument in prototype. (check_final_assignment, build_null_of_type, check_deprecation, - check_method_redefinition, reset_method_name, - java_check_regular_methods, java_check_abstract_methods, - maybe_build_primttype_type_ref): New function prototype. + check_method_redefinition, reset_method_name, + java_check_regular_methods, java_check_abstract_methods, + maybe_build_primttype_type_ref): New function prototype. * parse.y (conver.h): Include. (INSTANCEOF_TK): Tagged . (single_type_import_declaration): Use REGISTER_IMPORT macro. (relational_expression:): Build binop for instanceof. (java_push_parser_context): Remember ctxp->gclass_list across - contexts. + contexts. (java_pop_parser_context): Simply return if no context - exists. Remember gclass_list across contexts. + exists. Remember gclass_list across contexts. (issue_warning_error_from_context): New function. (parse_error_context): Don't setup ctxp->elc here. Call - issue_warning_error_from_context instead. + issue_warning_error_from_context instead. (parse_warning_context): Likewise. (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL - setup. Link new class/interface to ctxp->gclass_list. + setup. Link new class/interface to ctxp->gclass_list. (add_superinterfaces): Register interface as incomplete if not - loaded. + loaded. (create_class): Remember class unqualified name in - ctxp->current_parsed_class_un. Check class deprecation. + ctxp->current_parsed_class_un. Check class deprecation. (register_fields): Check field deprecation. Remember static final - field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part - processing INIT. + field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part + processing INIT. (method_header): New local variable ORIG_ARG. Use unqualified - current class name for check on constructor errors. Promote return - type if of record type. Argument list fix moved in - fix_method_argument_names, called here. Check method deprecation. + current class name for check on constructor errors. Promote return + type if of record type. Argument list fix moved in + fix_method_argument_names, called here. Check method deprecation. (fix_method_argument_names): New function. (method_declarator): Promote record typed arguments. (safe_layout_class): Check class methods before layout. (java_complete_class): Compute field layout when patched. (do_resolve_class): Try to load class after having it renamed - after the package name. + after the package name. (get_printable_method_name): Use DECL_CONTEXT. (reset_method_name): New function. (check_method_redefinition): Use reset_method_name. (java_check_regular_methods): New local variable - SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method - names for error report. Check for compile-time error when method - found has default (package) access. + SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method + names for error report. Check for compile-time error when method + found has default (package) access. (java_check_abstract_methods): Now takes an interface DECL node as - an argument. Also reinstall real name on unchecked - overriding/hiding methods for error report. + an argument. Also reinstall real name on unchecked + overriding/hiding methods for error report. (java_check_methods): Fixed leading comment. Get classes to verify - from ctxp->gclass_list. Use CHECK_METHODS macro and set - CLASS_METHOD_CHECKED_P on class verification. + from ctxp->gclass_list. Use CHECK_METHODS macro and set + CLASS_METHOD_CHECKED_P on class verification. (lookup_java_method2): Get real method name if necessary. (find_in_imports): Don't check package class access here. (resolve_package, lookup_package_type): New functions. (java_layout_classes): Fixed leading comment. Take classes to be - laid out from ctxp->gclass_list. + laid out from ctxp->gclass_list. (java_complete_expand_methods): Don't expand native and abstract - methods. + methods. (java_expand_classes): New function. (resolve_expression_name): Use additional argument ORIG. Retrieve - values of static final field of primitive types. + values of static final field of primitive types. (resolve_field_access): Handles static final field of promotive - type. + type. (resolve_qualified_expression_name): Handle STRING_CST as - primaries and package name resolution. Check deprecation on found - decls. Set where_found and type_found on non static field resolved - during qualification. Layout non primitive field decl types. + primaries and package name resolution. Check deprecation on found + decls. Set where_found and type_found on non static field resolved + during qualification. Layout non primitive field decl types. (check_deprecation): New function. (maybe_access_field): Simplified. (patch_method_invocation_stmt): Local variable CLASS_TYPE - removed. Reverse method's argument when primary is a type. Don't - use CLASS_TYPE to report problems, use IDENTIFIER_WFL - instead. Include abstract class in the list of class searchable - for constructors. Use DECL_CONTEXT of found method for access - checks. Check method deprecation. + removed. Reverse method's argument when primary is a type. Don't + use CLASS_TYPE to report problems, use IDENTIFIER_WFL + instead. Include abstract class in the list of class searchable + for constructors. Use DECL_CONTEXT of found method for access + checks. Check method deprecation. (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when - converting arguments. Handle INVOKE_INTERFACE. + converting arguments. Handle INVOKE_INTERFACE. (lookup_method_invoke): Search constructor using existing - infrastructure (don't rely on lookup_java_constructor anymore). + infrastructure (don't rely on lookup_java_constructor anymore). (find_applicable_accessible_methods_list): Extra argument flag - LC. Now include constructor in the search. + LC. Now include constructor in the search. (qualify_ambiguous_name): Conditional expression are primaries. (not_initialized_as_it_should_p): static final are always - initialized. + initialized. (java_complete_tree): Pass extra NULL argument to - resolve_expression_name. Stricter test to carry on patching - assignments. New case for INSTANCEOF_EXPR. + resolve_expression_name. Stricter test to carry on patching + assignments. New case for INSTANCEOF_EXPR. (complete_function_arguments): Inline PRIMTYPE.TYPE read access. (check_final_assignment, maybe_build_primttype_type_ref): New - functions. + functions. (patch_assignment): Detect resolved static finals and carry normal - assignment error check on them. Inline PRIMTYPE.TYPE read access. + assignment error check on them. Inline PRIMTYPE.TYPE read access. (try_builtin_assignconv): Access constant 0 on all primitive - types. + types. (valid_builtin_assignconv_identity_widening_p): Accept identical - types. Accept all promoted type on int type. + types. Accept all promoted type on int type. (valid_ref_assignconv_cast_p): Accept a null pointer to be - assigned to a reference. + assigned to a reference. (valid_method_invocation_conversion_p): Accept to check null - pointers. + pointers. (build_binop): Merge declaration and initialization of local - variable BINOP. + variable BINOP. (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all - numeric types. Improved validity test for qualify operators on - references. + numeric types. Improved validity test for qualify operators on + references. (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR - and PREINCREMENT_EXPR. Also detect resolved static finals of a - primitive type and issue the appropriate error message. + and PREINCREMENT_EXPR. Also detect resolved static finals of a + primitive type and issue the appropriate error message. (resolve_type_during_patch): Mark class loaded when resolved. (patch_cast): Allow null to be cased to reference types. (build_null_of_type): New function. (patch_array_ref): Handle array on references correctly. (patch_return): Removed unused local variable MODIFY. Force - boolean to be returned as integers. Allows null to be returned by - a function returning a reference. + boolean to be returned as integers. Allows null to be returned by + a function returning a reference. * typeck.c (convert_to_integer, convert_to_real, - convert_to_pointer): Prototypes moved to convert.h + convert_to_pointer): Prototypes moved to convert.h (lookup_argument_method): Use method real name, if necessary. 1998-10-30 Tom Tromey @@ -8616,7 +8621,7 @@ Tue Nov 10 12:34:03 1998 Alexandre Petit-Bianco Wed Oct 28 08:03:31 1998 Alexandre Petit-Bianco * class.c (layout_class): Don't mangle , produce - __finit instead. Don't verify artificial methods. + __finit instead. Don't verify artificial methods. * decl.c (finit_identifier_node): New declared global. (init_decl_processing): finit_identifier_node initialized. * java-tree.def (CONDITIONAL_EXPR): New Java tree code. @@ -8625,17 +8630,17 @@ Wed Oct 28 08:03:31 1998 Alexandre Petit-Bianco (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor. (CLASS_HAS_FINIT_P): New macro. (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks - explicit constructor invocation. + explicit constructor invocation. (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P, - CALL_SUPER_CONSTRUCTOR_P): New macros. + CALL_SUPER_CONSTRUCTOR_P): New macros. (write_classfile): Added prototype. * jcf-parse.c (jcf_parse_source): Parse and remember for - generation if the file was seen on the command line. + generation if the file was seen on the command line. (parse_source_file): Don't write the class file here. (yyparse): Loop on files rewritten. Set current_jcf. (parse_zip_file_entries): Parse class file only if it was found. * lang.c (init_parse): Don't open command line provided filename - here. + here. (lang_parse): Don't set main_jcf anymore. * parse.h (ABSTRAC_CHECK): Capitalized arguments. (JCONSTRUCTOR_CHECK): New macro. @@ -8647,111 +8652,111 @@ Wed Oct 28 08:03:31 1998 Alexandre Petit-Bianco (patch_method_invocation_stmt): Prototype reflects added argument. (patch_invoke): Likewise. (complete_method_declaration, build_super_invocation, - verify_constructor_circularity, - build_this_super_qualified_invocation, get_printable_method_name, - patch_conditional_expr, maybe_generate_finit, fix_constructors, - verify_constructor_super, create_artificial_method, - start_artificial_method_body, end_artificial_method_body, - generate_field_initialization_code): New function prototypes. + verify_constructor_circularity, + build_this_super_qualified_invocation, get_printable_method_name, + patch_conditional_expr, maybe_generate_finit, fix_constructors, + verify_constructor_super, create_artificial_method, + start_artificial_method_body, end_artificial_method_body, + generate_field_initialization_code): New function prototypes. * parse.y: Fixed leading comment (constructor_header:, constructor_body:, block_end:): Rules tagged - . + . (type_declaration:): Call maybe_generate_finit. (method_declaration:): Action for method_body: placed in new - function complete_method_declaration, called here. + function complete_method_declaration, called here. (constructor_declaration:): Defined actions. Removed leading - FIXME. + FIXME. (constructor_header:): New rule with action. (constructor_body:): Rule rewritten using block_begin: and - block_end:. Defined actions. + block_end:. Defined actions. (constructor_declarator:, explicit_constructor_invocation:): - Defined actions. + Defined actions. (block:): Use new rules block_begin: block_end:. (block_begin:, block_end:): New rules and actions. (block_statements:): Fixed error message for explicit - constructors. + constructors. (method_invocation:): Call build_this_super_qualified_invocation - if primary is `this' or `super' was seen. + if primary is `this' or `super' was seen. (conditional_expression:): Action defined. (extra_ctxp_pushed_p): New static global flag. (java_parser_context_save_global): Create parser context if - necessary. Use extra_ctxp_pushed_p to remember it. + necessary. Use extra_ctxp_pushed_p to remember it. (java_parser_context_restore_global): Pop extra parser context if - one exists. + one exists. (build_array_from_name): Array on primitive types are marked - loaded. + loaded. (register_fields): Restore new name in field initializer - expression if type was altered. Non static fields initialized upon - declaration marked initialized. + expression if type was altered. Non static fields initialized upon + declaration marked initialized. (maybe_generate_finit): New function. (maybe_generate_clinit): Use create_artificial_method, - start_artificial_method_body, end_artificial_method_body. Generate - debug info for enclosed initialization statements. + start_artificial_method_body, end_artificial_method_body. Generate + debug info for enclosed initialization statements. (method_header): Fixed leading comment. Check constructor - flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P - accordingly. + flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P + accordingly. (complete_method_declaration, constructor_circularity_msg, - verify_constructor_circularity): New functions. + verify_constructor_circularity): New functions. (get_printable_method_name): New function. (check_method_redefinition): Don't rename methods. Fix - declared constructor names. Error message for - constructors modified. + declared constructor names. Error message for + constructors modified. (java_check_regular_methods): Local variable seen_constructor - renamed saw_constructor. Skip verification on constructors. Create - default constructor with create_artificial_method. + renamed saw_constructor. Skip verification on constructors. Create + default constructor with create_artificial_method. (java_check_methods): Removed unnecessary empty line. (create_artificial_method, start_artificial_method_body, - end_artificial_method_body): New functions. + end_artificial_method_body): New functions. (java_layout_classes): Changed leading comment. Reverse fields - list if necessary. Always layout java.lang.Object if being - defined. + list if necessary. Always layout java.lang.Object if being + defined. (java_complete_expand_methods): Verify constructor circularity. (java_complete_expand_method): Call fix_constructor on - constructors. Local variable no_ac_found removed. Restore - bindings if method body expansion failed. + constructors. Local variable no_ac_found removed. Restore + bindings if method body expansion failed. (fix_constructors, verify_constructor_super, - generate_field_initialization_code): New function. + generate_field_initialization_code): New function. (java_expand_classes): Fixed leading comment. Write class file - here. + here. (resolve_expression_name): Check for illegal instance variable - usage within the argument scope of an explicit constructor - invocation. + usage within the argument scope of an explicit constructor + invocation. (resolve_qualified_expression_name): Pass extra from_super flag - when invoking patch_method_invocation_stmt. New case for - conditional expression when used as a primary. Check for error - when acquiring super. + when invoking patch_method_invocation_stmt. New case for + conditional expression when used as a primary. Check for error + when acquiring super. (patch_method_invocation_stmt): Added extra argument super. New - local variable is_static_flag. Set class_to_search according to - the nature of the constructor invocation. Don't add `this' - argument when expanding NEW_CLASS_EXPR. Check for illegal method - invocation within the argument scope of explicit constructor - invocation. Set is_static according to is_static_flag. Provide - extra `super' argument to patch_invoke invocation. + local variable is_static_flag. Set class_to_search according to + the nature of the constructor invocation. Don't add `this' + argument when expanding NEW_CLASS_EXPR. Check for illegal method + invocation within the argument scope of explicit constructor + invocation. Set is_static according to is_static_flag. Provide + extra `super' argument to patch_invoke invocation. (patch_invoke): New argument from_super. Loop on arguments - indentation fixed. Pass from_super to invocation_mode. New switch - case INVOKE_SUPER. Fixed error message in switch default case. - Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node - value. + indentation fixed. Pass from_super to invocation_mode. New switch + case INVOKE_SUPER. Fixed error message in switch default case. + Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node + value. (invocation_mode): Return INVOKE_SUPER mode when appropriate. (lookup_method_invoke): Fixed prototypes in candidates list. Error - message takes constructors into account. + message takes constructors into account. (find_applicable_accessible_methods_list): Fixed indentation. (qualify_ambiguous_name): Take explicit constructor invocation - into account. Deal with a conditional expression as a primary to - a method call. + into account. Deal with a conditional expression as a primary to + a method call. (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR - case. Added extra argument to patch_method_invocation_stmt. - Register calls made to explicit constructor `this'. Don't call - save_expr in ARRAY_REF case when emitting class files. Check for - illegal use of this when expanding explicit constructor invocation - arguments. + case. Added extra argument to patch_method_invocation_stmt. + Register calls made to explicit constructor `this'. Don't call + save_expr in ARRAY_REF case when emitting class files. Check for + illegal use of this when expanding explicit constructor invocation + arguments. (complete_function_arguments): Set and reset parser context - explicit_constructor_p field value when appropriate. + explicit_constructor_p field value when appropriate. (build_super_invocation, build_this_super_qualified_invocation): - New functions. + New functions. (patch_assignment): Fixed typo. (patch_unaryop): Check on final fields occurs only when a decl - exits. + exits. (patch_return): Take constructors into account. (patch_conditional_expr): New function. * typeck.c (build_java_signature): Removed unnecessary empty line. @@ -8889,38 +8894,38 @@ Sun Oct 11 10:31:52 1998 Anthony Green Wed Oct 21 07:54:11 1998 Alexandre Petit-Bianco * class.c (emit_register_classes): Renamed from - emit_register_class. + emit_register_class. * java-tree.h (emit_register_classes): Prototype renamed from - emit_register_class. + emit_register_class. * jcf-parse.c (yyparse): Call emit_register_classes once before - returning. + returning. * parse.y (java_expand_classes): No longer register classes. Tue Oct 20 09:15:38 1998 Alexandre Petit-Bianco * class.c (is_compiled_class): New local variable - seen_in_zip. Identify classes found in currently compiled source - file(s). + seen_in_zip. Identify classes found in currently compiled source + file(s). * decl.c (complete_start_java_method): Fixed typo. * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P, - HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros. + HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros. (CLASS_P): Moved around. (java_parse_abort_on_error): Macro moved from jcf-parse.c * jcf-parse.c (java_parse_abort_on_error): Macro moved to - java-parse.h + java-parse.h (jcf_parse_source): Changed leading comment. Removed unnecessary - fclose and CLASS_FROM_SOURCE_P marking. + fclose and CLASS_FROM_SOURCE_P marking. (parse_source_file): New local variables remember_for_generation - and filename. Mark parsed file name identifier node. Removed block - executed when parse_only was null. Set remember_for_generation. + and filename. Mark parsed file name identifier node. Removed block + executed when parse_only was null. Set remember_for_generation. Use it as an argument to java_pop_parser_context. (yyparse): New local variables several_files, list, next node and - current_file_list. Split ampersand separated file names into - current_file_list. Iterate through the list and parse accordingly. + current_file_list. Split ampersand separated file names into + current_file_list. Iterate through the list and parse accordingly. * parse.h (java_pop_parser_context): New function prototype. * parse.y (ctxp_for_generation): New static global variable. (java_pop_parser_context): New argument generate. Link popped ctxp - to ctxp_for_generation list accordingly. + to ctxp_for_generation list accordingly. (java_complete_expand_methods): Fixed indentation. (java_expand_classes): New function. @@ -8934,125 +8939,125 @@ Fri Oct 16 10:59:01 1998 Alexandre Petit-Bianco * lex.h (setjmp.h): Included. * parse.h (SET_TYPE_FOR_RESOLUTION): New macro. (duplicate_declaration_error_p): Renamed from - duplicate_declaration_error. + duplicate_declaration_error. (build_array_from_name): New function prototype. * parse.y (setjmp.h): No longer included. (variable_declarator_id): Define action. (build_array_from_name): New function. (duplicate_declaration_error_p): Renamed from - duplicate_declaration_error. Fixed leading comment. + duplicate_declaration_error. Fixed leading comment. (register_fields): Main `for' loop reorganized. Uses - SET_TYPE_FOR_RESOLUTION and build_array_from_name. + SET_TYPE_FOR_RESOLUTION and build_array_from_name. (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call - build_array_from_name. + build_array_from_name. (resolve_class): Set CLASS_LOADED_P on newly build array dimension - types. + types. (read_import_dir): Don't try to skip `.' and `..'. (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and - build_array_from_name. Main `for' loop reorganized. + build_array_from_name. Main `for' loop reorganized. (resolve_qualified_expression_name): When building access to a - field, use the type where the field was found, not its own type. + field, use the type where the field was found, not its own type. (maybe_access_field): Use field DECL_CONTEXT if the type where the - field was found is null. + field was found is null. (qualify_ambiguous_name): Sweep through all successive array - dimensions. + dimensions. Wed Oct 14 18:21:29 1998 Alexandre Petit-Bianco * java-tree.h (pop_labeled_block, lang_printable_name, - maybe_add_interface, set_super_info, get_access_flags_from_decl, - interface_of_p, inherits_from_p, fix_classpath, - complete_start_java_method, emit_handlers, init_outgoing_cpool, - make_class_data, register_class, alloc_name_constant): New - function prototypes. + maybe_add_interface, set_super_info, get_access_flags_from_decl, + interface_of_p, inherits_from_p, fix_classpath, + complete_start_java_method, emit_handlers, init_outgoing_cpool, + make_class_data, register_class, alloc_name_constant): New + function prototypes. * lang.c (lang_decode_option): Set argc argument unused. Fixed - indentation. Added cast to remove warning. + indentation. Added cast to remove warning. (lang_printable_name): Set v argument unused. (lang_print_error): Added argument to lang_printable_name call. (java_dummy_print, print_lang_decl, print_lang_type, - print_lang_identifier, lang_print_xnode): All argument marked - unused. + print_lang_identifier, lang_print_xnode): All argument marked + unused. * lex.c (java_unget_unicode): Removed unnecessary argument. (java_allocate_new_line): Unused local variable is gone. (java_read_char): Added parenthesis in expressions to remove - warnings. Added final return statement. + warnings. Added final return statement. (java_read_unicode): Added parenthesis in expression to remove - warning. + warning. (java_parse_end_comment): Fixed java_unget_unicode invocation. (java_parse_escape_sequence): Likewise. (java_lex): Unused local variables are gone. Fixed - java_unget_unicode invocation. + java_unget_unicode invocation. * lex.h (set_float_handler): Prototype added when JC1_LITE not - defined. + defined. * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed - lang_printable_name invocation in macro. + lang_printable_name invocation in macro. (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL): - Likewise. + Likewise. (duplicate_declaration_error): Suppressed unused argument in - prototype. + prototype. (identical_subpath_p): Function declaration is gone. (patch_invoke): Suppressed unused argument in prototype. (patch_cast, build_labeled_block, check_thrown_exceptions): - Likewise. + Likewise. * parse.y (setjmp.h): Included (toplev.h): Likewise. (field_declaration:): Suppressed unused local (label_decl:): Fixed build_labeled_block invocation. (java_pop_parser_context): Put extra parenthesis around assignment - in if. + in if. (yyerror): Suppressed unused local variables. (variable_redefinition_error): Fixed lang_printable_name - invocation. + invocation. (create_interface): Suppressed unused local variables. (create_class): Likewise. (duplicate_declaration_error): Suppressed unused argument. Fixed - lang_printable_name invocation. + lang_printable_name invocation. (register_fields): Suppressed unused local variable. Fixed - duplicate_declaration_error invocation. + duplicate_declaration_error invocation. (method_header): Suppressed unused local variable. (method_declarator, parser_check_super): Likewise. (java_complete_class): Suppressed unused local variable. Fixed - fatal error message. + fatal error message. (complete_class_report_errors): Added default: in switch. (java_check_regular_methods): Fixed lang_printable_name - invocations. + invocations. (check_throws_clauses): Likewise. (java_check_abstract_methods): Suppressed unused local - variable. Fixed lang_printable_name invocation. + variable. Fixed lang_printable_name invocation. (read_import_entry): Added supplemental return statement. (read_import_dir): Suppressed unused local variables. (check_pkg_class_access, declare_local_variables): Likewise. (source_start_java_method): Suppressed unused extern variable - declarations + declarations (expand_start_java_method): Suppressed unused extern and local - variable declarations. + variable declarations. (java_complete_expand_methods): Likewise. (java_complete_expand_method): Suppressed unused local variables. (make_qualified_name): Likewise. (resolve_qualified_expression_name): Added default: in - switch. Fixed lang_printable_name invocation. + switch. Fixed lang_printable_name invocation. (class_instance_creation_expression): Added parenthesis around - expressions. + expressions. (patch_method_invocation_stmt): Fixed lang_printable_name and - patch_invoke invocations. + patch_invoke invocations. (check_for_static_method_reference): Fixed lang_printable_name - invocation. + invocation. (patch_invoke): Suppressed unused arguments and local variables. (lookup_method_invoke): Suppressed unused local variables. (qualify_ambiguous_name): Added default: in switch. (identical_subpath_p): Function removed. (patch_assignment): Suppressed unused local variables. Suppressed - unnecessary if statement. Fixed lang_printable_name invocations. + unnecessary if statement. Fixed lang_printable_name invocations. (try_builtin_assignconv): Fixed lang_printable_name invocations. (valid_ref_assignconv_cast_p): Parenthesis around - expression. Suppressed unused local variables. + expression. Suppressed unused local variables. (build_binop): Suppressed unused local variables. fixed - lang_printable_name invocations. + lang_printable_name invocations. (string_constant_concatenation): Suppressed unused local - variables. + variables. (patch_unaryop): Fixed lang_printable_name invocation. (patch_cast): Suppressed unnecessary argument. Fixed - lang_printable_name invocation. + lang_printable_name invocation. (patch_array_ref): Fixed lang_printable_name invocation. (patch_newarray, patch_return, patch_if_else_statement): Likewise. (build_labeled_block): Suppressed unused argument. @@ -9065,7 +9070,7 @@ Wed Oct 14 18:21:29 1998 Alexandre Petit-Bianco (patch_try_statement): Fixed lang_printable_name invocations. (patch_synchronized_statement, patch_throw_statement): Likewise. (check_thrown_exceptions): Fixed check_thrown_exceptions and - lang_printable_name invocations. + lang_printable_name invocations. (check_thrown_exceptions_do): Suppressed unused argument. 1998-10-14 Tom Tromey @@ -9120,14 +9125,14 @@ Tue Oct 13 23:34:12 1998 Jeffrey A Law (law@cygnus.com) Tue Oct 13 03:50:28 1998 Alexandre Petit-Bianco * decl.c (runtime_exception_type_node, error_exception_type_node): - New global variables. + New global variables. (init_decl_processing): Initialized. * expr.c (java_lang_expand_expr): Set caught exception type to - null if catch handler argument doesn't exit. + null if catch handler argument doesn't exit. * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific - tree codes. + tree codes. * java-tree.h (runtime_exception_type_node, - error_exception_type_node): Global variables declared. + error_exception_type_node): Global variables declared. (DECL_FUNCTION_THROWS): New macro. (DECL_FUNCTION_BODY): Modified comment. (DECL_SPECIFIC_COUNT): Likewise. @@ -9135,64 +9140,64 @@ Tue Oct 13 03:50:28 1998 Alexandre Petit-Bianco (IS_UNCHECKED_EXPRESSION_P): New macro. * lex.c (java_lex): Generate location information for THROW_TK. * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P, - EXCEPTIONS_P): New macros. + EXCEPTIONS_P): New macros. (enum jdep_code): New value JDEP_EXCEPTION. (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT, - BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR, - PATCH_METHOD_RETURN_ERROR): New macros. + BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR, + PATCH_METHOD_RETURN_ERROR): New macros. (patch_method_invocation_stmt): Added new argument to prototype. (patch_synchronized_statement, patch_throw_statement, - check_thrown_exceptions, check_thrown_exceptions_do, - purge_unchecked_exceptions, check_throws_clauses): New function - prototypes. + check_thrown_exceptions, check_thrown_exceptions_do, + purge_unchecked_exceptions, check_throws_clauses): New function + prototypes. * parse.y Fixed typo in keyword section. (throw:): Rule tagged . (THROW_TK): Keyword tagged . (method_header:): Last argument to call to method_header passed - from throws: rule. + from throws: rule. (throws:, class_type_list:, throw_statement:, - synchronized_statement:, synchronized:): Defined actions. + synchronized_statement:, synchronized:): Defined actions. (method_header): New local variable current. Register exceptions - from throws clause. + from throws clause. (java_complete_tree): Complete and verify exceptions from throws - clause. + clause. (complete_class_report_errors): Error message on exceptions not - found + found (java_check_regular_methods): Fixed typo. Shortcut on private - overriding methods. Changed error message on method - redefinition. Check for throws clause compatibility. + overriding methods. Changed error message on method + redefinition. Check for throws clause compatibility. (check_throws_clauses): New function. (java_check_abstract_methods): Use DECL_NAME for wfl or current - method. Changed error message on method redefinition. + method. Changed error message on method redefinition. (currently_caught_type_list): New static variable. (java_complete_expand_methods): Purge unchecked exceptions from - throws clause list. Call PUSH_EXCEPTIONS before walk and - POP_EXCEPTIONS after. + throws clause list. Call PUSH_EXCEPTIONS before walk and + POP_EXCEPTIONS after. (resolve_qualified_expression_name): Pass new argument as NULL to - patch_method_invocation_stmt. + patch_method_invocation_stmt. (patch_method_invocation_stmt): New argument ref_decl. Invoke - PATCH_METHOD_RETURN_ERROR when returning with error. Reverse - argument list when appropriate. Use new argument if non null to - store selected method decl. + PATCH_METHOD_RETURN_ERROR when returning with error. Reverse + argument list when appropriate. Use new argument if non null to + store selected method decl. (patch_invoke): Convert if necessary args of builtin types before - forming CALL_EXPR. Argument list no longer reversed here. + forming CALL_EXPR. Argument list no longer reversed here. (invocation_mode): Treat final methods as static methods. (java_complete_tree): New cases for THROW_EXPR: and - SYNCHRONIZED_EXPR:. Check thrown exceptions when completing - function call. + SYNCHRONIZED_EXPR:. Check thrown exceptions when completing + function call. (complete_function_arguments): No more RECORD_TYPE - conversion. Function parameter nodes no longer saved. + conversion. Function parameter nodes no longer saved. (valid_ref_assignconv_cast_p): Avoid handling null type. (patch_binop): Fixed null constant reference handling. (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and - BUILD_THROW macros. + BUILD_THROW macros. (patch_try_statement): Fixed comments. Record caught types in - list, push the list, expand try block and pop the list. + list, push the list, expand try block and pop the list. (patch_synchronized_statement, patch_throw_statement, - check_thrown_exceptions, check_thrown_exceptions_do, - purge_unchecked_exceptions): New functions. + check_thrown_exceptions, check_thrown_exceptions_do, + purge_unchecked_exceptions): New functions. * typeck.c (lookup_argument_method): Allow WFL in place of method - DECL_NAME during method definition check + DECL_NAME during method definition check 1998-10-09 Tom Tromey @@ -9225,53 +9230,53 @@ Fri Oct 2 17:22:52 1998 Alexandre Petit-Bianco * Makefile.in (lang.o:): Install dependency on java-tree.def. * decl.c (soft_exceptioninfo_call_node): New global variable. (init_decl_processing): Fixed indentation. soft_badarrayindex_node - takes extra integer argument. soft_exceptioninfo_call_node - initialized. + takes extra integer argument. soft_exceptioninfo_call_node + initialized. * except.c (java_set_exception_lang_code): New function (method_init_exceptions): Called here. (prepare_eh_table_type): New function. (expand_end_java_handler): Called here. * expr.c (build_java_throw_out_of_bounds_exception): Now features - one argument. Modified generation of call to - soft_badarrayindex_node to use new argument. + one argument. Modified generation of call to + soft_badarrayindex_node to use new argument. (build_java_arrayaccess): Pass faulty index value to - build_java_throw_out_of_bounds_exception. + build_java_throw_out_of_bounds_exception. (generate_name): New function. (java_lang_expand_expr): New local variables node, current, - has_finally_p. Expand TRY_EXPR node. + has_finally_p. Expand TRY_EXPR node. (process_jvm_instruction): Replace top of the stack with thrown - object reference when entering exception handler. + object reference when entering exception handler. * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java - specific tree codes. + specific tree codes. * java-tree.h (soft_exceptioninfo_call_node): Declaration of new - global. + global. (DECL_SPECIFIC_COUNT): New macro. (prepare_eh_table_type, java_set_exception_lang_code, - generate_name): New function declarations. + generate_name): New function declarations. (match_java_method): Declaration deleted. (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New - macros. + macros. * lex.c (TRY_TK, CATCH_TK): Generate location information. * parse.h (redefinition_error, refine_accessible_methods_list, - can_cast_to_p): Function declaration removed. + can_cast_to_p): Function declaration removed. (classitf_redefinition_error, variable_redefinition_error, - parse_jdk1_1_error, find_applicable_accessible_methods_list, - find_most_specific_methods_list, argument_types_convertible, - enter_a_block, valid_builtin_assignconv_identity_widening_p, - valid_cast_to_p, valid_method_invocation_conversion_p, - try_reference_assignconv, add_stmt_to_compound, - build_jump_to_finally, build_tree_list, patch_try_statement, - java_get_catch_block): New function declarations. + parse_jdk1_1_error, find_applicable_accessible_methods_list, + find_most_specific_methods_list, argument_types_convertible, + enter_a_block, valid_builtin_assignconv_identity_widening_p, + valid_cast_to_p, valid_method_invocation_conversion_p, + try_reference_assignconv, add_stmt_to_compound, + build_jump_to_finally, build_tree_list, patch_try_statement, + java_get_catch_block): New function declarations. * parse.y (string_buffer_type): Global variable deleted. (group_of_labels, catches, catch_clause, catch_clause_parameter, - finally): Rules tagged . + finally): Rules tagged . (TRY_TK, CATCH_TK): Token tagged . (class_body_declaration:, class_member_declaration:, - formal_parameter:, explicit_constructor_invocation:, - interface_member_declaration:, constant_declaration:, - primary_no_new_array:, class_instance_creation_expression:, - array_creation_expression:): Issue error on unsuported JDK1.1 - features. + formal_parameter:, explicit_constructor_invocation:, + interface_member_declaration:, constant_declaration:, + primary_no_new_array:, class_instance_creation_expression:, + array_creation_expression:): Issue error on unsuported JDK1.1 + features. (try_statement:, catches:, finally:): Define actions. (catch_clause_parameter): New rule. (catch_clause:): Use new rule catch_clause_parameter. @@ -9279,42 +9284,42 @@ Fri Oct 2 17:22:52 1998 Alexandre Petit-Bianco (redefinition_error): Renamed classitf_redefinition_error. (variable_redefinition_error): New function. (check_class_interface_creation): Call - classitf_redefinition_error. + classitf_redefinition_error. (java_complete_tree): Added error message on JDEP_TYPE: case. (complete_class_report_errors): Fixed indentation. (declare_local_variables): Call variable_redefinition_error. (source_end_java_method): Call java_set_exception_lang_code and - emit_handlers where appropriate. + emit_handlers where appropriate. (java_method_add_stmt): Call add_stmt_to_block. (add_stmt_to_block): New function. (lookup_method_invoke): Fixed outside comment. new local variable - candicates. Call find_applicable_accessible_methods_list and - find_most_specific_methods_list when searching for a - method. Modified error report to list possible candidates when - applicable. + candicates. Call find_applicable_accessible_methods_list and + find_most_specific_methods_list when searching for a + method. Modified error report to list possible candidates when + applicable. (find_applicable_accessible_methods_list, - find_most_specific_methods_list, argument_types_convertible): New - function. + find_most_specific_methods_list, argument_types_convertible): New + function. (refine_accessible_methods_list): Function deleted. (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save - expr (if applicable) before calling patch_array_ref. + expr (if applicable) before calling patch_array_ref. (build_expr_block): Fixed BLOCK_EXPR_BODY assignment. (enter_block): Fixed comment. (enter_a_block): New function. (patch_assignment): Reorganized. Call try_reference_assignconv for - references. Call valid_cast_to_p instead of can_cast_to_p. + references. Call valid_cast_to_p instead of can_cast_to_p. (try_reference_assignconv, - valid_builtin_assignconv_identity_widening_p): New functions. + valid_builtin_assignconv_identity_widening_p): New functions. (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL. (valid_cast_to_p, valid_method_invocation_conversion_p): New - functions. + functions. (build_string_concatenation): Don't resolve StringBuffer. (patch_cast): Fixed inverted arguments. (patch_array_ref): Code to save array expr deleted. Call - valid_cast_to_p instead of can_cast_to_p. + valid_cast_to_p instead of can_cast_to_p. (generate_labeled_block): Call generate_name. (build_jump_to_finally, build_try_statement, java_get_catch_block, - patch_try_statement): New functions. + patch_try_statement): New functions. * typeck.c (match_java_method): Function deleted. Fri Oct 2 13:48:36 1998 Anthony Green @@ -9359,7 +9364,7 @@ Thu Sep 24 12:20:35 1998 Per Bothner * parse.y: Add/remove promote_type calls as appropriate. * typeck.c (parse_signature_type): Returns POINTER_TYPE for objects. (parse_signature_string): Likewise. - (build_java_array_type): Fix for now signature convenions. + (build_java_array_type): Fix for now signature convenions. * lex.c (java_lex): Fix (from Alex) for JC1_LITE problem. @@ -9373,68 +9378,68 @@ Tue Sep 22 12:00:02 1998 Alexandre Petit-Bianco * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR. * java-tree.def: Fixed DEFTREECODE third argument. (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR, - CASE_EXPR, DEFAULT_EXPR): New tree codes for Java. + CASE_EXPR, DEFAULT_EXPR): New tree codes for Java. * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro. (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, - JAVA_THIS_EXPR): Now replaced by tree code definitions. + JAVA_THIS_EXPR): Now replaced by tree code definitions. (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR. * lang.c (java_tree_code_type, java_tree_code_length, - java_tree_code_name): New arrays. + java_tree_code_name): New arrays. (lang_init): Append Java tree node definitions to Gcc ones. * lex.c (expression_obstack): Declared as extern when JC1_LITE - defined. + defined. (java_init_lex): Initialize wfl_append, wfl_string_buffer, - wfl_to_string. + wfl_to_string. (java_lex): Allow declaration of empty string constants. Retain - location information on CASE_TK and DEFAULT_TK. + location information on CASE_TK and DEFAULT_TK. * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P, - JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P): - Modified to be more robust. + JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P): + Modified to be more robust. (BUILD_APPEND, BUILD_STRING_BUFFER): New macros. (build_new_invocation, try_builtin_assignconv, - patch_switch_statement, string_constant_concatenation, - build_string_concatenation, patch_string_cst, patch_string, - java_expand_switch): New function declarations. + patch_switch_statement, string_constant_concatenation, + build_string_concatenation, patch_string_cst, patch_string, + java_expand_switch): New function declarations. * parse.y: Rules related to switch and EH tagged . (label_id): Set to NULL_TREE (wfl_string_buffer, wfl_append, wfl_to_string): New static global - tree nodes. + tree nodes. (this_or_super:): Fixed indentation. (statement:, statement_nsi:, statement_without_trailing_substatement:, - statement_expression:): Removed call to RULE on all sub-rules. + statement_expression:): Removed call to RULE on all sub-rules. (switch_expression:, switch_labels:): New rules. (switch_statement:, switch_block:, switch_block_statement_groups:, - switch_block_statement_group:, switch_labels:, switch_label:): - Defined actions. + switch_block_statement_group:, switch_labels:, switch_label:): + Defined actions. (throw_statement:, synchronized_statement:, try_statement:): - Defined temporary actions. + Defined temporary actions. (class_instance_creation_expression:): Call - build_new_invocation. Fixed indentation. + build_new_invocation. Fixed indentation. (field_access): Fixed indentation. (method_invocation): Likewise. (make_qualified_primary): Use THIS_EXPR. (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When - resolving from SUPER, set *type_found. + resolving from SUPER, set *type_found. (qualify_ambiguous_name): Use NEW_CLASS_EXPR. (java_complete_tree): Removed unused local variable `location'. Case - for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR, - NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling - on MODIFY_EXPR: and all binary operator tree code cases. Removed - STRING_CST: case. default: checks for patchable strings. + for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR, + NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling + on MODIFY_EXPR: and all binary operator tree code cases. Removed + STRING_CST: case. default: checks for patchable strings. (complete_function_arguments): Transform string constant or - crafted StringBuffer if necessary. + crafted StringBuffer if necessary. (build_method_invocation): Fixed comments. (build_new_invocation): New function. (patch_assignment): Call try_builtin_assignconv to figure a valid - assignment conversion between builtin types. + assignment conversion between builtin types. (try_builtin_assignconv): New function. (build_binop): Use URSHIFT_EXPR directly to call build. (operator_string): Use UNARY_PLUS_EXPR. (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation - operator. + operator. (do_merge_string_cste, merge_string_cste, - string_constant_concatenation, build_string_concatenation, - patch_string, patch_string_cst): New function. + string_constant_concatenation, build_string_concatenation, + patch_string, patch_string_cst): New function. (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR. (patch_unaryop): Likewise. New test of valid ++/-- operands. (build_newarray_node): Use NEW_ARRAY_EXPR. @@ -9444,11 +9449,11 @@ Tue Sep 22 12:00:02 1998 Alexandre Petit-Bianco (complete_labeled_statement): Fixed related comment. (build_loop_body): Fixed comment. (build_bc_statement): Enable debug information on break/continue - statements. + statements. (patch_bc_statement): Fixed typos. Handle SWITCH statement - context. + context. (patch_switch_statement, case_identity, java_expand_switch): New - functions. + functions. Mon Sep 21 13:21:35 1998 Per Bothner @@ -9587,13 +9592,13 @@ Thu Sep 3 12:03:53 1998 Alexandre Petit-Bianco (build_debugable_stmt, complete_for_loop): New function prototypes. * parse.y: Fixed copyright assignment. (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be - size_zero_node when completing a loop with no exit condition. + size_zero_node when completing a loop with no exit condition. (for_statement_nsi:): Define action. (for_init:, for_update:): Return size_zero_node when empty. (declare_local_variables): Call build_debugable_stmt. (build_debugable_stmt): New function. (build_loop_body): Build debugable statement around loop - condition part. + condition part. (complete_loop_body): Take into account the debugable statement around the EXIT_EXPR. (complete_loop_body): New function. @@ -9613,7 +9618,7 @@ Wed Sep 2 11:53:58 1998 Tom Tromey Wed Sep 2 11:28:35 1998 Alexandre Petit-Bianco * parse-scan.y (report_main_declaration): Name of the class - containing `main' can be a qualified name. + containing `main' can be a qualified name. Mon Aug 31 13:25:58 1998 Tom Tromey @@ -9631,46 +9636,46 @@ Thu Aug 27 02:28:27 1998 Alexandre Petit-Bianco (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before. * config-lang.in (compilers): Removed gcj, gjavah from the list. * jcf-parse.c (parse_source_file): Call java_layout_classes and - check for errors even if parse_only. + check for errors even if parse_only. * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is - defined. + defined. (yylex): New function. Uses java_lex body. (java_lex): Removed commented out statement. Remove local variable - literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where - appropriate. Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE, - DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF, - SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST - if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use - SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER - where appropriate. + literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where + appropriate. Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE, + DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF, + SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST + if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use + SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER + where appropriate. (java_lex_error): Empty if JC1_LITE is defined. (java_get_line_col): Return 0 if JC1_LITE is defined. * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, - SET_MODIFIER_CTX): Moved into the section containing the macros - conditionally defined by JC1_LITE. + SET_MODIFIER_CTX): Moved into the section containing the macros + conditionally defined by JC1_LITE. (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN - argument if JC1_LITE is defined. + argument if JC1_LITE is defined. (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF, - REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE - is defined. + REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE + is defined. (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF, - FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION, - SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set - to different values according to JC1_LITE. + FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION, + SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set + to different values according to JC1_LITE. * parse.h (int_fits_type_p, stabilize_reference): Prototype not - declared if JC1_LITE set. + declared if JC1_LITE set. (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not - defined if JC1_LITE not set. + defined if JC1_LITE not set. (struct parser_ctx): Reorganized and skip the jc1 front end part - if JC1_LITE set. + if JC1_LITE set. (java_layout_classes): New function definition. (java_push_parser_context, java_init_lex, yyparse, yylex, - yyerror): Prototype always declared. All other static function - prototypes declared only if JC1_LITE is not set. + yyerror): Prototype always declared. All other static function + prototypes declared only if JC1_LITE is not set. * parse.y (yyparse, yylex, yyerror): No longer declared here. Now - declared in parse.h. + declared in parse.h. (java_layout_classes): New function. - (java_complete_expand_methods): No longer layout the class here. + (java_complete_expand_methods): No longer layout the class here. * parse-scan.y: New file. * jv-scan.c: New file. @@ -9714,9 +9719,9 @@ Thu Aug 20 14:24:47 1998 Per Bothner Wed Aug 19 17:57:07 1998 Warren Levy * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not - soft_anewarray; adjust args passed. + soft_anewarray; adjust args passed. * expr.c (build_anewarray): Adjust args for soft_anewarray_node to - match _Jv_NewObjectArray. + match _Jv_NewObjectArray. Wed Aug 19 09:33:23 1998 Alexandre Petit-Bianco @@ -9724,81 +9729,81 @@ Wed Aug 19 09:33:23 1998 Alexandre Petit-Bianco * expr.c (loopup_label): Call create_label_decl. (create_label_decl): New function. (java_lang_expand_expr): Call expand_start_bindings with argument - set to zero. + set to zero. * java-tree.h Added space after PROTO in function declarations - when necessary. + when necessary. (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros. (create_label_decl, push_labeled_block): New function - declarations. + declarations. * lex.c (label_id): Initialize. (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final - switch. + switch. * parse.h Added space after PROTO in function declarations when - necessary. + necessary. (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK, - LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY, - LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P, - PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New - macros. + LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY, + LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P, + PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New + macros. (struct parser_ctxt): New fields current_loop, - current_labeled_block. + current_labeled_block. (build_if_else_statement, patch_if_else_statement, - add_stmt_to_compound, patch_exit_expr, build_labeled_block, - generate_labeled_block, complete_labeled_statement, - build_bc_statement, patch_bc_statement, patch_loop_statement, - build_new_loop, build_loop_body, complete_loop_body): New function - declarations. + add_stmt_to_compound, patch_exit_expr, build_labeled_block, + generate_labeled_block, complete_labeled_statement, + build_bc_statement, patch_bc_statement, patch_loop_statement, + build_new_loop, build_loop_body, complete_loop_body): New function + declarations. * parse.y (java_warning_count): New global variable. (label_id): New static variable. (BREAK_TK, CONTINUE_TK): Token tagged . (block:): Return size_zero_node when block is empty. (empty_statement:): Return size_zero_node. (statement:): Implement supplemental action when for_statement: is - reduced. + reduced. (label_decl:): New rule. (labeled_statement:): Rewritten using label_decl. Actions - implemented. + implemented. (labeled_statement_nsi:): Likewise. (if_then_statement): Actions implemented. (while_expression): New rule. (while_statement:): Rewritten using while_expression. Actions - implemented. + implemented. (while_statement_nsi:): Likewise. (do_statement_begin:): New rule. (do_statement:): Rewritten using do_statement_begin. Actions - implemented. + implemented. (for_statement:): Rewritten using for_begin. Actions implemented. (for_statement_nsi:): Likewise. (for_header:, for_begin:): New rules. (for_init:): Actions implemented. (statement_expression_list:, break_statement:, - continue_statement:): Likewise. + continue_statement:): Likewise. (yyerror): Count number of issued warning(s). (java_report_errors): Report error(s) and/or warning(s). (java_complete_class): Use build_java_argument_signature to - recompute completed method signature. + recompute completed method signature. (java_check_regular_methods): New locals method_wfl and aflags. - Use method_wfl instead of lookup_cl during error reports. Fixed - indentation and modified some error messages. Use - lang_printable_name in method instead of the DECL_NAME. New code - to issue warnings on methods not overriding corresponding methods - private to a different package. + Use method_wfl instead of lookup_cl during error reports. Fixed + indentation and modified some error messages. Use + lang_printable_name in method instead of the DECL_NAME. New code + to issue warnings on methods not overriding corresponding methods + private to a different package. (java_method_add_stmt): Call add_stmt_to_compound. (add_stmt_to_compound): New function. (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR, - LOOP_EXPR, EXIT_EXPR and COND_EXPR. + LOOP_EXPR, EXIT_EXPR and COND_EXPR. (build_if_else_statement, patch_if_else_statement, - build_labeled_block, generate_labeled_block, - complete_labeled_statement, build_new_loop, build_loop_body, - complete_loop_body, patch_loop_statement, build_bc_statement, - patch_bc_statement, patch_exit_expr): New functions. + build_labeled_block, generate_labeled_block, + complete_labeled_statement, build_new_loop, build_loop_body, + complete_loop_body, patch_loop_statement, build_bc_statement, + patch_bc_statement, patch_exit_expr): New functions. * typeck.c (build_java_signature): Build argument signature before - enclosing it in between parenthesis. + enclosing it in between parenthesis. Mon Aug 17 17:44:24 1998 Warren Levy * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in - (JAVA_OBJS): Added reminder comment + (JAVA_OBJS): Added reminder comment Thu Aug 13 10:01:45 1998 Nick Clifton @@ -9808,11 +9813,11 @@ Thu Aug 13 10:01:45 1998 Nick Clifton Thu Aug 13 14:34:07 1998 Warren Levy * decl.c (init_decl_processing): Use _Jv_InitClass, not - soft_initialise_class. Use _Jv_NewMultiArray, not - soft_multianewarray. Use _Jv_ThrowBadArrayIndex, not - soft_badarrayindex. Use _Jv_CheckCast, not soft_checkcast. Use - _Jv_CheckArrayStore, not soft_checkarraystore. Use - _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod. + soft_initialise_class. Use _Jv_NewMultiArray, not + soft_multianewarray. Use _Jv_ThrowBadArrayIndex, not + soft_badarrayindex. Use _Jv_CheckCast, not soft_checkcast. Use + _Jv_CheckArrayStore, not soft_checkarraystore. Use + _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod. Wed Aug 12 14:23:13 1998 Per Bothner @@ -9872,45 +9877,45 @@ Wed Jul 29 13:19:03 1998 Alexandre Petit-Bianco * lex.c (java_init_lex): Initialize ctxp->package. * parse.h (struct parser_ctxt): package and package_len replaced - by tree package, an identifier node. Field method_decl_list is - gone. Fixed comments. + by tree package, an identifier node. Field method_decl_list is + gone. Fixed comments. (lookup_field_wrapper, merge_qualified_name, not_accessible, - class_in_current_package): New function prototypes. + class_in_current_package): New function prototypes. * parse.y (array_type:): Set class loaded flag on primitive type - arrays. + arrays. (package_declaration:): Assign ctxp->package to the - identifier node. + identifier node. (method_invocation:): Handle invocation of method qualified by - `super'. + `super'. (single_type_import_declaration:): Removed ambiguity check. (java_pop_parser_context): New local variable `next'. Reset and - set IMPORT_CLASSFILE_NAME flags on current and previous import - list. + set IMPORT_CLASSFILE_NAME flags on current and previous import + list. (java_accstring_lookup): Use new local macro COPY_RETURN. (lookup_field_wrapper): New function. (parser_qualified_classname): Use merge_qualified_name. (parser_check_super_interface): Broaden error message. (do_resolve_class): Check for qualified class name in the current - compilation unit if appropriate. + compilation unit if appropriate. (process_imports): Check for already defined classes. (check_pkg_class_access): Got rid of call to - get_access_flags_from_decl. + get_access_flags_from_decl. (java_complete_expand_methods): Call safe_layout_class based on - the current class size. + the current class size. (make_qualified_primary): Build a WFL qualification on primary if - none exists. + none exists. (merge_qualified_name): New function. (make_qualified_name): Use merge_qualified_name. (resolve_expression_name): Use safe_lookup_field. (resolve_field_access): Got rid of call to get_access_flags_from_decl. (resolve_qualified_expression_name): Likewise. Check on resolved - element accessibility. + element accessibility. (not_accessible_p, class_in_current_package): New functions. (maybe_access_field): Got rid of call to get_access_flags_from_decl. (patch_method_invocation_stmt): Merged common pieces. Check - accessibility of invoked method. + accessibility of invoked method. (check_for_static_method_reference): Add returned type in error - message. + message. (invocation_mode): Get rid of bogus check on PRIVATE methods. (refine_accessible_methods_list): Merged two conditions in test. (java_complete_class): Sanity check on stabilize_ref gone. @@ -9989,7 +9994,7 @@ Thu Jul 23 15:28:24 1998 Per Bothner Wed Jul 22 15:47:30 1998 Per Bothner * jcf-write.c: Write out LineNumberTable attribute in .class file. - (linenumber_buffer, linenumber_ptr, linenumber_limit): New statics. + (linenumber_buffer, linenumber_ptr, linenumber_limit): New statics. (put_linenumber): New function. (generate_bytecode_insns, generate_classfile): Write line numbers. @@ -9997,86 +10002,86 @@ Wed Jul 22 14:39:00 1998 Alexandre Petit-Bianco * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P. (lookup_name, build_known_method_ref, build_class_init, - build_invokevirtual, invoke_build_dtable, match_java_method, - build_field_ref, pushdecl_force_head, build_java_binop, - binary_numeric_promotion, build_decl_no_layout, - build_java_arrayaccess, build_newarray, build_anewarray, - build_java_array_length_access, build_java_arraynull_check): New - extern function prototypes. + build_invokevirtual, invoke_build_dtable, match_java_method, + build_field_ref, pushdecl_force_head, build_java_binop, + binary_numeric_promotion, build_decl_no_layout, + build_java_arrayaccess, build_newarray, build_anewarray, + build_java_array_length_access, build_java_arraynull_check): New + extern function prototypes. (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, - JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in - java-tree.h. + JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in + java-tree.h. * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref to NULL * jcf.h (jcf_out_of_synch): New extern function prototype. * parse.h: Static/global function implemented in parse.y - prototyped and declarations moved at the end of the file. + prototyped and declarations moved at the end of the file. (DECL_P): Check that the argument isn't null. (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, - JAVA_THIS_EXPR): No longer defined here. See java-tree.h + JAVA_THIS_EXPR): No longer defined here. See java-tree.h (QUAL_DECL_TYPE): New macro. (PARAMS): Macro definition removed. * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS. (return_statement:): Call build_return. (field_access:): Call make_qualified_primary in sub rule. (method_invocation:): Build method invocation and call - make_qualified_primary when processing primaries. + make_qualified_primary when processing primaries. (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling - get_type_from_signature. + get_type_from_signature. (java_check_regular_method): Extra integer 0 argument when calling - lookup_java_method2. + lookup_java_method2. (lookup_java_interface_method2): Extra method DECL argument when - calling lookup_java_interface_method2. + calling lookup_java_interface_method2. (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created - COMPOUND_EXPR node. + COMPOUND_EXPR node. (java_complete_expand_method): Layout current class iff not - already done. Don't process interface's methods. + already done. Don't process interface's methods. (java_complete_expand_method): Use super class only if it - exists. Use current class otherwise. + exists. Use current class otherwise. (make_qualified_primary): New function. (resolve_expression_name): Process qualified expression or - expression from primary the same way. + expression from primary the same way. (resolve_expression_name): Two last arguments to - resolve_field_access are now NULL_TREEs. + resolve_field_access are now NULL_TREEs. (resolve_field_access): New variable is_static. Local field must - be DECLs. is_static computed on field DECLs only. Append code in - where_found to the field access if necessary. Use QUAL_DECL_TYPE - to initialize field_type. + be DECLs. is_static computed on field DECLs only. Append code in + where_found to the field access if necessary. Use QUAL_DECL_TYPE + to initialize field_type. (resolve_qualified_expression_name): New local variable, - previous_call_static and is_static. Handle primaries with function - calls, casts, array references and `this'. `super' now handled as - `(super_class)this'. Use is_static to clarify boolean expressions. - Added code to handle case where a proper handle is required to - access a field. Use QUAL_DECL_TYPE where applicable. + previous_call_static and is_static. Handle primaries with function + calls, casts, array references and `this'. `super' now handled as + `(super_class)this'. Use is_static to clarify boolean expressions. + Added code to handle case where a proper handle is required to + access a field. Use QUAL_DECL_TYPE where applicable. (maybe_access_field): New function. (patch_method_invocation_stmt): New arguments primary, where, - is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P - deleted. Use `where' as a type to search from if specified. Check - for static method reference where forbidden. Append primary or - current_this to the argument list if not calling constructor nor - static methods. + is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P + deleted. Use `where' as a type to search from if specified. Check + for static method reference where forbidden. Append primary or + current_this to the argument list if not calling constructor nor + static methods. (check_for_static_method_reference): New function. (patch_invoke): Layout the class on which new is done if - necessary. + necessary. (lookup_method_invoke): Changed format to report errors on - methods. + methods. (qualify_ambiguous_name): New local variable this_found. Now - handle things from primaries. Method call are considered - expression names. + handle things from primaries. Method call are considered + expression names. (identical_subpath_p): NULL_TREE arguments to breakdown_qualified - changed into NULLs. + changed into NULLs. (not_initialized_as_it_should_p): Comply with the new DECL_P. (java_complete_tree): New case fo RETURN_EXPR. Process function - call arguments in separate function. + call arguments in separate function. (complete_function_arguments): New function. (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P - anymore. + anymore. (patch_assignment): Take the return function slot into account as - a RHS. Distinguish assignment from a return. + a RHS. Distinguish assignment from a return. (valid_ref_assignconv_cast_p): Use build_java_argument_signature - when checking methods in interfaces. + when checking methods in interfaces. (resolve_type_during_patch): NULL argument to unresolve_type_p - instead of NULL_TREE. + instead of NULL_TREE. (patch_newarray): Fixed typo in comment. (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL. (build_return, patch_return): New functions. @@ -10091,10 +10096,10 @@ Tue Jul 21 12:10:04 1998 Per Bothner (expand_invoke): Rename call to build_invoke_non_interface. * java-tree.h, parse.h: Update prototype. * parse.y, decl.c, jcf-parse.c: Suppress calls to back-end functions - (such as expand_expr_stmt) if flag_emit_class_files. + (such as expand_expr_stmt) if flag_emit_class_files. * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP, STACK_TARGET, IGNORE_TARGET): New macros. - (code_buffer, code_ptr, code_limit, code_S, code_SP_max): New globals. + (code_buffer, code_ptr, code_limit, code_S, code_SP_max): New globals. (generate_bytecode_insn): New function to generate method's bytecode. (generate_classfile): Node generate Code attribute for a method. (code_buffer_grow, push_constant1, push_constant2, push_int_const, @@ -10119,120 +10124,120 @@ Fri Jul 17 09:48:51 1998 Tom Tromey Thu Jul 16 15:29:20 1998 Alexandre Petit-Bianco * class.c (layout_class): Call to java_layout_parsed_class replace - by safe_layout_class. + by safe_layout_class. * expr.c (build_java_array_length_access): Removed static storage - class in the function definition. + class in the function definition. (build_java_arraynull_check): Likewise. Also fixed typos in two comments. * lex.c (java_init_lex): Initialize static global kw_length. (java_lex): Use BUILD_OPERATOR on RETURN_TK. * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to - java_lex_error. + java_lex_error. (JAVA_INTEGRAL_RANGE_ERROR): Likewise. * parse.h (resolve_no_layout): New static function declaration. (get_identifier_in_static): Declaration removed. (java_layout_parsed_class): Function name declaration changed to - safe_layout_class. + safe_layout_class. (build_newarray_node, patch_newarray, resolve_type_during_patch, - not_initialized_as_it_should_p, build_this): New static function - declarations. + not_initialized_as_it_should_p, build_this): New static function + declarations. (pushdecl_force_head, build_java_binop, int_fits_type_p, - binary_numeric_promotion, stabilize_reference, - build_decl_no_layout, build_java_arrayaccess): Extern function - declarations moved into their own section. + binary_numeric_promotion, stabilize_reference, + build_decl_no_layout, build_java_arrayaccess): Extern function + declarations moved into their own section. (build_newarray, build_anewarray, build_java_array_length_access, - build_java_arraynull_check): New extern function declarations. + build_java_arraynull_check): New extern function declarations. (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR. (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New - fake tree codes. + fake tree codes. (CALL_CONSTRUCTOR_P): New macro. * parse.y (kw_length): New static global tree node. (return_statement): Tagged . (RETURN_TK): Tagged . (variable_declarator_id:): Build variable declaration with an - empty initialization value if a syntax error was found in the - initialization part of the variable declaration. + empty initialization value if a syntax error was found in the + initialization part of the variable declaration. (statement_without_trailing_substatement:): return_statement: now - uses the default rule. + uses the default rule. (return_statement:): Temporarily fixed to return NULL_TREE. (primary_no_new_array:): Call build_this when THIS_TK was parsed. (class_instance_creation_expression:): Class creation rules now - call build_method_invocation upon reduction. + call build_method_invocation upon reduction. (array_creation_expression:): Rules call build_newarray_node upon - reduction. + reduction. (dim_exprs:): Build a list of dimension expressions. (dim_expr:): Store location of the OSB_TK in the dimension - expression node. + expression node. (method_invocation:): Added a new error rule. (build_unresolved_array_type): WFL argument may also be an array - on a primitive type. Name of the argument changed to reflect this. + on a primitive type. Name of the argument changed to reflect this. (method_declarator): Insert argument type at the beginning of the - argument type list and later reverse the list. + argument type list and later reverse the list. (unresolved_type_p): Argument 'returned' may be optionally - NULL_TREE. + NULL_TREE. (java_layout_class_from_source): Function renamed - safe_layout_class. + safe_layout_class. (resolve_and_layout): Now call resolve_no_layout and - safe_layout_class. + safe_layout_class. (resolve_no_layout): New function. (purify_type_name): New function. (complete_class_report_errors): Call purify_type_name during error - report on a type not found. + report on a type not found. (process_imports): error_found local variable doesn't need to be - initialized to zero. + initialized to zero. (declare_local_variables): New local type_wfl. Fixed typo in error - message. type_wfl assigned to unresolved type and used to register - incomplete type. Build a WFL around the variable initialization - statement so that debug info can be generated on it. + message. type_wfl assigned to unresolved type and used to register + incomplete type. Build a WFL around the variable initialization + statement so that debug info can be generated on it. (source_start_java_method): Reverse argument list after they've - been processed. + been processed. (current_this): New static global variable. (java_complete_expand_methods): Set current_this when appropriate. (resolve_expression_name): Build correct static and non static - field access bearing a simple name. + field access bearing a simple name. (resolve_field_access): Resolve the length field of arrays. Handle - f.m() cases. + f.m() cases. (patch_method_invocation_stmt): Set the type of the method - invocation to error_mark_node. This value is later overridden by a - valid type, if any. Don't handle qualified constructor invocation - as qualified method invocation. Call lookup_method_invoke with its - new flag. It's no longer necessary to access the selected method - as the value of a tree list. Handle constructor invocation. + invocation to error_mark_node. This value is later overridden by a + valid type, if any. Don't handle qualified constructor invocation + as qualified method invocation. Call lookup_method_invoke with its + new flag. It's no longer necessary to access the selected method + as the value of a tree list. Handle constructor invocation. (patch_invoke): Reverse argument list when invoking non interface - methods. Insert call to new as the first argument of the - constructor. + methods. Insert call to new as the first argument of the + constructor. (invocation_mode): Return a INVOKE_STATIC is the invoked method is - defined within a final class. Return INVOKE_STATIC if the invoked - method is a constructor. + defined within a final class. Return INVOKE_STATIC if the invoked + method is a constructor. (lookup_method_invoke): New lc argument is a flag to indicate a - constructor lookup. Now handle constructor lookup. Choose the most - specific method in case several were matching the invocation - requirements. Return a method decl instead of a tree list featuring - one single method decl element. + constructor lookup. Now handle constructor lookup. Choose the most + specific method in case several were matching the invocation + requirements. Return a method decl instead of a tree list featuring + one single method decl element. (refine_accessible_methods_list): New lc flag argument to - indicate that a constructor is being looked up. + indicate that a constructor is being looked up. (not_initialized_as_it_should_p): New function. (java_complete_tree): Now process fake tree codes - JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call - save_expr on resolved function call arguments. Case on - UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR. + JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call + save_expr on resolved function call arguments. Case on + UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR. (patch_assignment): LHS can be a field access expression. When - dealing with reference, lhs_type is the promoted type of the - rhs_type, not the RHS. Use not_initialized_as_it_should_p where - applicable. + dealing with reference, lhs_type is the promoted type of the + rhs_type, not the RHS. Use not_initialized_as_it_should_p where + applicable. (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR. (patch_binop): Use not_initialized_as_it_should_p where - applicable. + applicable. (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR. (patch_unaryop): Likewise. And use not_initialized_as_it_should_p - where applicable. + where applicable. (resolve_type_during_patch): New function. (patch_cast): Call resolve_type_during_patch to resolve type and - report error accordingly. + report error accordingly. (patch_array_ref): Use not_initialized_as_it_should_p where - applicable. Array base expression is saved before being - used. Promote the type of an array elements if it contains non - builtin types. + applicable. Array base expression is saved before being + used. Promote the type of an array elements if it contains non + builtin types. (build_newarray_node, patch_newarray, build_this): New functions. Thu Jul 16 10:46:47 1998 Tom Tromey @@ -10305,19 +10310,19 @@ Wed Jul 8 03:01:32 1998 Jeffrey A Law (law@cygnus.com) Tue Jul 7 12:56:48 1998 Alexandre Petit-Bianco * lex.c (java_lex): Return 0 when we see an invalid character in - the input. + the input. * lex.c (java_read_char): Specify extra argument when calling - java_lex_error. + java_lex_error. (java_read_unicode, java_parse_end_comment, - java_parse_escape_sequence): Likewise, + java_parse_escape_sequence): Likewise, (java_lex): Specify extra argument when calling - java_lex_error. Test that IDs are beginning with a legal character - for IDs. Handle invalid characters with an error message and a - call to java_lex_error. + java_lex_error. Test that IDs are beginning with a legal character + for IDs. Handle invalid characters with an error message and a + call to java_lex_error. (java_lex_error): Adjust column position by new argument - `forward'. Issue an error even if in the middle of reporting an - other error. + `forward'. Issue an error even if in the middle of reporting an + other error. 1998-07-07 Brendan Kehoe @@ -10352,135 +10357,135 @@ Tue Jul 7 09:38:38 1998 Tom Tromey Thu Jul 2 16:53:16 1998 Alexandre Petit-Bianco * Makefile.in (JAVABISONFLAGS): Specific flag for bison when - processing the jc1 grammar file. Prefix bison functions and - variables with java_. + processing the jc1 grammar file. Prefix bison functions and + variables with java_. (parse.c): Dependencies on parse.h and lex.h * expr.c (build_java_arrayaccess): Function now global. * java-tree.h: Comment reorganized to carry on previous - classification effort. + classification effort. (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P, - RESOLVE_TYPE_NAME_P): New flags on WFLs. + RESOLVE_TYPE_NAME_P): New flags on WFLs. * jcf-parse.c (parse_source_file): java_parse_source_file renamed - java_parse (new prefix java_ generated by bison). + java_parse (new prefix java_ generated by bison). (java_layout_parsed_class, java_register_parsed_class): Function - call removed. + call removed. (yyparse): Removed unnecessary call to init_outgoing_cpool. * lex.c (static tree wfl_op): Variable deleted. (java_init_lex): Initialize kw_super and kw_this. Initialize more - ctxp fields to NULL_TREE. + ctxp fields to NULL_TREE. (java_lex): No longer create WFL for operators. Filename caching - mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings - created as STRING_CST and later expanded. Removed extra argument - to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS - and SUPER. + mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings + created as STRING_CST and later expanded. Removed extra argument + to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS + and SUPER. (build_wfl_node): Removed code in comments. * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but - store token and location data in the current bison token. + store token and location data in the current bison token. * parse.h: Removed pre-processor based symbol prefixes hack. Moved - static/extern function declaration at the beginning of the file. + static/extern function declaration at the beginning of the file. (struct qualification): Data structure definition deleted. (RESOLVE_CHAIN_REMAINDER): Macro definition deleted. (qualify_ambiguous_name): Function declaration modified. Function - now returns nothing. + now returns nothing. (build_array_ref, patch_array_ref, make_qualified_name, - resolve_qualified_expression_name, maybe_generate_clinit, - resolve_field_access): New static function declarations. + resolve_qualified_expression_name, maybe_generate_clinit, + resolve_field_access): New static function declarations. (build_java_arrayaccess): New extern function declaration. (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted. (CALL_EXPR_PRIMARY): Macro deleted. (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros. (struct parser_ctxt): Field initialized_final - removed. non_static_initialized, static_initialized: New fields. + removed. non_static_initialized, static_initialized: New fields. * parse.y (static tree kw_super, static tree kw_this): New global - static. + static. (%union): tree wfl field of operator member replaced by int - location. WFLs are non longer created for operators. + location. WFLs are non longer created for operators. (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged . (qualified_name:): Now calls make_qualified_name to build the - identifier. + identifier. (type_declaration:): Consider generating when class - parsing completed. + parsing completed. (variable_declarator:): Directly build an assignment node when the - variable is initialized when declared. + variable is initialized when declared. (this_or_super:): Build a WFL and set current location when THIS - or SUPER are parsed. + or SUPER are parsed. (expression_statement:): Wrap statement around a WFL. (primary_no_new_array:): Fixed typo. Changed value returned by - THIS_TK because of its new type (temporary). + THIS_TK because of its new type (temporary). (dim_exprs:): Temporary fix because of OSB_TK's new type. (field_access:): Build qualified name with SUPER. (method_invocation:): Fixed returned value because of SUPER's new - type. + type. (array_access:): Use OSB_TK location information. (post_increment_expression:, post_decrement_expression:, - unary_expression:, pre_increment_expression:, - pre_decrement_expression:, unary_expression_not_plus_minus:, - cast_expression:, multiplicative_expression:, - additive_expression:, shift_expression:, relational_expression:, - equality_expression:, and_expression:, exclusive_or_expression:, - inclusive_or_expression:, conditional_and_expression:, - conditional_or_expression:, assignment:): Use new location/token - information available on operators. + unary_expression:, pre_increment_expression:, + pre_decrement_expression:, unary_expression_not_plus_minus:, + cast_expression:, multiplicative_expression:, + additive_expression:, shift_expression:, relational_expression:, + equality_expression:, and_expression:, exclusive_or_expression:, + inclusive_or_expression:, conditional_and_expression:, + conditional_or_expression:, assignment:): Use new location/token + information available on operators. (create_class): Set super_decl_type to NULL_TREE when processing - java.lang.Object. + java.lang.Object. (register_fields): Field initialization is now a MODIFY_EXPR - node. Chain initialization code to the matching lists (according - the the field declaration modifiers). + node. Chain initialization code to the matching lists (according + the the field declaration modifiers). (maybe_generate_clinit): New function. (method_header): Don't set method's DECL_NAME to a WFL when adding - methods to java.lang.Object. + methods to java.lang.Object. (resolve_and_layout): Now can return NULL_TREE if the type - resolution fails. Otherwise, return the class DECL instead of its - TYPE. + resolution fails. Otherwise, return the class DECL instead of its + TYPE. (check_method_redefinition): Don't patch method DECL_NAME if it - belongs to java.lang.Object. + belongs to java.lang.Object. (process_imports): Simply assign error_found to the value returned - by check_pkg_class_access. + by check_pkg_class_access. (declare_local_variables): Don't use their init statements (if - any) when parsing error were previously found. Reuse MODIFY_EXPR - build during parsing as an init statement. + any) when parsing error were previously found. Reuse MODIFY_EXPR + build during parsing as an init statement. (java_method_add_stmt): Now return the current method body. (java_layout_parsed_class, java_register_parsed_class): Functions - removed. + removed. (java_complete_expand_methods): Initialize the constant pool on a - per class basis. Layout the classes before expanding their method - bodies. Don't try expand artificial constructor code if error were - found. Make the classes data and register them if no error were - found. + per class basis. Layout the classes before expanding their method + bodies. Don't try expand artificial constructor code if error were + found. Make the classes data and register them if no error were + found. (java_complete_expand_method): Retrieve an artificial constructor - argument list before entering its body. Assign the top block to - the artificial constructor function body and set types of declared - blocks and compound statements to void. Walk method body if not an - artificial constructor. + argument list before entering its body. Assign the top block to + the artificial constructor function body and set types of declared + blocks and compound statements to void. Walk method body if not an + artificial constructor. (make_qualified_name, cut_identifier_in_qualified): New functions. (resolve_expression_name): Fixed comments. Save/restore the - current class CLASS_LOADED_P flag value. Build non qualified - static field access and handle qualified expression names. + current class CLASS_LOADED_P flag value. Build non qualified + static field access and handle qualified expression names. (resolve_field_access, resolve_qualified_expression_name): New - functions. + functions. (patch_method_invocation_stmt): Use the new expression resolution - scheme, calling resolve_field_access when the function call is - resolved as an expression. + scheme, calling resolve_field_access when the function call is + resolved as an expression. (qualify_ambiguous_name): Function rewritten to work on qualified - expression produced by make_qualified_name. + expression produced by make_qualified_name. (java_complete_tree): Promote type when function's argument are - RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch - the assignment to discover further errors if RHS is a expression - name that fails to evaluate. Declare LHS initialized even though - the assignment failed. Don't use the location variable and removed - extra argument in patch function calls. Now handle the ARRAY_REF - case and build internal string representation when STRING_CSTs are - walked. + RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch + the assignment to discover further errors if RHS is a expression + name that fails to evaluate. Declare LHS initialized even though + the assignment failed. Don't use the location variable and removed + extra argument in patch function calls. Now handle the ARRAY_REF + case and build internal string representation when STRING_CSTs are + walked. (build_method_invocation): Don't wrap function call around a WFL. (build_assignment): Likewise. Use the operator location - information. + information. (patch_assignment): Handle array access LHSs. Handle error - provenance, resulting in a better error report. + provenance, resulting in a better error report. (build_binop): Use op_location from operator as binop location - information. + information. (build_unaryop, build_incdec, build_cast): Likewise. (patch_binop): Extract location information from the node. Fixed - typo in error message. + typo in error message. (patch_unary_op): Extract location information from the node. (build_array_ref, patch_array_ref): New functions. @@ -10499,7 +10504,7 @@ Tue Jun 30 14:12:54 1998 Tom Tromey Mon Jun 29 14:47:10 1998 Per Bothner * java-tree.h (load_class): Add prototype. - * class.c (is_compiled_class): Add missing arg to load_class. + * class.c (is_compiled_class): Add missing arg to load_class. * expr.c (expand_java_NEW): Call load_class. * parse.y (process_import): Removed bogus use of void return value. @@ -10575,10 +10580,10 @@ Fri Jun 12 11:31:24 1998 Per Bothner find_utf8_constant, find_class_or_string_constant): New functions. * jcf-parse.c (load_class): Don't save/restore tree-constant_pool. - (get_constant): Use current_jcf.cpool instead of tree_constant_pool. + (get_constant): Use current_jcf.cpool instead of tree_constant_pool. (give_name_to_class, get_class_constant): Likewise. * jcf-parse.c, java-tree.h (tree_constant_pool): Removed. - (get_name_and_type_constant, get_ref_constant): Removed. + (get_name_and_type_constant, get_ref_constant): Removed. * parse.h (parser_ctxt): Remove field tree_constant_pool. * parse.y: Don't save/restore tree_constant_pool. * verify.c (verify_jvm_instructions): Update for new approach. @@ -10596,9 +10601,9 @@ Fri Jun 12 11:31:24 1998 Per Bothner Wed Jun 10 17:34:42 1998 Alexandre Petit-Bianco * parse.h: New comment on the handling of unresolved type - identifiers. JDEPs are now part of the jdep_code enum. + identifiers. JDEPs are now part of the jdep_code enum. (typedef struct jdep): Now use enum jdep_code or int, depending on - availability. Both are narrowed down to an 8 bits bitfield. + availability. Both are narrowed down to an 8 bits bitfield. (CALL_EXPR_PRIMARY): Fixed comment. Wed Jun 10 10:54:39 1998 Tom Tromey @@ -10625,73 +10630,73 @@ Tue Jun 9 18:12:46 1998 Alexandre Petit-Bianco * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard. * decl.c (build_decl_no_layout): New function. * expr.c (java_lang_expand_expr): Layout declarations found in - blocks before they're pushed. + blocks before they're pushed. * jcf-parse.c (load_class): Save current line when parsing class - file. + file. (parse_source_file): Register class before expanding their - methods. + methods. * lang.c (put_decl_node): Produce `null' when `void *' is - processed. + processed. * lex.c (static tree wfl_op): New static global, for error report - on casts. + on casts. (java_init_lex): wfl_operator and wfl_op initialized - here. Filename caching added for wfl_op. Return wfl_op when `(' is - parsed. + here. Filename caching added for wfl_op. Return wfl_op when `(' is + parsed. * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast, - patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p, - build_unresolved_array_type): New static function definitions. + patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p, + build_unresolved_array_type): New static function definitions. (build_decl_no_layout): New extern function declared. (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the - faulty modifier exists. + faulty modifier exists. (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros. (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned. (UNARY_PLUS_EXPR): New fake operator. (struct parser_ctxt): New field osb_number. * parse.y (static tree wfl_operator): New static WFL for operator - bound error messages. + bound error messages. (DECR_TK, INCR_TK): Moved. (OP_TK): Tagged . (array_type:): Now call build_unresolved_array_type. (dim_expr:): Count the number of '[' seen. (post_increment_expression, post_decrement_expression, - pre_increment_expression, pre_decrement_expression, - unary_expression_not_plus_minus, unary_expression:): Actions are - now building the corresponding unary expressions. + pre_increment_expression, pre_decrement_expression, + unary_expression_not_plus_minus, unary_expression:): Actions are + now building the corresponding unary expressions. (cast_expression:): Actions are now building cast expressions. (build_unresolved_array_type): New function. (create_interface): Reset the number of declared interfaces. (create_class): Likewise. (method_header): Methods declared within the scope of an interface - are now implicitly set public and abstract. + are now implicitly set public and abstract. (java_complete_class): Variable's and parameter's type are patched - with a promoted type. + with a promoted type. (declare_local_variables): Resolved non builtin types are promoted - before being used to build a variable decl. Removed type patch - posted on variable initialization statement. + before being used to build a variable decl. Removed type patch + posted on variable initialization statement. (source_start_java_method): Use build_decl_no_layout to build the - decl of a parameter of incomplete type. + decl of a parameter of incomplete type. (java_register_parsed_class): Process interfaces too. Call - rest_of_decl_compilation on each processed class declarations. + rest_of_decl_compilation on each processed class declarations. (java_complete_expand_methods): Don't attempt to expand things in - interfaces. + interfaces. (java_complete_tree): Process CONVERT_EXPR, even though it always - has a type. Propagate error_mark_node to node's type too. Promote - method's call argument type and return error_mark_node if - argument's completion didn't work. MODIFY_EXPR can have a WFL as a - RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now - handle unary operator nodes. + has a type. Propagate error_mark_node to node's type too. Promote + method's call argument type and return error_mark_node if + argument's completion didn't work. MODIFY_EXPR can have a WFL as a + RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now + handle unary operator nodes. (build_assignment): Added comment. (print_int_node): New function. (patch_assignment): New second argument. New error handling. Use - print_int_node. Handle references. Use can_cast_to_p to issue - different error message according to the context and check upon - the initialization of the RHS. + print_int_node. Handle references. Use can_cast_to_p to issue + different error message according to the context and check upon + the initialization of the RHS. (can_cast_to_p, valid_ref_assignconv_cast_p): New functions. (operator_string): Handle more operators. (patch_binop): No longer use a function static - wfl_operator. Improved error message on shift distance. + wfl_operator. Improved error message on shift distance. (build_unaryop, build_incdec, build_cast, patch_unaryop, - patch_cast): New functions. + patch_cast): New functions. Fri Jun 5 18:03:07 1998 Per Bothner @@ -10723,33 +10728,33 @@ Tue Jun 2 15:19:19 1998 Per Bothner Mon Jun 1 09:58:36 1998 Alexandre Petit-Bianco * expr.c (truthvalue_conversion): Convert integer and floating - point value to their truth value. + point value to their truth value. * lex.c (java_lex): Handle the `null' literal. * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros. (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC, - ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED): - New macros. + ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED): + New macros. * parse.y: Reorganization/documentation on token declaration. (binop_lookup[]): New added new tree codes. (relational_expression): Build corresponding binary operators. (equality_expression, conditional_and_expression, - conditional_or_expression): Likewise. + conditional_or_expression): Likewise. (java_complete_class): Fix crash in debug message. (java_complete_tree): Check initialization of method call - arguments. Further bogus node evaluation to detect more error - during assignments. Handles more binary operators. + arguments. Further bogus node evaluation to detect more error + during assignments. Handles more binary operators. (patch_assignment): Use DECL_P. (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree - code. + code. (operator_string): Handle more case. Compacted source. (patch_binop): Changed function comment. Checking for - uninitialized first operand takes the compound assignment into - account and uses DECL_P. Checking for uninitialized second operand - delayed to routine's end. Use macros to issue type bound error - messages and issue messages on both operands if their types are - different. Force fixed type into node. Handle all binary - operators. + uninitialized first operand takes the compound assignment into + account and uses DECL_P. Checking for uninitialized second operand + delayed to routine's end. Use macros to issue type bound error + messages and issue messages on both operands if their types are + different. Force fixed type into node. Handle all binary + operators. Wed May 27 10:30:31 1998 Alexandre Petit-Bianco @@ -10759,54 +10764,54 @@ Wed May 27 10:30:31 1998 Alexandre Petit-Bianco * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros. * parse.h (java_complete_tree): Changed returned type in prototype. (build_method_invocation, build_assignment, patch_assignment, - patch_binop): New static function declarations. + patch_binop): New static function declarations. (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P, - BUILD_EXPR_WFL): New macros. + BUILD_EXPR_WFL): New macros. * parse.y (enum tree_code binop_lookup[]): New static for token to - TREE_CODE lookup. + TREE_CODE lookup. (%union): Parser union has new sub-structure `operator'. (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK, PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK, ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK, ASSIGN_ANY_TK): Tokens tagged `operator'. (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK, - AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK, - MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK, - REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'. + AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK, + MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK, + REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'. (assignment_operator:): Rule tagged `operator'. (expression_statement:): Re-installed default rule. (method_invocation:): Sub rules call build_method_invocation. (postfix_expression:): Don't attempt to resolve name here. Just - return an ID. + return an ID. (multiplicative_expression:): Sub-rules build corresponding binop - expression node. + expression node. (additive_expression:, shift_expression:, and_expression:, - exclusive_or_expression:, inclusive_or_expression:): Likewise. + exclusive_or_expression:, inclusive_or_expression:): Likewise. (assignment:): Sub rule invoke build_assignment. (assignment_operator:): Default rules on sub rules. (force_error): Added documentation on this variable. (declare_local_variables): Build initialization calling build_assignment. (expand_start_java_method): Removed unused rtx declaration. Mark - arguments as already initialized. + arguments as already initialized. (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL. (java_complete_expand_methods): Don't process next method if - completion of the previous one triggered errors. + completion of the previous one triggered errors. (java_complete_expand_method): Call source_end_java_method if no - error were found during completion. + error were found during completion. (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve - locals declaratilon. Handle names found within a class. Return - error_mark_node when things aren't found. + locals declaratilon. Handle names found within a class. Return + error_mark_node when things aren't found. (patch_method_invocation_stmt): Return error_mark_node on failures. (patch_invoke): Removed unused local. Return the correct node. (java_complete_tree): Now returns a value. The BLOCK section binds - local identifiers and the type of a BLOCK is now void. Assign the - result of operand completion on COMPOUND_EXPR. Assign the - encapsulated node of a WFL to the result of its completion, except - when the node is an identifier. Now handle MODIFY_EXPR and several - binary operators. Return error_mark_node on errors. + local identifiers and the type of a BLOCK is now void. Assign the + result of operand completion on COMPOUND_EXPR. Assign the + encapsulated node of a WFL to the result of its completion, except + when the node is an identifier. Now handle MODIFY_EXPR and several + binary operators. Return error_mark_node on errors. (build_method_invocation, build_assignment, patch_assignment, - build_binop, operator_string, patch_binop): New functions. + build_binop, operator_string, patch_binop): New functions. * typeck.c (binary_numeric_promotion): New function. Thu May 21 12:01:04 1998 Per Bothner @@ -10851,168 +10856,168 @@ Thu May 12 13:44:27 1998 Alexandre Petit-Bianco * decl.c (pushdecl_force_head): New function. (pushlevel): Removed conditional printf. (complete_start_java_method): Don't enter local variable scope if - function is compiled from source code. + function is compiled from source code. * expr.c: parse.h now included (java_lang_expand_expr): New function. * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of - printf. Terminate buffer when doing directories. + printf. Terminate buffer when doing directories. * jcf-parse.c (parse_source_file): Call lang_init_source before - parsing and before code generation. + parsing and before code generation. * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally - use printf if the macro is defined. + use printf if the macro is defined. * lang.c (lang_init): Install lang_expand_expr hook on - java_lang_expand_expr. + java_lang_expand_expr. (java_dummy_print): New function. (lang_init_source): New function. * lex.c (java_lex): Remember location of an opening brace at the - second nesting level. + second nesting level. (java_is_eol): Unget character seen after a CR if it is EOF. * parse.h: Now includes lex.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use - printf if the macro is defined. + printf if the macro is defined. (expand_start_java_method, build_expr_block, enter_block, - exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks): - New static function declarations. + exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks): + New static function declarations. (pushdecl_force_head): New extern function declaration. (INCOMPLETE_TYPE_P): New macro. (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum. (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY, - BLOCK_EXPR_ORIGIN): New macros. + BLOCK_EXPR_ORIGIN): New macros. (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST, - DECL_SOURCE_LINE_LAST): New macros. + DECL_SOURCE_LINE_LAST): New macros. (struct parser_ctxt): Removed field current_method_decl, redundant - with the field current_function_decl. Added fields - first_ccb_indent1 and pending_block. + with the field current_function_decl. Added fields + first_ccb_indent1 and pending_block. * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK, - BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules - tagged + BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules + tagged (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs. (compilation_unit:): Cosmetic on sub rule. (type_declaration:): Cosmetic on sub rules. Added an error rule. (variable_initializer:): Installed default rule on expression:. (method_declaration:): method_header: starts a new - method. method_body: installs the function body, absorbs blocks - emitted for temporary variable scopings, pops function's body block - and merges function's last statement lineno in DECL_SOURCE_LINE. + method. method_body: installs the function body, absorbs blocks + emitted for temporary variable scopings, pops function's body block + and merges function's last statement lineno in DECL_SOURCE_LINE. (method_body:): Installed default rules. (block:): Call enter_block when an opening brace is seen. Absorb - scoping blocks and call exit_block when a closing brace is seen. + scoping blocks and call exit_block when a closing brace is seen. (block_statement:): Cosmetic changes. (method_invocation:): Create WFL around CALL_EXPR node. (patch_stage): Added comment around definition. (method_header): Try to use first_ccb_indent1 as the first line of - the method, so BP debug info are emitted at the first opening - brace of the function. If the function has no body, use the - location of the function's name. Override currently defined method - name with the matching WFL so we can point redefinition errors - using the location where the function's name was declared. + the method, so BP debug info are emitted at the first opening + brace of the function. If the function has no body, use the + location of the function's name. Override currently defined method + name with the matching WFL so we can point redefinition errors + using the location where the function's name was declared. (check_abstract_method_header): Interprets DECL_NAME as an - identifier or as a WFL, accordingly. + identifier or as a WFL, accordingly. (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM. (check_method_redefinition): Use DECL_NAME as a WFL. Extract - location and name information out of it and reinstall DECL_NAME to - its original identifier node value. + location and name information out of it and reinstall DECL_NAME to + its original identifier node value. (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the - function's source code). + function's source code). (read_import_dir): Test the value returned by find_class and issue - a fatal accordingly. + a fatal accordingly. (declare_local_variables): Push a new block for the scope of the - new variable(s) if code has been already generated at that nesting - level. Pinpoint redefinition errors using the variable id - WFLs. Generate initialization code if necessary. If the variable - type is incomplete, register a patch on its decl. + new variable(s) if code has been already generated at that nesting + level. Pinpoint redefinition errors using the variable id + WFLs. Generate initialization code if necessary. If the variable + type is incomplete, register a patch on its decl. (source_start_java_method): Rewritten. Define a new block for the - function's parameters. Build parameter decl out of function's - arguments and register them for a patch if their types are - incomplete. + function's parameters. Build parameter decl out of function's + arguments and register them for a patch if their types are + incomplete. (expand_start_java_method): Includes the part of - source_start_java_method that was pushing the parameter decls and - completing the method start code. + source_start_java_method that was pushing the parameter decls and + completing the method start code. (source_end_java_method): Removed call the expand_end_bindings and - poplevel (already taken care of). Reinstall function's arguments - and get function's last line of code before calling - expand_function_end. + poplevel (already taken care of). Reinstall function's arguments + and get function's last line of code before calling + expand_function_end. (java_method_add_stmt): New comment before the function's - code. Complement the second operand of the current COMPOUND_EXPR - if necessary. + code. Complement the second operand of the current COMPOUND_EXPR + if necessary. (java_complete_expand_methods): Don't generate debug info on line - zero when expanding a generated constructor. + zero when expanding a generated constructor. (java_complete_expand_method): Set start and end line numbers for - a artificially generated constructor to one and manually call - enter_block and exit_block when defining it. For all methods: - expand function's start calling the new expand_start_java_method - and invoke java_complete_tree on the effective method's body, if - any. + a artificially generated constructor to one and manually call + enter_block and exit_block when defining it. For all methods: + expand function's start calling the new expand_start_java_method + and invoke java_complete_tree on the effective method's body, if + any. (resolve_expression_name): Now use lookup_name_in_blocks to search - local variable decls and print out an error when variables are - undefined. + local variable decls and print out an error when variables are + undefined. (patch_method_invocation_stmt): Inserted comment before the - function's code. + function's code. (lookup_method_invoke): Chain method's arguments using chainon - with the current arg list as a second argument. Inserted missing - IDENTIFIER_POINTER when reporting an error on methods not found. + with the current arg list as a second argument. Inserted missing + IDENTIFIER_POINTER when reporting an error on methods not found. (refine_accessible_methods_list): Don't retain constructors. (patch_arguments): Function removed. (java_complete_tree): Inserted comment before the function's - code. New case for BLOCKs. Moved the WFL case a bit - further. Complete function's arguments. - (build_expr_block, enter_block, exit_block, lookup_name_in_blocks, - maybe_absorb_scoping_blocks): New functions. + code. New case for BLOCKs. Moved the WFL case a bit + further. Complete function's arguments. + (build_expr_block, enter_block, exit_block, lookup_name_in_blocks, + maybe_absorb_scoping_blocks): New functions. Mon Apr 27 10:50:05 1998 Alexandre Petit-Bianco * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if - previously set. + previously set. * jcf-parse.c (parse_source_file, java_error_count): New forward - and extern declarations. + and extern declarations. (java_parse_abort_on_error): Macro moved. (jcf_parse_source): fatal called if fopen fails. Now calls - parse_source_file. + parse_source_file. (parse_source_file): New parse_only parameter. Reflects the - elimination of the second pass. + elimination of the second pass. (yyparse): parse_source_file called with argument set to 0. * jcf.h (JCF_ZERO): Sets java_source to zero. * lex.c (java_init_lex): pass argument is gone. Function modified - to be called once during the analysis of a file. + to be called once during the analysis of a file. (java_unget_unicode): Fixed typo in fatal message. (java_get_line_col): Likewise. (java_lval): Likewise. String literals no longer built during - second pass. + second pass. * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into - account. + account. * parse.h (MODIFIER_WFL): New macro. (parse_check_super, parser_check_super_interface): Now return int. (parser_chain_incomplete_item, not_builtin_p, - complete_method_decl): Declarations removed. + complete_method_decl): Declarations removed. (build_method_invocation_stmt, build_invoke): Renamed using the - `patch' instead of `build' + `patch' instead of `build' (register-incomplete_type, obtain_incomplete_type, - java_complete_tree, java_complete_expand_method, - unresolved_type_p, create_jdep_list): New function declarations. + java_complete_tree, java_complete_expand_method, + unresolved_type_p, create_jdep_list): New function declarations. (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS, - END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted. + END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted. (jdep): New typedef on new struct _jdep. (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL, - JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, - JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED, - JDEP_RESOLVED_P): New macros. + JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, + JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED, + JDEP_RESOLVED_P): New macros. (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD, - JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE, - JDEP_VARIABLE): New enum values and jdep kinds. + JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE, + JDEP_VARIABLE): New enum values and jdep kinds. (jdeplist): New typedef on struct _jdeplist. (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New - macros. + macros. (CALL_EXPR_PRIMARY): New macro. (struct parser_ctxt): Fields java_pass, current_method_decl, - method_decl_list deleted. New field jdeplist. + method_decl_list deleted. New field jdeplist. (INCOMPLETE_P): Macro deleted. * parse.y (single_type_import_declaration:): Removed pass switch. (type_import_on_demand_declaration): Likewise. (field_declaration:): Removed pass switch on all sub rules. (class_declaration:): Call the complete_class_decl removed on - class_body rules. + class_body rules. (method_declaration:): Removed second pass switch. No longer chain - methods decl when method_header reduced. + methods decl when method_header reduced. (method_header:): Sub rules no longer depend on pass switch. (method_declarator:): Likewise. (method_body:): Likewise. @@ -11026,74 +11031,74 @@ Mon Apr 27 10:50:05 1998 Alexandre Petit-Bianco (java_pop_parser_context): Free classd_list content. (yyerror): Call obstrack_grow0 to finalize error message. (check_class_interface_creation): Comment modified to reflect new - returned value meaning. Removed second pass switch. Return 1 if an - error was found, 0 otherwise. Adjust pointer on filename if a - leading path separator was found. + returned value meaning. Removed second pass switch. Return 1 if an + error was found, 0 otherwise. Adjust pointer on filename if a + leading path separator was found. (maybe_create_class_interface_decl): Removed first pass switch - when linking the class decl to the class_list. Install a new - jdep_list for the class. + when linking the class decl to the class_list. Install a new + jdep_list for the class. (add_superinterfaces): List of unresolved interfaces is - gone. Unresolved interfaces are directly added to the current - dependencies list. + gone. Unresolved interfaces are directly added to the current + dependencies list. (create_interface): Second pass shortcut removed. ctpx->modifier_ctx access through MODIFIER_WFL. (create_class): Second pass shortcut removed. Call to - register_incomplete_type replaces the call to - parser_chain_incomplete_item. + register_incomplete_type replaces the call to + parser_chain_incomplete_item. (complete_class_decl): Function removed. (duplicate_declaration_error): New way of retrieving redeclared - item type. + item type. (register_fields): Call to lookup_modifier_cl replaced by - MODIFIER_WFL. New way of handling unresolved type, using - unresolved_type_p and obtain_incomplete_type. + MODIFIER_WFL. New way of handling unresolved type, using + unresolved_type_p and obtain_incomplete_type. register_incomplete_type replaces call to parser_chain_incomplete_item. (patch_stage): New static global variable. (method_header): New way of handling unresolved type, using - unresolved_type_p and obtain_incomplete_type. patch_stage used to - indicates that the method decl needs to be patched. + unresolved_type_p and obtain_incomplete_type. patch_stage used to + indicates that the method decl needs to be patched. (check_abstract_method_header): Call to lookup_modifier_cl - replaced by MODIFIER_WFL. + replaced by MODIFIER_WFL. (method_declarator): Incomplete argument type are registered - calling register_incomplete_type. Patch on the declared method is - issued in that case. + calling register_incomplete_type. Patch on the declared method is + issued in that case. (unresolved_type_p): New function. (parser_check_super_interface): New comment to reflect function's - modified returned type (int). Function and has a new argument - this_wfl. Call to parse_error_context uses this_wfl instead of - relying on lookup_cl. + modified returned type (int). Function and has a new argument + this_wfl. Call to parse_error_context uses this_wfl instead of + relying on lookup_cl. (parser_check_super): Comment reflects function's new returned - type (int). Function returns non zero value on error. + type (int). Function returns non zero value on error. (create_jdep_list, reverse_jdep_list, obtain_incomplete_type, - register_incomplete_type, jdep_resolve_class): New functions to - handle incomplete types in declarations. + register_incomplete_type, jdep_resolve_class): New functions to + handle incomplete types in declarations. (java_complete_class): Rewritten to work with the new incomplete - type handling scheme. + type handling scheme. (complete_class_report_errors): Likewise. (complete_method_decl): Removed: it jobs is now handled by - java_complete_class. + java_complete_class. (do_resolve_class): Class loaded in not already loaded and not - found in Java source code. + found in Java source code. (java_check_regular_methods, java_check_abstract_methods): Don't - call complete_method_decl anymore. + call complete_method_decl anymore. (lookup_modifier_cl, not_builtin_p): Functions deleted. (read_import_dir): Got rid of the pass number dependency. (declare_local_variables): New handling of unresolved types (patch - issued). + issued). (source_start_java_method): New parameter level. Function called - with level set to 1 when argument types are potentially - unresolved. Called to complete the job with level set to 2 once - types are complete. + with level set to 1 when argument types are potentially + unresolved. Called to complete the job with level set to 2 once + types are complete. (source_end_java_method): Call to permanent_allocation - removed. Waiting to be replaced by a more suitable obstack - management. + removed. Waiting to be replaced by a more suitable obstack + management. (java_complete_expand_methods, java_complete_expand_method, - java_expand_finals): New functions. + java_expand_finals): New functions. (build_method_invocation_stmt): Renamed - patch_method_invocation_stmt. Extracts function call expression - (wfl) and arguments (args) from CALL_EXPR tree operands. + patch_method_invocation_stmt. Extracts function call expression + (wfl) and arguments (args) from CALL_EXPR tree operands. (build_invoke): Renamed patch_invoke. Fixed typo in fatal - call. Patch the function and argument operand of the CALL_EXPR - tree argument. + call. Patch the function and argument operand of the CALL_EXPR + tree argument. (patch_argument, java_complete_tree): New functions. Mon Apr 20 18:26:57 1998 Per Bothner @@ -11119,30 +11124,30 @@ Mon Apr 20 18:26:57 1998 Per Bothner Tue Apr 14 15:59:54 1998 Alexandre Petit-Bianco * jcf-parse.c (load_class): Don't change input_filename before - calling jcf_parse_source (but still do it before calling - jcf_parse). + calling jcf_parse_source (but still do it before calling + jcf_parse). (jcf_parse_source): Assign input_filename after having saved the - parser context. + parser context. * lex.c (java_init_lex): Chain a WFL node to the import on demand - list. ctxp->modifier_ctx zeroed according to its new - definition. ctxp->filename initialized. Removed + list. ctxp->modifier_ctx zeroed according to its new + definition. ctxp->filename initialized. Removed JAVA_MODIFIER_CTX_UNMARK. (java_unget_unicode): Update the character based column position. (java_allocate_new_line): ref_count not used anymore. Always free - ctxp->p_line. Initialize c_line->char_col to 0. + ctxp->p_line. Initialize c_line->char_col to 0. (java_get_unicode): Update the character based column position. (java_lex): Use ctxp->elc to store current position in source - file, at the beginning of the parsed token. Set modifier_ctx entry - corresponding to the parse modifier to a WFL node. Return a WFL - node when an identifier is parsed. + file, at the beginning of the parsed token. Set modifier_ctx entry + corresponding to the parse modifier to a WFL node. Return a WFL + node when an identifier is parsed. (java_lex_error): Now uses ctxp->elc to store current position in - source. + source. (build_wfl_node, java_is_eol, java_get_line_col): New functions. * lex.h (build_wfl_node): New function definitions. (struct java_line): ref_count and next fields are gone. New field - char_col. + char_col. (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN, - JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted. + JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted. (JAVA_COLUMN_DELTA): New macro. (java_lc): New typedef on new struct _java_lc. * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types. @@ -11155,76 +11160,76 @@ Tue Apr 14 15:59:54 1998 Alexandre Petit-Bianco wrong modifier. (exit_java_complete_class): Removed a commented out statement. (struct parser_ctxt): Added comments on fields. modifier_ctx is - now an array of tree nodes. Deleted fields line_list and - e_line. New field elc, to replace e_line. + now an array of tree nodes. Deleted fields line_list and + e_line. New field elc, to replace e_line. * parse.y (array_type:): Build WFL node. (qualified_name:): Build a single WFL node out of two. Retain - the location information of the first node in the resulting node. + the location information of the first node in the resulting node. (package_declaration:): Use package name as a WFL node (single_type_import_declaration:): Use imported name as a WFL node. (type_import_on_demand_declaration:): Use root of the imported - packages as a WFL node. + packages as a WFL node. (field_declaration:): Removed unused local variable cl. (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK. (yyerror): New static elc. Removed static error_line, error_pos. - New local code_from_source. Save ctxp->elc into elc at the first - pass. Call java_get_line_col to get a string of the line where - the error occured. + New local code_from_source. Save ctxp->elc into elc at the first + pass. Call java_get_line_col to get a string of the line where + the error occured. (debug_line): Removed static function. (parse_error_context, parse_warning_context): Parameter cl is now - a WFL node. Use its value to initialize ctxp->elc. + a WFL node. Use its value to initialize ctxp->elc. (redefinition_error): Parameter cl is now a WFL node. (parse_add_interface): New parameter wfl. No longer call - lookup_cl, use wfl instead. + lookup_cl, use wfl instead. (check_class_interface_creation): Parameter cl is now a WFL node. (maybe_create_class_interface_decl): Likewise. (add_superinterfaces): New function. (create_interface): Removed local cl, node, super_decl, - super_decl_type. Function now uses id as a WFL node. Better - warning/error report on obsolete or forbidden mix of - modifiers. Now calls add_superinterfaces to register interfaces. + super_decl_type. Function now uses id as a WFL node. Better + warning/error report on obsolete or forbidden mix of + modifiers. Now calls add_superinterfaces to register interfaces. (create_class): Removed local cl, node. Local variable id is used - as a WFL node. Better error report on forbidden modifier - mix. Uses add_superinterfaces to register interfaces. + as a WFL node. Better error report on forbidden modifier + mix. Uses add_superinterfaces to register interfaces. (find_field): Argument cl is now a WFL node. Now store the WFL - node of a fields that needs to be checked for their - initialization. + node of a fields that needs to be checked for their + initialization. (method_header): Local variable node non longer used. Local - variable id replaces cl. + variable id replaces cl. (check_modifiers_consistency): Local variable cl is now a WFL - node. + node. (method_declarator): Local variable cl replaced by parameter id. (parser_qualified_name): Now uses parameter name as a WFL node. (parser_check_super_interface): New parameter wfl, for achieve - greater accuracy during error reports. + greater accuracy during error reports. (parser_chain_incomplete_item): New parameter named location. Used, - along the decl, to construct the incomplete item node. + along the decl, to construct the incomplete item node. (java_complete_class): resolve_class now uses WFL node extracted - from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE + from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE where appropriate. (complete_method_decl): Unresolved function's argument types are WFL. (resolve_class): Parameter cl is now a WFL node. (resolve_and_layout): Likewise. (do_resolve_class): Likewise. Try first to use cl and then do the - lookup on the decl when calling check_pkg_class_access. + lookup on the decl when calling check_pkg_class_access. (complete_class_report_errors): Use IC_TYPE in place of - TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency - instead of doing a lookup over the decl. + TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency + instead of doing a lookup over the decl. (java_check_final): Use WFL info from field tree list. (lookup_cl): Rewritten and returns a statically defined WFL node. (lookup_modifier_cl): Now uses information from WFL nodes. (process_imports): Likewise. (read_import_dir): name and cl arguments replaced by a single WFL - node. Function modified accordingly. + node. Function modified accordingly. (find_in_imports_on_demand): Now uses WFL node. (check_pkg_class_access): cl argument is now a WFL node. (declare_local_variables): Fixed to use WFL nodes. (resolve_expression_name): Likewise. (build_method_invocation_stmt): name_combo argument renamed - wfl. Function modified to use WFL nodes. + wfl. Function modified to use WFL nodes. (build_invoke): cl used as a WFL node when calling build_expr_wfl. (lookup_method_invoke): cl is now a WFL node. Added missing - IDENTIFIER_POINTER to class type decl name. + IDENTIFIER_POINTER to class type decl name. Tue Apr 14 15:23:29 1998 Dave Brolley @@ -11245,27 +11250,27 @@ Thu Apr 9 16:10:56 1998 Alexandre Petit-Bianco (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl. (block:): Likewise. (labeled_statement_nsi:): Generate debug info when reducing - expression_statement:. + expression_statement:. (check_pkg_class_access): get_access_flags_from_decl invokation - fixed for new CLASS_* flags location. + fixed for new CLASS_* flags location. (source_end_java_method): Save/restore parser context when - entering/leaving this routine. Restore lineno to its right value - before calling expand_end_bindings. + entering/leaving this routine. Restore lineno to its right value + before calling expand_end_bindings. (build_method_invocation_stmt): build_invoke called with the - current line information. + current line information. (build_invoke): New argument cl. Wrap the function call around a - wfl node. + wfl node. (refine_accessible_methods_list): Changed comment, removed - unnecessary code. + unnecessary code. * parse.h: Fixed typo in comments. (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location. (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro. (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1, - parser_ccb_indent. + parser_ccb_indent. * lex.c (java_lex): Record the last closing curly bracket of a - function. + function. * jcf-parse.c (jcf_parse_source): Now calls - java_check_methods. Clarified comment, fixed typo. + java_check_methods. Clarified comment, fixed typo. 1998-04-09 Dave Brolley @@ -11300,81 +11305,81 @@ Fri Apr 3 13:22:41 1998 Per Bothner Thu Mar 19 16:59:16 1998 Alexandre Petit-Bianco * parse.y (build_method_invocation_stmt): Removed extra argument - to build_invoke. + to build_invoke. Mon Mar 16 17:25:19 1998 Alexandre Petit-Bianco * expr.c (dtable_indent): Now static global. (expand_invoke): Now call invoke_build_dtable and - build_invokevirtual. + build_invokevirtual. (invoke_build_dtable, build_invokevirtual): New functions. * jcf-io.c (find_class): Defer issuing a warning by setting - jcf->outofsynch to 1. + jcf->outofsynch to 1. * jcf-parse.c (jcf_out_of_synch): New function. (load_class): Test this_jcf.outofsynch flag and call - jcf_out_of_synch accordingly. + jcf_out_of_synch accordingly. * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in - comment indentation. + comment indentation. * lex.c (java_get_unicode): Fixed code indentation. (java_lex): Create string literal. Fixed typo. Removed several - premature obstack_free. + premature obstack_free. * parse.h: New enums for name resolution and invocation mode. (struct qualification): New data structure. (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros. (do_resolve_class, build_method_invocation_stmt, - breakdown_qualified, qualify_ambiguous_name, resolve_and_layout, - debug_line, identical_subpath_p, invocation_mode, - refine_accessible_methods_list, build_invoke, - lookup_method_invoke): New functions declared. + breakdown_qualified, qualify_ambiguous_name, resolve_and_layout, + debug_line, identical_subpath_p, invocation_mode, + refine_accessible_methods_list, build_invoke, + lookup_method_invoke): New functions declared. (build_invokevirtual, invoke_build_dtable, match_java_method, - build_field_ref, jcf_out_of_synch): New references to external - functions. + build_field_ref, jcf_out_of_synch): New references to external + functions. (struct parse_ctxt): Removed artificial_constructor field. * parse.y: (array_type:): Type defined for this rule. (class_type:): Installed default rule for interface_type:. (array_type:): Now build Java array type. (qualified_name:): Now use obstack_grow0. (method_declaration:): Skip the artificial constructor added to - the list, if any. + the list, if any. (abstract_method_declaration:): Execute the code only during pass 1. (block:): Installed default rule in block_statements:. (block_statement:): Add the statement to the method during pass 2. (statement_expression): Installed default rule for - method_invocation:. + method_invocation:. (argument_list:): Added code to build the argument list. - (method_invocation:): Added call to create the method invocation - node. + (method_invocation:): Added call to create the method invocation + node. (yyerror): Now use obstack_grow0. Removed bogus obstack_free. (debug_line): New function for debug. (complete_class_decl): No longer do something during pass 1. (method_header): Use BUILD_PTR_FROM_NAME. (parser_qualified_classname): Use obstack_grow0. Removed bogus - obstack_free. + obstack_free. (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified - function's main comment. + function's main comment. (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete - classes. + classes. (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types. (resolve_class): Now works with arrays. (do_resolve_class, resolve_and_layout): New functions. (java_check_regular_methods): Reverse method list before and after - having processed it. No longer set ctxp->artificial_constructor. + having processed it. No longer set ctxp->artificial_constructor. (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch - accordingly. Fixed typo in issued error message. Now use - obstack_grow0. + accordingly. Fixed typo in issued error message. Now use + obstack_grow0. (find_in_imports_on_demand): Now use obstack_grow0. (declare_local_variables): Use BUILD_PTR_FROM_NAME. (source_end_java_method): Call expand_expr_stmt instead of - expand_expr. Calls it before calling expand_function_end. + expand_expr. Calls it before calling expand_function_end. (java_method_add_stmt): Do nothing if errors were found during - parsing. + parsing. (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo. (build_method_invocation_stmt, build_invoke, invocation_mode, - lookup_method_invoke, refine_accessible_methods_list, - qualify_ambiguous_name, breakdown_qualified, identical_subpath_p): - New functions. + lookup_method_invoke, refine_accessible_methods_list, + qualify_ambiguous_name, breakdown_qualified, identical_subpath_p): + New functions. * typeck.c (build_java_signature): Properly end method signature - if return type skipped. + if return type skipped. (match_java_method): New function. Mon Mar 16 10:40:47 1998 Per Bothner @@ -11389,62 +11394,62 @@ Wed Feb 25 08:55:49 1998 Alexandre Petit-Bianco * java-tree.h (struct lang_decl): New field function_decl_body. (DECL_FUNCTION_BODY): New macro. * jcf-parse.c (jcf_parse_source): Deeper check before setting - CLASS_FROM_SOURCE_P. + CLASS_FROM_SOURCE_P. (parse_source_file): Fixed typos. Call java_layout_parsed_class before starting pass 2. Call to java_generate_parsed_class replaced by java_register_parsed_class. * lex.c: Fixed typo in header. Some line width related formating. * lex.h: Some line width related formating. * parse.h (source_end_java_method, resolve_expression_name, - complete_class_decl, maybe_create_class_interface_decl, - check_class_interface_creation): New static function declarations. + complete_class_decl, maybe_create_class_interface_decl, + check_class_interface_creation): New static function declarations. (java_layout_parsed_class, java_method_add_stmt): New function - declarations. + declarations. (struct parser_ctxt): Field mark_class_generate removed. New - fields class_list and artificial_constructor. + fields class_list and artificial_constructor. * parse.y: Fixed typo in header. (class_declaration:): Call complete_class_decl when class body - parsed. + parsed. (method_declaration:): Call source_end_java_method in pass 2 when the method body is defined. (postfix_expression:): Do expression name resolution on sub-rule - name during pass 2. + name during pass 2. (create_class, create_interface): Merged common pieces. - (check_class_interface_creation, maybe_create_class_interface_decl): + (check_class_interface_creation, maybe_create_class_interface_decl): New functions. (complete_class_decl): New function. (register_fields): Fixed line width related typo. (method_header): Correctly skip first argument when fixing - argument line. Changed the loop. + argument line. Changed the loop. (java_check_circular_reference): Now use ctxp->class_list. (java_complete_class): Removed start/stop marking. (java_check_regular_methods): Now takes a class decl as an - argument. Add default constructor if none were encountered. + argument. Add default constructor if none were encountered. (java_check_methods): Now use ctxp->class_list. Changed call to - java_check_regular_methods. + java_check_regular_methods. (source_start_java_method): Set DECL_ARG_TYPE for each function - arguments. + arguments. (source_end_java_method, java_method_add_stmt): New functions. (java_generate_parsed_class): No longer exists. - (java_layout_parsed_class, java_register_parsed_class): New functions. + (java_layout_parsed_class, java_register_parsed_class): New functions. (resolve_expression_name): New function. Thu Feb 12 11:54:28 1998 Alexandre Petit-Bianco * jcf-parse.c: (parse_source_file): Check on errors after init lex. * lex.c: (java_init_lex): Defer ctxp->java_pass initialization - until pass initializations are done. Call read_import_dir with - pass set to 0. + until pass initializations are done. Call read_import_dir with + pass set to 0. * parse.h: (lookup_modifier_cl): New function declared. (INTERFACE_FIELD_MODIFIERS): New macro. (OBSOLETE_MODIFIER_WARNING): New macro. * parse.y: (register_fields): Class type and current field name in - local variables. Check modifier(s) if adding field(s) to an interface. + local variables. Check modifier(s) if adding field(s) to an interface. (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING - and report errors using the faulty modifier line context. + and report errors using the faulty modifier line context. (lookup_modifier_cl): New function. (read_import_dir): Detect and report default import processing - failure. + failure. 1998-02-11 Brendan Kehoe @@ -11463,7 +11468,7 @@ Wed Feb 11 11:27:59 1998 Alexandre Petit-Bianco (layout_class): Likewise. (layout_class): Detect and lay out classes defined in source code. (interface_of_p, add_interface_do, may_add_interface): New - function. + function. (add_interface): Now use add_interface_do. (add_method_1): New function. (add_method): Now use add_method_1. @@ -11473,37 +11478,37 @@ Wed Feb 11 11:27:59 1998 Alexandre Petit-Bianco * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg. (expand_invoke): Likewise and fixed typo. *gjava.c: (print_super_field): Use new argument to find_class - DO_CLASS_FILE. + DO_CLASS_FILE. (main): Likewise. *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE. - (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME, - QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on - IDENTIFIER_NODE. - (CLASS_COMPLETE_P): New flag on TYPE_DECL. + (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME, + QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on + IDENTIFIER_NODE. + (CLASS_COMPLETE_P): New flag on TYPE_DECL. (add_method_1, push_class): New prototypes. *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument. *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip - directory where the class was found. + directory where the class was found. (find_class): New argument DO_CLASS_FILE. Function find_class - modified accordingly. + modified accordingly. *jcf-parse.c: (fix_class_path): New function. (load_class): Use new VERBOSE argument. load_class now finds and - loads/parses .class/.java files. Save read_state of current_jcf + loads/parses .class/.java files. Save read_state of current_jcf if necessary. (java_parser_abort_on_error): New macro. (jcf_parse_source, parse_source_file): New function. (jcf_parse): Fixed typo. (yyparse): Call parse_source_file () only. (process_zip_dir): Fixed typo, fix zdir->filename_length when - writing the real class name back in the zip directory entry. + writing the real class name back in the zip directory entry. (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null. (jcf_figure_file_type): Fixed bogus alloc and bcopy. *jcf.h: (typedef struct JCF): New fields java_source and zipd. (find_class): Prototype fixed. *lex.c: Added 1998 time stamp. Removed all static global variables, moved into the parser - context data structure.. Now include unistd.h if SEEK_SET not - defined. + context data structure.. Now include unistd.h if SEEK_SET not + defined. (java_init_lex): Rewritten. (java_sneak_unicode): Modified current unicode access in current line. (java_unget_unicode): Likewise. @@ -11514,72 +11519,72 @@ Wed Feb 11 11:27:59 1998 Alexandre Petit-Bianco (java_get_unicode): Now use the parser context. (java_lineterminator): Likewise. (java_lex): Now used java_lval argument (pointer to YYSTYPE), part - of the reentrant parser implementation. Function now use the - parser context data structure and java_lval. Fixed production of - the float and double constant "out of range" error message. Fixed - obstack use. Return integer value when hitting a modifier. Now - return type for TRUE, FALSE and other predefined types. Return - identifier as a TREE_LIST list containing the current line context - as the TREE_VALUE sub-node. + of the reentrant parser implementation. Function now use the + parser context data structure and java_lval. Fixed production of + the float and double constant "out of range" error message. Fixed + obstack use. Return integer value when hitting a modifier. Now + return type for TRUE, FALSE and other predefined types. Return + identifier as a TREE_LIST list containing the current line context + as the TREE_VALUE sub-node. (java_unicode_2_utf8): Fixed typo in declaration. (java_lex_error): Now use the parser context data structure. *lex.h: Added 1998 time stamp. (struct java_line): New fields ref_count and next. (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN, - JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros. + JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros. (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed. *parse.h: Added 1998 time stamp. (java_parse_source_file): Renamed from parse_source_file. (YYERROR_NOW, YYNOT_TWICE): Fixed. (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS, - INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS, - JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL, - THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS, - END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class, - CLASS_OR_INTERFACE, INCOMPLETE_P): New macros. + INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS, + JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL, + THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS, + END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class, + CLASS_OR_INTERFACE, INCOMPLETE_P): New macros. (struct parser_ctxt): New data structure to keep the parser context. *parse.y: Added 1998 time stamp, got rid of static global variables. (java_error_count, ctxp): New global variables. (%union): New value field. (numeric_type, integral_type): Rules removed. (primitive_type): Rule defined to handle integral, float, double and - boolean types. + boolean types. (qualified_name, package_declaration, - single_type_import_declaration, type_import_on_demand_declaration, - modifiers, class_declaration, super, interfaces, - interface_type_list, class_body, field_declaration, - field_declaration, variable_declarators, variable_declarator, - variable_declarator_id, method_declaration, method_header, - formal_parameter_list, formal_parameter, method_body, block, - static, interface_declaration, extends_interfaces, - abstract_method_declaration, local_variable_declarators): Rules now - define actions. + single_type_import_declaration, type_import_on_demand_declaration, + modifiers, class_declaration, super, interfaces, + interface_type_list, class_body, field_declaration, + field_declaration, variable_declarators, variable_declarator, + variable_declarator_id, method_declaration, method_header, + formal_parameter_list, formal_parameter, method_body, block, + static, interface_declaration, extends_interfaces, + abstract_method_declaration, local_variable_declarators): Rules now + define actions. (force_error, do_warning): New global statics. (push_parser_context, parser_context_save_global, - parser_context_restore_global, pop_parser_context): New functions. + parser_context_restore_global, pop_parser_context): New functions. (yyerror): Now uses the global parser context. Fixed use of obstack. (parse_error, parse_error_context, parse_warning_context, - java_accstring_lookup, redefinition_error, check_modifiers, - parser_add_interface, create_interface, create_class, find_field, - duplicate_declaration_error, register_fields, method_header, - check_modifiers_consistency, check_abstract_method_header, - method_declarator, parser_qualified_classname, - parser_check_super_interface, parser_check_super, - parser_chain_incomplete_item, java_check_circular_reference, - layout_class_from_source, java_complete_class, - complete_method_decl, resolve_class, complete_class_report_errors, - java_check_final, check_method_redefinition, - java_check_regular_methods, java_check_abstract_methods, - java_check_methods, lookup_java_interface_method2, - lookup_java_method2, lookup_cl, find_name_in_single_imports, - process_imports, find_in_imports, read_import_entry, - read_import_dir, find_in_imports_on_demand, - check_pkg_class_access, not_builtin_p, declare_local_variables, - source_start_java_method, java_generate_parsed_class): New - functions. + java_accstring_lookup, redefinition_error, check_modifiers, + parser_add_interface, create_interface, create_class, find_field, + duplicate_declaration_error, register_fields, method_header, + check_modifiers_consistency, check_abstract_method_header, + method_declarator, parser_qualified_classname, + parser_check_super_interface, parser_check_super, + parser_chain_incomplete_item, java_check_circular_reference, + layout_class_from_source, java_complete_class, + complete_method_decl, resolve_class, complete_class_report_errors, + java_check_final, check_method_redefinition, + java_check_regular_methods, java_check_abstract_methods, + java_check_methods, lookup_java_interface_method2, + lookup_java_method2, lookup_cl, find_name_in_single_imports, + process_imports, find_in_imports, read_import_entry, + read_import_dir, find_in_imports_on_demand, + check_pkg_class_access, not_builtin_p, declare_local_variables, + source_start_java_method, java_generate_parsed_class): New + functions. *typeck.c: (signature_include_return): New global variable. (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether - to add the function returned type in the signature. + to add the function returned type in the signature. 1998-02-09 Brendan Kehoe @@ -11648,13 +11653,13 @@ Fri Dec 12 19:18:42 1997 Per Bothner Thu Dec 4 13:22:59 1997 Alexandre Petit-Bianco * keyword.h: New file, output of keyword.gperf as processed by - gperf. + gperf. * lex.c (java_lex_init): Initialize java_error_flag. * parse.c (YYERROR_NOW): Uses java_error_flag. * parse.y: New static java_error_flag. Useless definition of - buffer_error gone. + buffer_error gone. * parse.y (java_error): Portable error recovery using - java_error_flag (not yet completely tuned). + java_error_flag (not yet completely tuned). 1997-12-04 Brendan Kehoe @@ -11664,7 +11669,7 @@ Wed Dec 3 18:37:42 1997 Alexandre Petit-Bianco * Makefile.in: (JAVA_OBJS): New object jcf-parse.o. (parse.c, lex.c, keyword.h): New rules for Java source code - front-end. + front-end. * parse.c: Renamed into jcf-parse.c. * jcf-parse.c (yyparse): Invoke the parser to process Java source code. * keyword.gperf: New file, Java keywords. @@ -11708,8 +11713,8 @@ Wed Oct 22 19:39:05 1997 Per Bothner Tue Oct 21 15:09:02 1997 Alexandre Petit-Bianco * parse.c (process_zip_dir): Skip ZIP entries not bearing the - .class extension in their name and fix thing so we don't process - them parse_zip_file_entries(). + .class extension in their name and fix thing so we don't process + them parse_zip_file_entries(). (parse_zip_file_entries): Cleaned unused local variables. Mon Oct 20 14:52:42 1997 Per Bothner @@ -11724,8 +11729,8 @@ Mon Oct 20 14:52:42 1997 Per Bothner Mon Oct 20 13:40:41 1997 Alexandre Petit-Bianco * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir, - find_in_current_zip, jcf_figure_file_type): Moved from - jcf-reader.c to parse.c. + find_in_current_zip, jcf_figure_file_type): Moved from + jcf-reader.c to parse.c. * zextract.c: (read_zip_archive): takes file_comment_length possible field into account. @@ -11758,34 +11763,34 @@ Wed Oct 15 18:09:45 1997 Per Bothner Wed Oct 15 17:04:50 1997 Alexandre Petit-Bianco * class.c (append_gpp_mangled_type): Use function argument - unpromoted type to generate mangled name. + unpromoted type to generate mangled name. Mon Oct 13 16:52:55 1997 Alexandre Petit-Bianco * constants.c (build_constant_data_ref): Now uses current_class - instead of main_class. + instead of main_class. (build_constants_constructor): Now uses current_class instead of - main_class. + main_class. * zipfile.h: (struct ZipFileCache): Now defined here. Declaration - of the global variable SeepZipFiles done here. + of the global variable SeepZipFiles done here. * zextract.c (read_zip_archive): extra_field optional field taken - into account while computing the position of the class file in the - archive. + into account while computing the position of the class file in the + archive. * verify.c (verify_jvm_instructions): Use current_jcf to search - the constant pool. + the constant pool. * parse.c (load_class): First search for the class to load in the - current zip file. Saves current_jcf (restored before returning - from that function). Don't call JCF_FINISH in the class was found - in the current ZIP file. + current zip file. Saves current_jcf (restored before returning + from that function). Don't call JCF_FINISH in the class was found + in the current ZIP file. (jcf_parse): If the class was found in the current ZIP file, save - its tree_constant_pool (for later reuse). + its tree_constant_pool (for later reuse). (parse_class_file): New function. Process each method defined in - the current class and record the class as to be later registered. + the current class and record the class as to be later registered. (yyparse): Rewritten. Figure the type of the current file and switch accordingly. * lang.c: New global variable current_jcf. (lang_init): Removed compiling_from_source test (done later, in - yyparse). Removed call the jcf_parse (). + yyparse). Removed call the jcf_parse (). * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values. (typedef struct JCF): New fields seen_in_zip (to mark a class found in the current ZIP file) and zip_offset (offset to the class data in @@ -11793,29 +11798,29 @@ Mon Oct 13 16:52:55 1997 Alexandre Petit-Bianco * jcf-reader.c: zipfile.h included. localToFile: New ZipFileCache static global variable (parse_zip_file_entries): New function. Browse the current ZIP - file directory and process each class found. + file directory and process each class found. (process_zip_dir): New function. Register each class found in the - ZIP file directory. The class aren't parsed but a valid JCF is - link to each of them. + ZIP file directory. The class aren't parsed but a valid JCF is + link to each of them. (find_in_current_zip): New function. Search for a class in the - current ZIP file directory. If found, prepare the class so that it - can be loaded. + current ZIP file directory. If found, prepare the class so that it + can be loaded. (jcf_figure_file_type): New function. Examine the file structure - to figure a class file, a ZIP file. If none of these categories are - matched, a source file is assumed. + to figure a class file, a ZIP file. If none of these categories are + matched, a source file is assumed. * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h). - SeenZipFile: New global variable. + SeenZipFile: New global variable. (open_in_zip): Use zipmember's length to accelerate the search for - a member. If zipmember was NULL and zip file successfully read, - return 0. + a member. If zipmember was NULL and zip file successfully read, + return 0. * java-tree.h: New global variable current_jcf declared. Added - declaration for current_constant_pool_tags, current_constant_pool_data, + declaration for current_constant_pool_tags, current_constant_pool_data, current_constant_pool_length, current_constant_pool_data_ref. (struct lang_type): Augmented with two fields. struct JCF *jcf (to - store the JCF of classes seen in a zip file) and tree *constant_pool + store the JCF of classes seen in a zip file) and tree *constant_pool (to save a loaded class constant pool). current_class declared here. * expr.c (expand_invoke): Use current_jcf instead of main_jcf to - retrieve method_ref_constant. + retrieve method_ref_constant. (PUSHC): java_push_constant_from_pool now uses current_jcf. (OBJECT): get_class_constant now uses current_jcf. (ARRAY_NEW_PTR): get_class_constant now uses current_jcf. @@ -11825,7 +11830,7 @@ Mon Oct 13 16:52:55 1997 Alexandre Petit-Bianco * class.c: New static global variable registered_class. (register_class): New function. (emit_register_class): Modified to use registered_class instead of - main_class + main_class (is_compiled_class): Now take into account class seen in the archive. Mon Oct 6 12:03:23 1997 Per Bothner @@ -11843,7 +11848,7 @@ Mon Oct 6 12:03:23 1997 Per Bothner Wed Oct 1 11:26:10 1997 Alexandre Petit-Bianco * zextract.c (read_zip_archive): Now takes into account the - extra_field field. + extra_field field. * expr.c (can_widen_reference_to): Modified to handle sub-interfaces. Sat Sep 20 12:44:28 1997 Per Bothner @@ -11866,39 +11871,39 @@ Wed Sep 17 13:15:23 1997 Per Bothner Wed Sep 17 11:02:41 1997 Alexandre Petit-Bianco * typeck.c (build_java_array_type): Temporary use - permanent_obstack to create the array 'length' field. + permanent_obstack to create the array 'length' field. * expr.c (lookup_label): Temporay use permanent_obstack to create - label if not found. + label if not found. * class.c (push_super_field): Tempory use permanent_obstack. Mon Sep 15 11:33:31 1997 Alexandre Petit-Bianco * typeck.c (type_for_mode): Now handles double_type_node and - float_type_node. + float_type_node. * verify.c (verify_jvm_instructions): The instruction following - the wide bytecode is checked. OPCODE_ret added to the list of - wide. + the wide bytecode is checked. OPCODE_ret added to the list of + wide. Thu Sep 11 19:45:18 1997 Alexandre Petit-Bianco * class.c (make_class): Temporary use permanent_obstack. Set the - class CLASS_P field to 1. + class CLASS_P field to 1. (push_class): Temporary use permanent_obstack. (set_super_info): Temporary use permanent_obstack. (add_method): Temporary use permanent_obstack, set - METHOD_TRANSIENT(). + METHOD_TRANSIENT(). (add_field): Temporary use permanent_obstack. Sets - FIELD_VOLATILE() and FIELD_TRANSIENT(). + FIELD_VOLATILE() and FIELD_TRANSIENT(). (build_class_ref): Temporary use permanent_obstack if the class - isn't compiled. + isn't compiled. (build_static_field_ref): Temporary use permanent_obstack when - creating field's rtl. + creating field's rtl. (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT, - ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods + ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods and fields. Function finalized, as far as flag handling. (push_class_static_dummy_field): Temporary use permanent_obstack. (emit_register_class): Force generation of class registration at - -O3 or deeper. + -O3 or deeper. * decl.c (end_java_method): Call permanent_allocation() before returning. * expr.c (can_widen_reference_to): Added comment to interface @@ -11911,7 +11916,7 @@ Thu Sep 11 19:45:18 1997 Alexandre Petit-Bianco (java_push_constant_from_pool): Temporary use permanent_obstack for CONSTANT_string * parse.c (get_ref_constant): Temporary use permanent_obstack to - create constant references. + create constant references. (get_constant): Temporary use permanent_obstack to create constant. (load_class): Temporary use permanent_obstack to load class. (jcf_parse): Temporary use permanent_obstack to perform class @@ -11949,7 +11954,7 @@ Wed Sep 10 16:09:23 1997 Per Bothner (merge_types): Remove unneeded suuport for TYPE_UNUSED. (verify_jvm_instructions): Only reset prev_eh_ranges (to force re-checking possible handlers) after a store (less wasted work). - Check for null handler (finally) before calling add_handler. + Check for null handler (finally) before calling add_handler. Various changes to (finally?) correctly handle try/finally. 1997-09-09 Brendan Kehoe @@ -11977,7 +11982,7 @@ Wed Sep 3 16:13:23 1997 Per Bothner * except.c: Add skeleton for EH code-generation. * verify.c (merge_types): Treat all promoted integral types as equal. * constants.c (build_constants_constructor): To force creation of - current_constant_pool_data_ref, call build_constant_data_ref. + current_constant_pool_data_ref, call build_constant_data_ref. * javaop.def (lload): Fix typo. * jcf-dump.c (main): Clear filename to prevent possibly-bad free. @@ -11998,18 +12003,18 @@ Wed Aug 27 18:33:04 1997 Per Bothner Wed Aug 27 13:26:58 1997 Alexandre Petit-Bianco * expr.c (verify_jvm_instructions): Started a thorough - verification of invoke* bytecodes. + verification of invoke* bytecodes. (expand_byte_code): flush quick stack if PC is the target of a - branch. and undef RET (conflicting with config/i386/i386.h). + branch. and undef RET (conflicting with config/i386/i386.h). (expand_java_arrayload): Fixed bogus cast, when Boolean type is - used. + used. (expand_invoke): Now handles invokeinterface and do more - verification according to the bytecode. + verification according to the bytecode. (lookup_field): Don't try to load the class if processing - dtable_type. + dtable_type. (can_widen_reference_to): Now handles interfaces. * decl.c (init_decl_processing): New global variable - soft_lookupinterfacemethod_node, declared in java-tree.h. + soft_lookupinterfacemethod_node, declared in java-tree.h. Call set_super_info on string_type_node. * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now defined. @@ -12147,7 +12152,7 @@ Tue Aug 5 12:21:27 1997 Alexandre Petit-Bianco (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified to Use The Right Things. (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as - compatible with INT. BOOLEAN is made equivalent to BYTE. + compatible with INT. BOOLEAN is made equivalent to BYTE. (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull, OPCODE_ifnonnull): Now supported. (build_java_athrow): New function. diff --git a/gcc/java/jv-scan.c b/gcc/java/jv-scan.c index e1844e69b1d..8d4ad78b487 100644 --- a/gcc/java/jv-scan.c +++ b/gcc/java/jv-scan.c @@ -239,42 +239,26 @@ DEFUN (main, (argc, argv), void fatal_error VPARAMS ((const char *s, ...)) { -#ifndef ANSI_PROTOTYPES - const char *s; -#endif - va_list ap; - - VA_START (ap, s); - -#ifndef ANSI_PROTOTYPES - s = va_arg (ap, const char *); -#endif + VA_OPEN (ap, s); + VA_FIXEDARG (ap, const char *, s); fprintf (stderr, "%s: error: ", exec_name); vfprintf (stderr, s, ap); fputc ('\n', stderr); - va_end (ap); + VA_CLOSE (ap); exit (1); } void warning VPARAMS ((const char *s, ...)) { -#ifndef ANSI_PROTOTYPES - const char *s; -#endif - va_list ap; - - VA_START (ap, s); - -#ifndef ANSI_PROTOTYPES - s = va_arg (ap, const char *); -#endif + VA_OPEN (ap, s); + VA_FIXEDARG (ap, const char *, s); fprintf (stderr, "%s: warning: ", exec_name); vfprintf (stderr, s, ap); fputc ('\n', stderr); - va_end (ap); + VA_CLOSE (ap); } void diff --git a/gcc/java/parse.y b/gcc/java/parse.y index 97efb5b0d1c..90a2dd12891 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -3085,19 +3085,11 @@ issue_warning_error_from_context (cl, msg, ap) void parse_error_context VPARAMS ((tree cl, const char *msg, ...)) { -#ifndef ANSI_PROTOTYPES - tree cl; - const char *msg; -#endif - va_list ap; - - VA_START (ap, msg); -#ifndef ANSI_PROTOTYPES - cl = va_arg (ap, tree); - msg = va_arg (ap, const char *); -#endif + VA_OPEN (ap, msg); + VA_FIXEDARG (ap, tree, cl); + VA_FIXEDARG (ap, const char *, msg); issue_warning_error_from_context (cl, msg, ap); - va_end (ap); + VA_CLOSE (ap); } /* Issue a warning at a current source line CL */ @@ -3105,22 +3097,14 @@ parse_error_context VPARAMS ((tree cl, const char *msg, ...)) static void parse_warning_context VPARAMS ((tree cl, const char *msg, ...)) { -#ifndef ANSI_PROTOTYPES - tree cl; - const char *msg; -#endif - va_list ap; - - VA_START (ap, msg); -#ifndef ANSI_PROTOTYPES - cl = va_arg (ap, tree); - msg = va_arg (ap, const char *); -#endif + VA_OPEN (ap, msg); + VA_FIXEDARG (ap, tree, cl); + VA_FIXEDARG (ap, const char *, msg); force_error = do_warning = 1; issue_warning_error_from_context (cl, msg, ap); do_warning = force_error = 0; - va_end (ap); + VA_CLOSE (ap); } static tree -- 2.30.2