aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/parse.h
AgeCommit message (Collapse)AuthorFilesLines
2003-10-09stmt.c (resolve_asm_operand_names): Call check_unique_operand_names here.Jason Merrill1-1/+1
* stmt.c (resolve_asm_operand_names): Call check_unique_operand_names here. (expand_asm_operands): Not here. (parse_input_constraint): No longer static. * tree.h: Declare it. * coverage.c (build_ctr_info_value): Use build_decl to make a VAR_DECL. (create_coverage): Likewise. java/ * parse.y (patch_assignment): Use make_node to create a BLOCK. * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a POINTER_TYPE. cp/ * tree.c (build_cplus_new): Use build_decl to create a VAR_DECL. (build_target_expr_with_type): Likewise. * pt.c (instantiate_class_template): Sanity check that our enclosing class has been instantiated. From-SVN: r72255
2003-09-03decl.c (java_expand_body): New function.Jeff Sturm1-0/+1
* decl.c (java_expand_body): New function. * expr.c (build_class_init): Set DECL_IGNORED_P. * java-tree.h (start_complete_expand_method, java_expand_body): Declare. * jcf-parse.c (cgraph.h): Include. (java_parse_file): Handle flag_unit_at_a_time. * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING, LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define. (java_estimate_num_insns): Use walk_tree_without_duplicates. (java_start_inlining): New function. * parse.h (java_finish_classes): Declare. * parse.y: Include cgraph.h. (block): Don't special-case empty block production. (craft_constructor): Set DECL_INLINE. (source_end_java_method): Handle flag_unit_at_a_time. Replace inline code with call to java_expand_body. (start_complete_expand_method): Remove static modifier. (java_expand_method_bodies): Patch function tree for class initialization and/or synchronization as needed. Don't begin RTL expansion yet. (java_expand_classes): Check flag_unit_at_a_time before calling finish_class. (java_finish_classes): New function. (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type. (patch_assignment): Set DECL_CONTEXT on temporary variable. (emit_test_initialization): Set DECL_IGNORED_P. From-SVN: r71024
2003-06-09tree-inline.c (expand_call_inline): DECL_SOURCE_LINE_FIRST is removed.Nathan Sidwell1-8/+0
* tree-inline.c (expand_call_inline): DECL_SOURCE_LINE_FIRST is removed. * java/java-tree.h (DECL_FUNCTION_LAST_LINE): New. (struct lang_decl_func): Add last_line field. * java/parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST, DECL_SOURCE_LINE_LAST): Remove. * java/parse.y (missing_return_error, finish_method_declaration, lookup_cl, start_artificial_method_body, source_end_java_method, start_complete_expand_method): Adjust. From-SVN: r67661
2003-05-01input.h (lineno): Rename to ...Nathan Sidwell1-1/+1
* input.h (lineno): Rename to ... (input_line): ... here. * tree.h (lineno): Rename to ... (input_line): ... here. * scan.h (lineno): Rename to ... (input_line): ... here. * toplev.c (lineno): Rename to ... (input_line): ... here. (push_srcloc, pop_srcloc): Rename lineno to input_line. * c-common.c (c_expand_start_cond, fname_decl): Likewise. * c-decl.c (poplevel, pop_label_level, lookup_label, lookup_tag, store_parm_decls, c_expand_body_1): Likewise. * c-errors.c (pedwarn_c99): Likewise. * c-format.c (status_warning): Likewise. * c-lex.c (fe_file_change, cb_def_pragma, c_lex): Likewise. * c-opts.c (c_common_post_options, c_common_parse_file): Likewise. * c-parse.in (save_filename, maybe_type_qual, ifc): Likwise. * c-semantics.c (finish_stmt_tree, build_stmt, emit_local_var, gentrtl_goto_stmt, genrtl_expr_stmt_value, genrtl_decl_stmt, genrtl_if_stmt, genrtl_while_stmt, genrtl_do_stmt, genrtl_return_stmt, genrtl_for_stmt, build_break_stmt, build_continue_stmt, genrtl_switch_stmt, genrtl_asm_stmt, prep_stmt, find_reachable_label, expand_unreachable_stmt): Likewise. * coverage.c (create_coverage): Likewise. * diagnostic.c (pedwarn, sorry, error, fatal_error, internal_error, warning, diagnostic_report_current_module, inform): Likewise. * expr.c (expand_expr): Likewise. * integrate.c (expand_inline_function, output_inline_function): Likewise. * rtl-error.c (file_and_line_for_asm): Likewise. * tree-inline.c (find_alloca_call, find_builtin_longjmp_call, walk_tree): Likewise. * tree.c (make_node): Likewise. * ada, cp, f, java, objc, treelang: Likewise. ada * trans.c (build_unit_elab, set_lineno): Rename lineno to input_line. * utils.c (pushdecl, create_label_decl, begin_subprog_body, end_subprog_body): Likewise. * utils2.c (build_call_raise): Likewise. cp * class.c (finish_struct): Rename lineno to input_line. * decl.c (push_binding_level, pop_binding_level, suspend_binding_level, resume_binding_level, make_label_decl, use_label, start_function): Likewise. * decl2.c (warn_if_unknown_interface, start_static_initialization_or_destruction, generate_ctor_or_dtor_function, finish_file): Likewise. * error.c (cp_line_of, print_instantiation_full_context, print_instantiation_context): Likewise. * except.c (check_handlers_1, check_handlers): Likewise. * init.c (create_temporary_var): Likewise. * method.c (use_thunk, synthesize_method): Likewise. * parser.c (cp_lexer_set_source_position_from_token, cp_lexer_get_preprocessor_token): Likewise. * pt.c (push_tinst_level, pop_tinst_level, tsubst_friend_function, instantiate_class_template, tsubst_decl, tsubst, tsubst_expr, instantiate_decl): Likewise. * semantics.c (genrtl_try_block, finish_label_stmt, begin_class_definition, expand_body, genrtl_finish_function): Likewise. * tree.c (build_min_nt, build_min): Likewise. f * ansify.c (die_unless): Rename lineno to input_line. * com.c (ffecom_subscript_check_, ffecom_do_entry_, ffecom_gen_sfuncdef_, ffecom_start_progunit_, ffecom_sym_transform_, ffecom_sym_transform_assign_, bison_rule_pushlevel_, bison_rule_compstmt_, finish_function, store_parm_decls): Likewise. * intrin.c (ffeintrin_fulfill_generic): Likewise. * lex.c (ffelex_hash_, ffelex_include_, ffelex_next_line_, ffelex_file_fixed, ffelex_file_free): Likewise. * std.c (ffestd_exec_end): Likewise. * ste.c (ffeste_emit_line_note_, ffeste_start_block_, ffeste_start_stmt_): Likewise. * ste.h (ffeste_filelinenum, ffeste_set_line): Likewise. java * lex.h (lineno): Rename to ... (input_line): ... here * parse-scan.y (lineno): Rename to ... (input_line): ... here. (reset_report): Rename lineno to input_line. * check-init.c (check_init): Likewise. * class.c (push_class): Likewise. * decl.c (complete_start_java_method, end_java_method): Likewise. * expr.c (expand_byte_code): Likewise. * jcf-parse.c (give_name_to_class, parse_class_file): Likewise. * jcf-write.c (generate_bytecode_insns): Likewise. * lex.c (java_init_lex, java_allocate_new_line, do_java_lex): Likewise. * parse.h (YYNOT_TWICE): Likewise. * parse.y (empty_statement, expression_statement, java_pop_parser_context, java_parser_context_save_global, yyerror, register_fields, method_header, safe_layout_class, find_in_imports_on_demand, create_artificial_method, source_end_java_method, start_complete_expand_method, build_thisn_assign, java_complete_lhs, maybe_absorb_scoping_block): Likewise. objc * objc-act.c (objc_init): Rename lineno to input_line. (build_module_descriptor, build_selector_translation_table, build_protocol_template, build_method_prototype_list_template, build_category_template, build_selector_table, build_class_template, build_super_template, build_ivar_template, build_ivar_list_template, build_method_list_template, build_method_template, add_instance_variable): Likewise. treelang * tree1.c (treelang_init): Rename lineno to input_line. From-SVN: r66333
2003-02-24lang-options.h: Added -Wdeprecated.Tom Tromey1-0/+8
* lang-options.h: Added -Wdeprecated. * gcj.texi (Warnings): Document -Wdeprecated. * java-tree.h (flag_deprecated): Declare. * lang.c (lang_W_options): Added deprecated. (flag_deprecated): New global. * chartables.h: Rebuilt. * gen-table.pl (process_one): Look at whitespace. (print_tables): Define LETTER_SPACE, LETTER_MASK. * parse.h (CLEAR_DEPRECATED): New macro. (CHECK_DEPRECATED_NO_RESET): New macro. * jcf-parse.c (handle_deprecated): New function. (HANDLE_DEPRECATED_ATTRIBUTE): New define. * jcf-reader.c (get_attribute): Handle Deprecated attribute. * parse.y (resolve_type_during_patch): Check deprecation. (jdep_resolve_class): Likewise. (process_imports): Likewise. (resolve_expression_name): Likewise. (check_deprecation): Strip arrays from decl. Check flag_deprecated. (patch_method_invocation): Also check the particular constructor for deprecation. (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop. * jcf-write.c (append_deprecated_attribute): New function. (generate_classfile): Generate deprecated attribute when appropriate. * lex.c (java_parse_doc_section): Return type now void. Rewrote. (java_lex) [case '*']: Simplify logic. (java_start_char_p): Use LETTER_MASK. (java_part_char_p): Likewise. (java_space_char_p): New function. From-SVN: r63350
2003-01-10Merge from pch-branch.Geoffrey Keating1-19/+14
From-SVN: r61136
2003-01-09* All Files: Remove PARAMS macro.Kaveh R. Ghazi1-21/+21
From-SVN: r61133
2003-01-01Make-lang.in, [...]: Replace "GNU CC" with "GCC" in the copyright header.Steven Bosscher1-5/+6
* Make-lang.in, boehm.c, buffer.c, buffer.h, builtins.c, class.c, config-lang.in, constants.c, convert.h, decl.c, except.c, expr.c, java-except.h, java-tree.h, javaop.def, jcf-parse.c, jcf-write.c, jv-scan.c, jvgenmain.c, jvspec.c, keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c, lex.c, lex.h, mangle.c, mangle_name.c, parse-scan.y, parse.h, parse.y, typeck.c, verify.c, xref.c, xref.h: Replace "GNU CC" with "GCC" in the copyright header. * check-init.c, gjavah.c, javaop.h, jcf-depend.c, jcf-dump.c, jcf-io.c, jcf-path.c, jcf-reader.c, jcf.h, zextract.c, zipfile.h: These files are "part of GCC". Also say "GCC" not "GNU CC". From-SVN: r60747
2002-08-04Index: ChangeLogGeoffrey Keating1-1/+0
2002-08-04 Geoffrey Keating <geoffk@redhat.com> * Makefile.in (sdbout.o): Doesn't need $(OBSTACK_H). * collect2.h (permanent_obstack): Delete declaration. * collect2.c (permanent_obstack): Delete definition. (main): Don't initialise permanent_obstack. Use xstrdup instead. * expr.c: Don't include obstack.h. (permanent_obstack): Delete declaration. * function.c: Don't include obstack.h. (permanent_obstack): Delete declaration. * integrate.c: Don't include obstack.h. (function_maybepermanent_obstack): Delete declaration. * print-tree.c (debug_tree): Use x*alloc not permalloc. * sdbout.c (gen_fake_label): Use x*alloc not permalloc. * tlink.c (pfgets): Use xstrdup not permanent_obstack. * toplev.c (lang_independent_init): Rename init_obstacks to init_ttree. * tree.h: Rename init_obstacks to init_ttree. Remove declarations of permalloc, expralloc, perm_calloc. * tree.c (permanent_obstack): Delete definition. (init_ttree): Rename from init_obstacks. (permalloc): Delete. (perm_calloc): Delete. (dump_tree_statistics): Don't print information about permanent_obstack. * varasm.c (assemble_start_function): Use xstrdup instead of permalloc/strcpy. (assemble_variable): Likewise. * config/alpha/alpha.c (unicosmk_need_dex): Use xmalloc instead of permalloc. (unicosmk_add_extern): Likewise. * config/c4x/c4x.c (c4x_external_ref): Likewise. (c4x_global_label): Likewise. * config/frv/frv.c (frv_encode_section_info): Likewise. * config/i386/winnt.c (i386_pe_record_external_function): Likewise. (i386_pe_record_exported_symbol): Likewise. * config/mips/mips.c (mips_output_external): Likewise. (mips_output_external_libcall): Likewise. * config/pa/pa.c: (permanent_obstack): Delete declaration. (output_call): Use ggc_strdup instead of allocating on permanent_obstack. * config/romp/romp.c: Include ggc.h. (get_symref): Don't declare permanent_obstack, use ggc_strdup intead of permanent_obstack. * config/rs6000/aix31.h (ASM_OUTPUT_EXTERNAL): Use concat instead of permalloc. * config/rs6000/rs6000.c (rs6000_gen_section_name): Use xmalloc instead of permalloc * config/rs6000/xcoff.h (ASM_OUTPUT_EXTERNAL): Use concat instead of permalloc. * config/vax/vax.c (vms_check_external): Use xmalloc instead of permalloc. Index: cp/ChangeLog 2002-08-04 Geoffrey Keating <geoffk@redhat.com> * cvt.c (ocp_convert): Delete obsolete code. * parse.y (permanent_obstack): Delete declaration. * pt.c (permanent_obstack): Delete declaration. * repo.c (permanent_obstack): Delete declaration. (open_repo_file): Use xmalloc instead of permanent_obstack. (init_repo): Use xstrdup instead of permanent_obstack. Index: java/ChangeLog 2002-08-04 Geoffrey Keating <geoffk@redhat.com> * class.c: (permanent_obstack): Delete declaration. * constants.c: (permanent_obstack): Delete declaration. * except.c: (permanent_obstack): Delete declaration. * expr.c: (permanent_obstack): Delete declaration. * jcf-parse.c: (permanent_obstack): Delete declaration. (saveable_obstack): Delete declaration. * parse.h: (permanent_obstack): Delete declaration. * typeck.c: (permanent_obstack): Delete declaration. From-SVN: r56035
2002-04-17re PR java/6294 (private inner interface is flagged illegal)Bryce McKinlay1-1/+2
Fix for PR java/6294: * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner interfaces. From-SVN: r52411
2002-03-26re PR java/5942 (tree check failure when compiling Classpath with strictfp ↵Tom Tromey1-1/+1
StrictMath class) Fix for PR java/5942: * parse.y (init_src_parse): Added sanity check. * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12 elements, not 11. From-SVN: r51398
2002-02-18java-tree.h (TYPE_STRICTFP): New macro.Tom Tromey1-4/+5
* java-tree.h (TYPE_STRICTFP): New macro. (struct lang_type) [strictfp]: New field. (CLASS_STRICTFP): New macro. (METHOD_STRICTFP): New macro. (struct lang_decl) [strictfp]: New field. * parse.y (method_header): Disallow strictfp constructor or abstract method. (STRICT_TK): Move before MODIFIER_TK. * parse.h (CLASS_MODIFIERS): Added ACC_STRICT. (METHOD_MODIFIERS): Likewise. (INTERFACE_MODIFIERS): Likewise. * jcf-write.c (get_access_flags): Likewise. * class.c (set_class_decl_access_flags): Recognize ACC_STRICT. (add_method_1): Likewise. (get_access_flags_from_decl): Likewise. * jcf-dump.c (print_access_flags): Print in standard order. Also, recognize strictfp flag. * jcf.h (ACC_STRICT): New define. From-SVN: r49834
2001-12-16ChangeLog, [...]: Fix spelling errors.Joseph Myers1-1/+1
* ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h, jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix spelling errors. From-SVN: r48075
2001-11-20parse.h (java_expand_switch): Remove old prototype.Roger Sayle1-1/+0
2001-11-18 Roger Sayle <roger@eyesopen.com> * parse.h (java_expand_switch): Remove old prototype. From-SVN: r47221
2001-11-08parse.y (trap_overflow_corner_case): New rule.Tom Tromey1-2/+5
* parse.y (trap_overflow_corner_case): New rule. (unary_expression): Use it. * lex.c (java_init_lex): Don't set minus_seen. (yylex): Don't use minus_seen. Communicate overflow to parser for it to handle. (error_if_numeric_overflow): New function. * parse.h (minus_seen): Removed field. (JAVA_RADIX10_FLAG): New define. From-SVN: r46846
2001-10-25mangle.c (static tree compression_table): Fixed leading comment.Alexandre Petit-Bianco1-1/+1
2001-10-24 Alexandre Petit-Bianco <apbianco@redhat.com> * mangle.c (static tree compression_table): Fixed leading comment. * parse.h (struct parser_ctxt): Fixed field comment. * parse.y (check_pkg_class_access): New prototype, fixed leading comment, new parameter used to emit error only if passed as true. (parse_check_super): Pass extra argument to check_pkg_class_access. (do_resolve_class): Likewise. (process_imports): Likewise. (read_import_dir): Fixed indentation. (find_in_imports_on_demand): New local class_type_name. Local node_to_use deleted. while loop changed into for loop. Report multiple definition only for accessible classes. Improved error message. (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS assigned to parameter list, fixed indentation. while loop changed into for loop, restore TREE_CHAIN on local `tem' before the next iteration. ( http://gcc.gnu.org/ml/gcc-patches/2001-10/msg01323.html ) From-SVN: r46498
2001-09-21parse.h: (WFL_STRIP_BRACKET): Re-written using build_type_name_from_array_name.Alexandre Petit-Bianco1-18/+28
2001-09-19 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.h: (WFL_STRIP_BRACKET): Re-written using build_type_name_from_array_name. (STRING_STRIP_BRACKETS): New macro. * parse.y (build_type_name_from_array_name): New function. (array_creation_expression:): Accumulate []s instead of [s. (cast_expression:): Accumulate []s instead of [s after cast type name. (build_array_from_name): Local string deleted, use build_type_name_from_array_name. (build_unresolved_array_type): Accumulate []s instead of [s after type name. (register_fields): Fixed comment. (resolve_class): Local name, base deleted, new locals tname and array_dims. Use build_type_name_from_array_name. Use array_dims to build array type. (purify_type_name): Use STRING_STRIP_BRACKETS. ( http://gcc.gnu.org/ml/gcc-patches/2001-09/msg00779.html ) From-SVN: r45732
2001-09-11* parse.h (ctxp_for_generation): Mark extern.Richard Henderson1-1/+1
From-SVN: r45552
2001-07-31[multiple changes]Alexandre Petit-Bianco1-1/+1
2001-07-18 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (create_interface): Avoid cyclic inheritance report when syntax error encountered during class definition. Fixes PR java/2956 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.' * parse.y (check_class_interface_creation): Allow `private' if the enclosing is not an interface. (create_interface): Interface tagged public if the enclosing context is an interface. (create_class): Class tagged public if the enclosing context is an interface. Fixes PR java/2959 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com> * class.c (push_class): Set DECL_SIZE to `integer_zero_node.' Fixes PR java/2665 2001-07-13 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset TREE_CONSTANT_OVERFLOW of CASE_EXPR value. Fixes PR java/3602 (http://gcc.gnu.org/ml/gcc-patches/2001-07/msg02297.html ) From-SVN: r44524
2001-07-11[multiple changes]Alexandre Petit-Bianco1-2/+5
2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com> * lang-specs.h: Forbit the use if `-femit-class-file{s}' without `-fsyntax-only.' Fixes PR java/3248 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com> * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the current function is static. Fixes PR java/1970 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (patch_method_invocation): Add enclosing context to ctor calls if necessary. Fixes PR java/2953 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (resolve_package): Abort if qualified expression member isn't right. (qualify_ambiguous_name): Don't qualify as type if `this' in use. Fixes PR java/1391 (http://gcc.gnu.org/ml/gcc-patches/2001-07/msg00701.html ) From-SVN: r43927
2001-05-25Standardize header guards.Richard Henderson1-3/+4
From-SVN: r42615
2001-05-01* parse.h (REGISTER_IMPORT): Use tree_cons instead of chainon.Per Bothner1-2/+1
From-SVN: r41741
2001-03-28IA-64 ABI Exception Handling.Richard Henderson1-8/+0
From-SVN: r40924
2001-03-28java-tree.h (throw_node): Define as a single member of java_global_trees ↵Richard Henderson1-7/+7
instead of a separate array. * java-tree.h (throw_node): Define as a single member of java_global_trees instead of a separate array. (JTI_THROW_NODE): New. * decl.c (throw_node): Don't declare. (init_decl_processing): Init a scalar throw_node. Don't register it for gc. * check-init.c (check_init): Reference scalar throw_node. * expr.c (build_java_athrow): Likewise. * jcf-write.c (generate_bytecode_insns): Likewise. * parse.h (BUILD_THROW): Likewise. From-SVN: r40922
2001-03-27Make -fsjlj-exceptions a configure option.Richard Henderson1-1/+1
From-SVN: r40905
2001-03-27c-common.h (DECL_NUM_STMTS): New macro.Mark Mitchell1-1/+1
* c-common.h (DECL_NUM_STMTS): New macro. * c-decl.c (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE. (pushdecl): Likewise. * c-semantics.c (add_stmt): Update DECL_NUM_STMTS. * integrate.c (expand_inline_function): Don't check DECL_FRAME_SIZE. * print-tree.c (print_node): Don't print it. * toplev.c (rest_of_compilation): Don't try to inline when flag_no_inline is on. * tree.h (DECL_FRAME_SIZE): Remove. (tree_decl): Adjust accordingly. * Makefile.in (optimize.o): Depend on params.h. (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE. (init_decl_processing): Set flag_no_inline when doing inlining-on-trees. * optimize.c: Include params.h. (struct inline_data): Improve documentation of FNS. Add FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P. (INSNS_PER_STMT): New macro. (remap_block): Use CLONING_P. (inlinable_function_p): Don't inline big functions. (expand_call_inline): Keep track of how much inlining we've done. (optimize_function): Set FIRST_INLINED_FN. (maybe_clone_body): Set CLONING_P. * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in tree nodes. (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling rest_of_compilation. Clear DECL_RTL for local variables afterwards. (clear_decl_rtl): New function. * com.c (duplicate_decls): Don't copy DECL_FRAME_SIZE. * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE. From-SVN: r40859
2001-03-17parse.h (JDEP_SOLV): Removed.Per Bothner1-1/+0
* parse.h (JDEP_SOLV): Removed. * parse.y (incomplete_class_list): Removed. (register_incomplete_type): Use JDEP_TO_RESOLVE instead of JDEP_SOLV. * parse.y (obtain_incomplete_type): Removed. It doesn't work if resolve_class changes the name of an array type that is on the list and then someone else looks for the modified name. Also, seems liable to break when compiling multiple source files at once. So the simplest is to just remove incomplete_class_list - it is only a minor space win and it is not even clear it saves time. * parse.y (resolve_class): Remove unneeded promote_type. From-SVN: r40584
2001-03-15java-tree.h (BLOCK_IS_IMPLICIT): New flag.Per Bothner1-4/+0
* java-tree.h (BLOCK_IS_IMPLICIT): New flag. * parse.h (BLOCK_EXPR_ORIGIN): Removed macro. * parse.y (declare_local_variables, maybe_absorb_scoping_blocks): Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN. From-SVN: r40542
2001-02-23Handle compiling multiple input files at once, and @FILE syntax.Per Bothner1-4/+3
* gcj.texi: Updated documentation to match. and parse.h inadvertently left out from previous check-in. From-SVN: r40026
2001-02-04diagnostic.h (set_internal_error_function): Renamed.Richard Kenner1-2/+2
* diagnostic.h (set_internal_error_function): Renamed. * toplev.h (internal_error): Renamed from fatal. (pfatal_with_name): Deleted. (fatal_io_error): Now has printf-style arguments. * diagnostic.c (pfatal_with_name): Deleted. (fatal_io_error): Rework to have args in printf-style. (set_internal_error_function): Renamed from set_fatal_function. (internal_error): Renamed from fatal. (error_recursion, fancy_abort): Call internal_error instead of fatal. * dwarf2out.c (get_cfa_from_loc_descr): Likewise. * emit-rtl.c (gen_realpart, gen_imagpart): Likewise. * expr.c (check_max_integer_computation_mode, expand_expr): Likewise. * flow.c (verify_flow_info): Likewise. * config/arm/arm.c (thumb_unexpanded_epilogue): Likewise. * config/mips/mips.c (save_restore_insns): Likewise. * cp/init.c (build_java_class_ref): Likewise. (dsp16xx_reg_class_from_letter): Likewise. (limit_reload_class, double_reg_to_memory): Likewise. (print_operand_address, emit_1600_code_shift): Likewise. (gen_tst_reg, gen_compare_reg): Likewise. * config/m68hc11/m68hc11.c (m68hc11_emit_libcall): Likewise. * cp/decl.c (pushdecl): Likewise. * java/check-init.c (check_init): Likewise. * java/expr.c (java_lang_expand_expr): Likewise. * java/jcf-parse.c (get_constant): Likewise. * java/mangle.c (java_mangle_decl): Likewise. * java/parse.y (make_nested_class_name, java_complete_lhs): Likewise. (operator_string): Likewise. * except.c (duplicate_eh_handlers): Call abort instead of fatal. * flow.c (verify_flow_info): Likewise. * ch/convert.c (convert): Likewise. * ch/except.c (pop_handler, chill_check_no_handlers): Likewise. * ch/expr.c (chill_expand_expr): Likewise. * ch/parse.c (peek_token_, pushback_token, require): Likewise. * config/arm/arm.c (thumb_load_double_from_address): Likewise. * config/avr/avr.c (pttreg_to_str, unique_section): Likewise. (avr_normalize_condition): Likewise. * config/c4x/c4x.c (c4x_emit_libcall, c4x_valid_operands): Likewise. * config/dsp16xx/dsp16xx.c (dsp16xx_reg_class_from_letter): Likewise. (limit_reload_class, double_reg_to_memory): Likewise. (print_operand_address, emit_1600_code_shift): Likewise. (gen_tst_reg, gen_compare_reg): Likewise. * config/m68hc11/m68hc11.c (m68hc11_emit_libcall): Likewise. * cp/decl.c (pushdecl): Likewise. * java/check-init.c (check_init): Likewise. * java/class.c (build_class_ref): Likewise. * java/constants.c (write_constant_pool): Likewise. * java/decl.c (start_java_method): Likewise. * java/expr.c (push_type, java_stack_pop, java_stack_swap): Likewise. (java_stack_dup, encode_newarray_type): Likewise. (build_java_array_length_access): Likewise. (build_java_check_indexed_type, expand_java_pushc): Likewise. (build_java_soft_divmod, build_invokeinterface): Likewise. * java/java-tree.h (INNER_CLASS_P): Likewise. * java/jcf-parse.c (parse_signature, get_name_constant): Likewise. (give_name_to_class, get_class_constant): Likewise. * java/jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise. (find_constant_index, generate_bytecode_conditional): Likewise. (generate_bytecode_insns, perform_relocations): Likewise. * java/lex.c (java_unget_unicode, java_lex): Likewise. * java/mangle.c (mangle_type, mangle_record_type): Likewise. (mangle_pointer_type, mangle_array_type, init_mangling): Likewise. (finish_mangling): Likewise. * java/parse.h (MARK_FINAL_PARMS): Likewise. * java/parse.y (pop_current_osb, unreachable_stmt_error): Likewise. (obtain_incomplete_type, java_complete_class): Likewise. (java_check_regular_methods, java_complete_expand_method): Likewise. (cut_identifier_in_qualified, check_deprecation): Likewise. (patch_invoke, find_applicable_accessible_methods_list): Likewise. (java_complete_lhs, lookup_name_in_blocks): Likewise. (check_final_variable_indirect_assignment, build_unaryop): Likewise. * java/typeck.c (set_local_type, parse_signature_type): Likewise. (parse_signature_string, build_java_signature): Likewise; (set_java_signature): Likewise. * java/verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise. * c-parse.in (methoddef): Call fatal_error instead of fatal. * objc/objc-act.c (build_ivar_chain): Likewise. * cp/except.c (decl_is_java_type): Likewise. * cp/init.c (build_java_class_ref): Likewise. * cp/init.c (build_new_1): Likewise. * f/com.c (ffecom_init_0): Likewise. * java/class.c (add_method, build_static_field_ref): Likewise. * java/expr.c (build_known_method_ref, expand_invoke): Likewise. * java/jcf-parse.c (get_constant, jcf_parse): Likewise. * java/lex.c (java_new_new_lexer): Likewise. * java/jv-scan.c (main): Likewise. (fatal_error): Renamed from fatal. * dwarfout.c (dwarfout_init): Call fatal_io_error instead of pfatal_with_name. * graph.c (clean_graph_dump_file): Likewise. * profile.c (init_branch_prob): Likewise. * ch/grant.c (write_grant_file): Likewise. * ch/lex.c (init_parse, same_file, yywrap): Likewise. * f/com.c (init_parse): Likewise. * java/jcf-parse.c (yyparse): Likewise. * objc/objc-act.c (objc_init): Likewise. * java/jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal. (yyparse): Likewise. * java/jcf-write.c (make_class_file_name, write_classfile): Likewise. * java/lex.c (java_get_line_col): Likewise. * hash.c (hash_allocate): Don't check for failure returns from obstack functions that can't fail. (hash_table_init_n, hash_table_init): Likewise; also now return void. * hash.h (hash_table_init_n, hash_table_init): Now return void. * cp/decl.c (build_typename_type): hash_table_init now returns void. * ch/lang.c (GNU_xref_begin, GNU_xref_end): Deleted. * ch/lex.c (convert_bitstring): Delete check for alloca failure. * config/dsp16xx/dsp16xx.c (dsp16xx_invalid_register_for_compare): Deleted. * config/dsp16xx/dsp16xx.md (unnamed cmphi): Call abort instead of it. * f/com.c (ffecom_decode_include_option_): Make errors non-fatal. * f/lex.c (ffelex_cfelex_, ffelex_get_directive_line_): Likewise. (ffelex_hash_): Likewise. * config/arm/arm.c (arm_override_options): Likewise. * config/avr/avr.c (avr_override_options): Likewise. * config/c4x/c4x.c (c4x_expand_prologue): Likewise. * config/dsp16xx/dsp16xx.c (function_prologue): Likewise. * config/h8300/h8300.c (h8300_init_once): Likewise. * config/mips/mips.c (override_options): Likewise. * config/i386/i386.c (override_options): Likewise, rework. * config/m68k/m68k.c (override_options): Likewise. * cp/decl.c (init_decl_processing): Likewise. * java/jcf-parse.c (load_class): Likewise. * config/dsp16xx/dsp16xx.c (print_operand): Call output_operand_lossage instead of fatal. * config/mips/mips.c (print_operand): Likewise. * java/lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV. * objc/objc_act.c (objc_check_decl): Remove unneeded fatal call. (get_object_reference): Likewise. From-SVN: r39443
2001-01-25ChangeLog (2001-01-21): Fixed typo.Alexandre Petit-Bianco1-4/+0
2001-01-25 Alexandre Petit-Bianco <apbianco@cygnus.com> * ChangeLog (2001-01-21): Fixed typo. * class.c (layout_class_method): Code accounting for WFLed method DECL_NAMEs deleted. * constant.c (find_methodref_index): Likewise. * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl. * java-tree.h (DECL_FUNCTION_WFL): New macro. (struct lang_decl): New field `wfl'. (java_get_real_method_name): Prototype deleted. * mangle.c (mangle_method_decl): Code accounting for WFLed method DECL_NAMEs deleted. * parse.h (GET_METHOD_NAME): Macro deleted. * parse.y (reset_method_name): Deleted. (method_header): Set DECL_FUNCTION_WFL. (check_abstract_method_header): Code accounting for WFLed method DECL_NAMEs deleted. (java_get_real_method_name): Deleted. (check_method_redefinition): Code accounting for WFLed method DECL_NAMEs deleted. Use DECL_FUNCTION_WFL. (java_check_regular_methods): Likewise. (java_check_abstract_methods): Likewise. (java_expand_classes): Don't call `reset_method_name.' (search_applicable_method_list): Use DECL_NAMEs instead of GET_METHOD_NAME. * typeck.c (lookup_do): Code accounting for WFLed method DECL_NAMEs deleted. (http://gcc.gnu.org/ml/gcc-patches/2001-01/msg01954.html) From-SVN: r39274
2000-11-21[multiple changes]Alexandre Petit-Bianco1-1/+6
2000-10-31 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (outer_field_access_p): Inherited fields aren't consider outer fields. (maybe_build_thisn_access_method): Use PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P. (resolve_expression_name): Trigger an error if a static field is being accessed as an outer field. 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in scope. (http://gcc.gnu.org/ml/gcc-patches/2000-11/msg01217.html) From-SVN: r37645
2000-10-21Warning fixes:Kaveh R. Ghazi1-1/+5
* gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define * jcf-reader.c (peek_attribute, skip_attribute): Only define when requested. * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN. * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void. From-SVN: r36994
2000-10-13Remove obstacks.Mark Mitchell1-5/+13
* Makefile.in (ggc-callbacks.o): Remove target. (flow.o): Depend on GGC_H. * alias.c (init_alias_analysis): Remove ggc_p conditionals. (end_alias_analysis): Likewise. * basic-block.h (init_flow): New function. (allocate_reg_life_data): Declare. * bb-reorder.c (function_obstack): Replace with ... (flow_obstack): ... new variable. (fixup_reorder_chain): Use it. * c-decl.c (ggc_p): Remove. (caller-save.c): Don't call oballoc/obfree. * combine.c (struct undobuf): Remove storage. (try_combine): Don't call oballoc. (undo_all): Don't call obfree. * cse.c (insert): Use xmalloc, not oballoc. (cse_main): Adjust accordingly. * dwarf2out.c (save_rtx): Remove obstack code. (dwarf2out_init): Remove ggc_p conditionals. * emit-rtl.c (rtl_obstack): Remove. (gen_rtx_CONST_INT): Remove ggc_p conditionals. (make_insn_raw): Likewise. (emit_insn_before): Likewise. (emit_insn_after): Likewise. (emit_insn): Likewise. (gen_sequence): Likewise. (copy_insn_1): Remove handling of `b' RTL components. (init_emit_once): Remove ggc_p conditionals. * except.c (create_rethrow_ref): Don't fool with obstacks. (add_partial_entry): Likewise. (call_get_eh_context): Likewise. (begin_protect_partials): Likewise. (protect_with_terminate): Likewise. * explow.c (plus_constant_wide): Likewise. * expr.c (init_expr_once): Likewise. (emit_block_move): Likewise. (clear_storage): Likewise. (expand_expr): Likewise. * flow.c (function_obstack): Remove. (flow_obstack): New variable. (flow_firstobj): Likewise. (create_base_block): Use the flow_obstack. (split_block): Likewise. (split_edge): Likewise. (calculate_global_regs_live): Likewise. (allocate_bb_life_data): Make it static. Likewiwse. (init_flow): New function. (size_int_type_wide): Remove ggc_p conditionals. * function.c (push_function_context_to): Don't call save_tree_status. (pop_function_context_from): Or restore_tree_status. (assign_stack_local_1): Don't call push_obstacks. (find_fixup_replacement): Use xmalloc. (fixup_var_refs_insns): Free the storage. (insns_for_mem_walk): Don't mess with obstacks. (instantiate_decls): Likewise. (trampoline_address): Likewise. (expand_function_end): Likewise. * function.h (sturct function): Remove obstack-related variables. (save_tree_status): Don't declare. (restore_tree_status): Likewise. * gcse.c (compute_can_copy): Don't call oballoc/obfree. * genattrtab.c (operate_exp): Remove ggc_p conditionals. (simplify_cond): Likewise. (simplify_test_exp): Don't mess with obstacks. (optimize_attrs): Likewise. * gengenrtl.c (gendef): Don't include ggc_p conditionals. * ggc-callbacks.c (ggc_p): Remove. * ggc-none.c (ggc_p): Remove. * ggc.h (ggc_p): Don't declare. * integrate.c (save_for_inline): Don't mess with obstacks. (integrate_decl_tree): Likewise. (output_inline_function): Likewise. * lists.c (init_EXPR_INSN_LIST_cache): Likewise. * loop.c (temp_obstack): Remove. (rtl_obstack): Likewise. (init_loop): Don't mess with obstacks. (reg_address_cost): Free BIVs and GIVs. (check_insns_for_bivs): Use xmalloc, not oballoc. (find_mem_givs): Likewise. (record_biv): Likewise. (general_induction_var): Likewise. (product_cheap_p): Likewse. * optabs.c (init_one_libfunc): Remove ggc_p conditional. * print-tree.c (debug_tree): Don't use oballoc/obfree. (print_node): Likewise. * profile.c (output_func_start_profiler): Remove call to temporary_allocation. * reload1.c (eliminate_regs_in_insn): Don't mess with obstacks. * resource.c (mark_target_live_regs): Use xmalloc. (free_resource_info): Free the memory. * rtl.c (rtl_obstack): Remove. (rtvec_alloc): Don't mess with obstacks. (rtx_alloc): Likewise. (rtx_free): Remove. (copy_rtx): Don't handle `b' cases. (read_rtx): Use a local rtl_obstack. * rtl.h (oballoc): Remove. (obfree): Likewise. (pop_obstacks): Likewise. (push_obstacks): Likewise. (allocate_bb_life_data): Likewise. (allocate_reg_life_data): Likewise. (rtx_free): Likewise. * sdbout.c (sdbout_queue_anonymous_type): Use tree_cons, not saveable_tree_cons. * simplify-rtx.c (cselib_init): Don't mess with obstacks. * stmt.c (mark_block_nesting): Mark the label_chain. (epxand_label): Use ggc_alloc, not oballoc. (clear_last_expr): Don't mess with obstacks. (expand_decl_cleanup): Likewise. (expand_dcc_cleanup): Likewise. (expand_dhc_cleanup): Likewise. (expand_anon_union_decl): Likewise. (add_case_node): Use xmalloc, not oballoc. (free_case_nodes): New function. (expand_end_case): Call it. * stor-layout.c (layout_type): Don't mess with obstacks. (layout_type): Likewise. * toplev.c (wrapup_global_declarations): Likewise. (compile_file): Remove ggc_p conditionals. (rest_of_compilation): Call init_flow. Remove ggc_p conditionals. (decode_f_option): Remove ggc_p conditionals. * tree.c (function_maybepermanent_obstack): Remove. (maybepermanent_obstack): Likewise. (function_obstack): Likewise. (tmeporary_obstack): Likewise. (momentary_obstack): Likewise. (temp_decl_obstack): Likewise. (saveable_obstack): Likewise. (rtl_obstack): Likewise. (current_obstack): Likewise. (expression_obstack): Likewise. (struct obstack_stack): Likewise. (obstack_stack): Likewise. (obstack_stack_obstack): Likewise. (maybepermanent_firstobj): Likewise. (temporary_firstobj): Likewise. (momentary_firstobj): Likewise. (temp_decl_firstobj): Likewise. (momentary_function_firstobj): Likewise. (all_types_permanent): Likewise. (struct momentary_level): Likewise. (momentary_stack): Likewise. (init_obstacks): Remove initialization of removed obstacks. (save_tree_status): Remove. (restore_tree_status): Likewise. (temporary_allocation): Liekwise. (end_temporary_allocation): Liekwise. (resume_temporary_allocation): Likewise. (saveable_allocation): Likewise. (push_obstacks): Likewise. (push_obstacks_nochange): Likewise. (pop_obstacks): Likewise. (allocation_temporary_p): Likewise. (permanent_allocation): Likewise. (preserve_data): Likewise. (preserve_initializer): Likewise. (rtl_in_current_obstack): Likewise. (rtl_in_saveable_obstack): Likewise. (oballoc): Likewise. (obfree): Likewise. (savealloc): Likewise. (expralloc): Likewise. (print_obstack_name): Likewise. (debug_obstack): Likewise. (object_permanent_p): Likewise. (push_momentary): Likewise. (perserve_momentary): Likewise. (clear_momentary): Likewise. (pop_momentary): Likewise. (pop_momentary_nofree): Likewise. (suspend_momentary): Likewise. (resume_momentary): Likewise. (make_node): Don't set TREE_PERMANENT. (copy_node): Remove ggc_p conditionals. Don't set TYPE_OBSTACK. Don't set TREE_PERMANENT. (get_identifier): Remove ggc_p conditionals. (build_string): Likewise. (make_tree_vec): Likewise. (build_decl_list): Remove. (build_expr_list): Likewise. (tree_cons): Remove ggc_p conditionals. (decl_tree_cons): Remove. (expr_tree_cons): Likewise. (perm_tree_cons): Likewise. (temp_tree_cons): Likewise. (saveable_tree_cons): Likewise. (build1): Remove ggc_p conditionals. (build_parse_node): Likewise. (build_type_attribute_variant): Don't mess with obstacks. (build_type_copy): Likewise. (type_hash_canon): Likewise. (build_pointer_type): Likewise. (build_reference_type): Likewise. (build_index_type): Likewise. (build_range_type): Likewise. (dump_tree_statistics): Don't print obstack information. * tree.h (struct tree_common): Remove permanent_flag. (TREE_PERMANENT): Remove. (TREE_SET_PERMANENT): Likewise. (TYPE_OBSTACK): Likewise. (struct tree_type): Remove obstack. (oballoc): Remove. (savealloc): Likewise. (build_decl_list): Likewise. (build_expr_list): Likewise. (perm_tree_cons): Likewise. (temp_tree_cons): Likewise. (saveable_tree_cons): Likewise. (decl_tree_cons): Likewise. (expr_tree_cons): Likewise. (suspend_momentary): Likewise. (allocation_temporary_p): Likewise. (resume_momentary): Likewise. (push_obstacks_nochange): Likewise. (permanent_allocation): Likewise. (push_momentary): Likewise. (clear_momentary): Likewise. (pop_momentary): Likewise. (end_temporary_allocation): Likewise. (pop_obstacks): Likewise. (push_obstacks): Likewise. (pop_momentary_nofree): LIkewise. (preserve_momentary): Likewise. (saveable_allocation): Likewise. (temporary_allocation): Likewise. (resume_temporary_allocation): Likewise. (perserve_initializer): Likewise. (debug_obstack): Likewise. (rtl_in_current_obstack): Likewise. (rtl_in_saveable_obstack): Likewise. (obfree): Likewise. * varasm.c (current_obstack): Remove. (saveable_obstack): Remove. (rtl_obstack): Remove. (immed_double_const): Don't mess with obstacks. (immed_real_cons): Likewise. (output_constant_def): Likewise. (init_varasm_status): Use xcalloc. (mark_pool_constant): Mark the pool constant itself. (free_varasm_status): Free memory. (decode_rtx_const): Call bzero directly, rather than expanding it inline. (record_rtx_const): Don't mess with obstacks. (force_const_mem): Likewise. * config/arm/arm.c (arm_encode_call_attribute): Remove ggc_p conditionals. (aof_pic_entry): Likewise. * config/ia64/ia64.c (ia64_encode_section_info): Likewise. * config/m32r/m32r.c (m32r_encode_section_info): Likewise. * config/pa/pa.c (saveable_obstack): Remove. (rtl_obstack): Likewise. (current_obstack): Likewise. (output_call): Don't mess with obstacks. (hppa_encode_label): Remove ggc_p conditionals. * config/romp/romp.c (get_symref): Don't mess with obstacks. * config/rs6000/rs6000.c (output_toc): Remove ggc_p conditional. (rs6000_encode_section_info): Likewise. * config/sh/sh.c (get_fpscr_rtx): Likewise. From-SVN: r36856
2000-09-23Make-lang.in (JAVA_SRCS): Include java-tree.h.Mark Mitchell1-2/+2
* Make-lang.in (JAVA_SRCS): Include java-tree.h. * Makefile.in (parse.o): Depend on ggc.h. (class.o): Likewise. (constants.o): Likewise. (decl.o): Likewise. (expr.o): Likewise. (jcf-parse.o): Likewise. (jcf-write.o): Likewise. (mangle.o): Likewise. * class.c: Include ggc.h. (build_static_field_ref): Register GC roots. (layout_class): Likewise. (init_class_processing): Likewise. * constants.c: Include ggc.h. (current_constant_pool_data_ref): Remove. (tag_nodes): Move it to ... (get_tag_node): ... here. Register GC roots. * decl.c: Include ggc.h. Remove many global tree definitions. (throw_node): Define. (java_global_trees): Likewise. (predef_filenames): Make the size a constant. (init_decl_processing): Adjust accordingly. (init_decl_processing): Call init_jcf_parse. Register GC roots. * expr.c: Include ggc.h. (init_expr_processing): Register GC roots. (build_invokeinterface): Likewise. * java-tree.h: Replace extern tree declarations with macros. (java_global_trees): New variable. (java_tree_index): New enumeration. (init_jcf_parse): Declare. * jcf-parse.c: Include ggc.h. (current_class): Remove declaration. (main_class): Likewise. (all_class_list): Likewise. (predefined_filename_p): Adjust for constant size of predef_filenames. (init_jcf_parse): New function. * jcf-write.c: Include ggc.h. (generate_classfile): Register GC roots. (append_synthetic_attribute): Likewise. (append_innerclass_attribute_entry): Likewise. * lang.c: Include ggc.h. (lang_print_error): Register GC roots. * parse.h (struct parser_ctxt): Rename fields to avoid conflicts with macros. * parse.y: Include ggc.h. (wfl_operator): Remove. (goal): Register GC roots. (java_pop_parser_context): Adjust for new field names. (java_parser_context_save_global): Likewse. (java_parser_context_restore_global): Likewise. (java_parser_context_suspend): Likewise. (java_parser_context_resume): Likewise. (verify_constructor_circularity): Register GC roots. (lookup_cl): Likewise. (java_reorder_fields): Likewise. (build_current_this): Likewise. (class_in_current_package): Likewise. (argument_types_convertible): Likewise. (patch_cast): Rename wfl_op parameter to avoid macro conflicts. From-SVN: r36581
2000-09-12re GNATS gcj/33 (gcj mangles composed characters)Tom Tromey1-3/+2
Fix for PR gcj/33: * jv-scan.c (help): Document --encoding. (options): Added `encoding' entry. (OPT_ENCODING): New define. (main): Handle --encoding. Include <langinfo.h> if nl_langinfo exists. * lang-options.h: Document --classpath, --CLASSPATH, --main, and --encoding. * jcf-parse.c Include <langinfo.h> if we have nl_langinfo. (parse_source_file): Correctly call java_init_lex. Added `finput' argument. Use nl_langinfo to determine default encoding. * java-tree.h (current_encoding): Declare. * parse.y (java_parser_context_restore_global): Don't restore `finput'. (java_parser_context_save_global): Don't set `finput' field. (java_pop_parser_context): Don't restore `finput'. Free old lexer if required. * lang.c (current_encoding): New global. (lang_decode_option): Recognize `-fencoding='. (finish_parse): Don't close finput. * parse.h (struct parser_ctxt): Removed `finput' and `unget_utf8_value' fields. Added `lexer' field. (java_init_lex): Fixed declaration. * lex.c (java_new_lexer): New function. (java_destroy_lexer): Likewise. (java_read_char): Added `lex' argument. Handle iconv case. (java_read_unicode): Added `lex' argument. Count backslashes in lexer structure. (java_init_lex): Added `finput' and `encoding' arguments. Set `lexer' field in ctxp. (BAD_UTF8_VALUE): Removed. (java_lex): Handle seeing UEOF in the middle of a string literal. * lex.h: Include <iconv.h> if HAVE_ICONV defined. (java_lexer): New structure. (UNGETC): Removed. (GETC): Removed. (DEFAULT_ENCODING): New define. (java_destroy_lexer): Declare. From-SVN: r36377
2000-08-11class.c (maybe_layout_super_class): Fixed indentation.Alexandre Petit-Bianco1-6/+29
2000-08-10 Alexandre Petit-Bianco <apbianco@cygnus.com> * class.c (maybe_layout_super_class): Fixed indentation. * java-tree.h (CLASS_METHOD_CHECKED_P): New macro. (java_check_methods): New function declaration. * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str' instead of `str_ptr'. * jcf-write.c (generate_bytecode_insns): Emit number the of args of a `invokeinterface' at the right time. * parse.h (WFL_STRIP_BRACKET): New macro. (SET_TYPE_FOR_RESOLUTION): Use it. * parse.y (build_unresolved_array_type): Reuse `type_or_wfl.' (check_class_interface_creation): Don't check for cross package innerclass name clashes. (method_header): Behave properly if MDECL is `error_mark_node.' (method_declarator): Return `error_mark_node' if bogus current class. (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary. (resolve_and_layout): New local `decl_type', set and used. Call java_check_methods. (java_check_methods): New method. (java_layout_classes): Use it. (resolve_qualified_expression_name): No EH check necessary in access$<n>. (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating `case' statement. (patch_assignment): Set DECL_INITIAL on integral final local. (http://gcc.gnu.org/ml/gcc-patches/2000-08/msg00516.html) From-SVN: r35644
2000-07-21[multiple changes]Alexandre Petit-Bianco1-1/+1
2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node or its first operand can be error marks. 2000-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC. * parse.y (method_header): Likewise. 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (find_as_inner_class): Handle the case where the enclosing context of an innerclass has been loaded as bytecode. (Side gcj/225 bug fix and some cleanup: http://gcc.gnu.org/ml/gcc-patches/2000-07/msg00832.html) From-SVN: r35176
2000-07-06[multiple changes]Alexandre Petit-Bianco1-2/+2
2000-07-06 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while construct. * parse.y (find_as_inner_class): Fixed typo. (do_resolve_class): Explore enclosing contexts when searching for innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME. (check_inner_class_access): Check `decl' which can be null in case of previous errors. 2000-07-05 Alexandre Petit-Bianco <apbianco@cygnus.com> * java-tree.h (java_debug_context): Declared `extern.' (safe_layout_class): Likewise. * parse.y (resolve_field_access): Field must be `static' in order to be replaced by its initial value. Added comments. (find_applicable_accessible_methods_list): Fixed typo. (find_most_specific_methods_list): Methods found in innerclasses take over methods founds in the enclosing contexts. (java_complete_tree): Loosen restrictions on the type of DECLs that can be replaced by their initialization values. (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p.' (http://gcc.gnu.org/ml/gcc-patches/2000-07/msg00184.html) From-SVN: r34895
2000-06-21[multiple changes]Alexandre Petit-Bianco1-6/+5
2000-06-21 Alexandre Petit-Bianco <apbianco@cygnus.com> * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'. 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com> * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for Java specific checks. * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage screened by DECL_P. * java-tree.def (CASE_EXPR): Marked 'e'. (DEFAULT_EXPR): Likewise. * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage screened by DECL_P. * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for Java specific checks. (generate_bytecode_insns): Test try_block for BLOCK before using BLOCK_EXPR_BODY. * parse.y (build_wfl_wrap): Added `location' argument. Set EXPR_WFL_LINECOL accordingly. (dim_expr:): Wrap constants with WFLs. (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC. (resolve_package): Check for `stmt' not being a BLOCK before building a debuggable statement with it. (make_qualified_primary): Added extra parameter to build_wfl_wrap invocation. (resolve_field_access): Make sure `decl' is a DECL before treating it as such. (maybe_build_primttype_type_ref): Make sure `wfl''s node is an IDENTIFIER_NODE before treating it as such. (patch_new_array_init): Make sure `elt' is a TREE_LIST before treating it as such. (find_applicable_accessible_methods_list): CLASS_INTERFACE macro to be applied only on non array types. 2000-06-16 Per Bothner <per@bothner.com> * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN): Don't define in terms of DECL_RESULT, as that fails when --enable-checking. 2000-06-06 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries. * parse.y (find_in_imports): Returned type changed to void, leading comment fixed. (register_package): New function. (qualify_and_find): Likewise. (package_declaration:): Use `register_package'. (single_type_import_declaration:): Removed local variable `node'. Added missing `;' for consistency. (type_import_on_demand_declaration:): Use `chainon' to link new entries. (lookup_field_wrapper): Lookup local variables defined in outer contexts first. (java_complete_class): Don't reverse the list of imported on demand. (do_resolve_class): Reorganized. Removed local variable `original_name'. Call `qualify_and_find' with the current package name, invoke `find_in_imports_on_demand' right after. Call `qualify_and_find' with the packages we've seen so far. Fixed operations numbering in comments. (java_expand_class): Don't reverse `package_list'. (find_most_specific_methods_list): New local variables `abstract' and `candidates'. Use them to pick the right method. (Fixes for the ENABLE_TREE_CHECKING Java run-time build problem: http://gcc.gnu.org/ml/gcc-patches/2000-06/msg00551.html) From-SVN: r34642
2000-06-01class.c (common_enclosing_context_p): New function.Alexandre Petit-Bianco1-9/+11
2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com> * class.c (common_enclosing_context_p): New function. * java-tree.h (common_enclosing_context_p): Added prototype. * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow classes sharing an outer context with the current instance. * parse.y (build_access_to_thisn): Fixed leading comment. (verify_constructor_super): New local `supper_inner'. Skip enclosing context argument in the case of inner class constructors. (patch_method_invocation): Insert proper context as second parameter to pure inner class constructor super invocations. This fixes the Java PR #177. From-SVN: r34332
2000-05-09top level:Zack Weinberg1-2/+2
* Makefile.in (WARN_CFLAGS): Add -Wwrite-strings. (tree.o): Depend on output.h. * c-decl.c (pending_invalid_xref_file, current_function_prototype_file): Constify. (pushdecl): Constify a local char *. (define_label): Constify filename parameter. * c-lex.c (init_parse): Constify parameter and return value. * c-typeck.c (c_expand_asm_operands): Constify filename parameter. * c-tree.h: Update prototypes. * c-parse.in: Constify filename member of %union, and if_stmt_file. * c-parse.y, c-parse.c, c-parse.h, objc/objc-parse.y, objc/objc-parse.c: Regenerate. * dwarfout.c (dwarfout_init): Constify main_input_filename parameter. * dwarfout.h: Update prototypes. * expr.c (expand_expr): Constify a local char *. * flags.h: Constify main_input_filename. * function.c (expand_function_end): Constify filename parameter. * genrecog.c (make_insn_sequence): Use a character array for c_test_pos. (main): Remove unused variables. * input.h: Constify input_filename, main_input_filename, and file_stack.name. Update prototypes. * output.h: Declare first_global_object_name and weak_global_object_name here, as const char *. * stmt.c (expand_asm_operands): Constify filename parameter. * toplev.c (compile_file, push_srcloc, debug_start_source_file): Constify filename parameter. (input_filename, main_input_filename): Constify. * toplev.h: Update prototypes. * tree.c: Include output.h. Don't declare first_global_object_name or weak_global_object_name. Clean up string bashing in get_file_function_name_long. * tree.h (struct tree_decl): Constify filename member. (input_filename): Constify. Update prototypes. * varasm.c (first_global_object_name, weak_global_object_name): Constify. (assemble_start_function, assemble_variable): Clean up string bashing. * gcc.c: Constify all spec-related strings initialized, transitively, from string constants. Constify all strings and string variables related to multilibs. (set_spec, read_specs): Cast argument to free to PTR. (used_arg): Do not modify multilib_matches. Use strncmp plus length comparison to compare multilib switches. * genmultilib: Constify everything declared in multilib.h. ch: * ch-tree.h: Update prototypes. Remove prototypes for functions declared elsewhere. * decl.c (define_label): Constify filename parameter. * grant.c (globalize_decl, set_default_grant_file): Constify local char * variables. Don't declare first_global_object_name or asm_out_file. * lang.c (chill_real_input_filename): Constify. * lex.c (init_parse): Constify parameter and return value. * parse.c: Don't declare input_filename. (ch_expand_asm_operands): Constify filename parameter. (parse_multi_dimension_case_action): Constify local char *. * satisfy.c (safe_satisfy_decl): Constify local char *. cp: * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file, and pending_inline.filename. Update prototypes. * decl.c (define_label): Constify filename parameter. * decl2.c (warn_if_unknown_interface): Constify local char *. * input.c Constify input_source.filename. Don't declare input_filename or lineno. Constify filename parameter to feed_input. * lex.c (init_parse): Constify parameter and return value. (cp_pragma_interface, cp_pragma_implementation): Constify filename argument. (reinit_parse_for_method, reinit_parse_for_block, reinit_parse_for_expr, feed_defarg, handle_cp_pragma): Constify local char *. * pt.c: Don't declare lineno or input_filename. (print_template_context, tsubst_friend_function, tsubst_decl, tsubst, instantiate_decl): Constify local char *. * semantics.c (expand_body): Constify local char *. * tree.c (build_srcloc): Constify filename parameter. * typeck.c (c_expand_asm_operands): Constify filename parameter. f: * com.c (ffecom_subscript_check_): Constify array_name parameter. Clean up string bashing. (ffecom_arrayref_, ffecom_char_args_x_): Constify array_name parameter. (ffecom_do_entry_, ffecom_gen_sfuncdef_, ffecom_start_progunit_, ffecom_sym_transform_, ffecom_sym_transform_assign_): Constify local char *. (init_parse): Constify parameter and return value. * lex.c: Include dwarfout.h instead of prototyping dwarfout_* functions here. (ffelex_file_pop_, ffelex_file_push_): Constify filename parameter. (ffelex_hash_, ffelex_include_): Constify local char *. * std.c (ffestd_exec_end): Constify local char *. * where.c (ffewhere_file_new): Constify filename parameter. * where.h: Update prototypes. java: * check_init.c (check_init): Constify local char *. * class.c (push_class): Constify local char *. * java_tree.h: Update prototypes. * jcf-io.c (open_class): Constify filename parameter and return value. (find_class): Remove redundant string copy. Cast return from open_class. * jcf-parse.c (read_class, parse_class_file, yyparse): Constify local char *. * jcf-write.c (generate_bytecode_insns, generate_classfile): Constify local char *. * jcf.h (JCF): Constify filename and classname. (JCF_FINISH): Cast args to FREE to char * when appropriate. * lang.c (init_parse): Constify parameter and return value. * lex.c (java_get_line_col): Constify filename parameter. * parse.h: Constify parser_ctxt.filename. Update prototypes. * parse.y (java_parser_context_suspend, issue_warning_error_from_context, safe_layout_class): Constify local char *. * parse.c: Regenerate. From-SVN: r33804
2000-04-24Respective ChangeLogs for common, cp/, java/Robert Lipe1-5/+1
Respective ChangeLogs for common, cp/, java/ * tree.h (tree_decl): Member `mode' now ENUM_BITFIELD. * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD. * parse.h (_jdep): Member `kind' now ENUM_BITFIELD. From-SVN: r33378
2000-04-21[multiple changes]Alexandre Petit-Bianco1-2/+5
Thu Apr 20 17:41:28 2000 Mo DeJong <mdejong@cygnus.com> * 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. 2000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes of directly inherited type considered in scope. * parse.y (do_resolve_class): Search inherited classes for inner classes. (This fixes the PR #194 and #197: http://sourceware.cygnus.com/ml/java-prs/2000-q2/msg00008.html http://sourceware.cygnus.com/ml/java-prs/2000-q2/msg00011.html) From-SVN: r33330
2000-04-06re GNATS gcj/164 (compiler permits "volatile final" variables)Tom Tromey1-1/+1
* parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter. * parse.y (check_modifiers_consistency): Check for final/volatile clash. Fixes PR gcj/164. From-SVN: r32955
2000-03-22[multiple changes]Alexandre Petit-Bianco1-0/+11
2000-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (check_abstract_method_definitions): New local `end_type_reached'. Make sure we also consider `end_type'. (java_check_abstract_method_definitions): Make sure we also eventually consider `java.lang.Object'. (maybe_use_access_method): Don't use access method if not a pure inner class or if the method's context is right. (find_applicable_accessible_methods_list): New static `object_done'. Don't search abstract classes as interfaces. Fixed indentation. Fixed the `java.lang.Object' only search. Search class' interface(s) first, fully search enclosing contexts. (find_most_specific_methods_list): Pick closest candidates when they're all abstract. 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (check_method_types_complete): New function. (create_class): Reset anonymous class counter only when seeing an non inner classe. (java_complete_class): JDEP_METHOD: Don't recompute signature if incomplete. 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com> * class.c (build_static_ref): Fixed indentation in comment. * java-tree.def (TRY_EXPR): Fixed typo in name. (CLASS_LITERAL): Likewise. * java-tree.h: (TYPE_DOT_CLASS): New macro. (struct lang_type): New field `dot_class'. * jcf-write.c (generate_bytecode_insns): Fixed error message. (generate_classfile): Method `class$' is synthetic. * parse.y (build_do_class_method): New function. (build_dot_class_method_invocation): Likewise. (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary. (resolve_qualified_expression_name): Handle CLASS_LITERAL. (qualify_ambiguous_name): Likewise. (patch_incomplete_class_ref): Invoke synthetic method if necessary. (build_try_statement): Fixed leading comment. 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous classes. * parse.y (patch_method_invocation): Handle anonymous classes creation in static context. 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro. * parse.y (resolve_qualified_expression_name): Use it. (patch_method_invocation): Likewise. 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (register_incomplete_type): JDEP_ENCLOSING set depending on the type of dependency which dictates what the current class is. (unresolved_type_p): Resolved types limited to the current class. (For details, see: http://gcc.gnu.org/ml/gcc-patches/2000-03/msg00790.html) From-SVN: r32701
2000-03-13Added Java 1.1 language features.Alexandre Petit-Bianco1-17/+217
From-SVN: r32517
2000-03-06[multiple changes]Alexandre Petit-Bianco1-1/+0
2000-03-06 Bryce McKinlay <bryce@albatross.co.nz> * typeck.c (lookup_do): Search superinterfaces first when looking up an interface method. From Godmar Back <gback@cs.utah.edu> 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com> * java-tree.h (lookup_argument_method2): Declared. (safe_layout_class): Prototype moved from parse.h. * parse.h (safe_layout_class): Prototype moved to java-tree.h. * parse.y (java_check_regular_methods): Local `super_class' gone. Call lookup_argument_method2 instead of lookup_argument_method. Perform modifier match for methods found declared in implemented interfaces. Fixed indentation problem. Overriding/hiding error report to take place only for methods found in classes. * typeck.c (lookup_argument_method): Changed leading comment. Re-written by calling lookup_do. (lookup_argument_method2): New function. (lookup_java_method): Re-written by calling lookup_do. (lookup_do): New function. From-SVN: r32376
2000-02-28* Eliminate DECL_FIELD_SIZE.Richard Kenner1-1/+1
* builtins.c (built_in_class_names, built_in_names): New variables. * c-decl.c (finish_struct): Set specified size in DECL_SIZE. * expr.c (expand_expr, case COMPONENT_REF): Get field size from DECL_SIZE, not DECL_FIELD_SIZE. * print-tree.c (print_node): Remove code that prints extra blank lines in some cases. Properly handle inline and builtin function cases. * stor-layout.c (layout_decl): Get specified size from DEC_SIZE. * tree.h (built_in_class_named, built_in_names): New declarations. (union tree_decl): Rename internal unions to u1 and u2 and change some of their components. Add new field built_in_class. (DECL_ALIGN, DECL_INCOMING_RTL, DECL_SAVED_INSNS, DECL_FRAME_SIZE): Reflect above changes. (DECL_FUNCTION_CODE, DECL_BUILT_IN_CLASS): Likewise. (DECL_SET_FUNCTION_CODE, DECL_FIELD_SIZE): Deleted. * objc/objc-act.c (objc_copy_list): Use DECL_SIZE, not DECL_FIELD_SIZE. (encode_field_decl): Likewise; also remove obsolete test for bitfield. * ch/ch-tree.h (DECL_ACTION_NESTING_LEVEL): Use new tree union name. * ch/decl.c (finish_struct): Don't clear DECL_FIELD_SIZE. * ch/typeck.c (make_chill_struct_type): Likewise. (apply_decl_field_layout): General cleanup. Set DECL_SIZE instead of DECL_FIELD_SIZE. * cp/class.c (build_vtbl_or_vbase_field, check_methods): Don't clear DECL_FIELD_SIZE. (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not DECL_FIELD_SIZE. * cp/rtti.c (expand_class_desc): Likewise. * cp/cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name. (THUNK_VCALL_OFFSET): Likewise. (THUNK_DELTA): Reflect changes in ../tree.h. * java/java-tree.h (LABEL_PC): Relect name changes in ../tree.h. (DECL_BIT_INDEX): Use underlying representation. * java/parse.h (DECL_INHERITED_SOURCE_LINE): Likewise. From-SVN: r32249
2000-01-25parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string concatenation.Kaveh R. Ghazi1-2/+9
* parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string concatenation. (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args. * parse.y (register_fields): Don't pass a format specifier to OBSOLETE_MODIFIER_WARNING. (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2 instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format specifier. (check_modifiers): Change function into a macro. (check_class_interface_creation): Pass a literal format string. From-SVN: r31614