aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/decl.c
AgeCommit message (Collapse)AuthorFilesLines
2004-02-05utils.c (create_param_decl): Replace PROMOTE_PROTOTYPES with ↵Kazu Hirata1-1/+2
targetm.calls.promote_prototypes. ada/ * ada/utils.c (create_param_decl): Replace PROMOTE_PROTOTYPES with targetm.calls.promote_prototypes. gcc/ * config/cris/cris.h: Replace PROMOTE_PROTOTYPES with TARGET_PROMOTE_PROTOTYPES. cp/ * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with targetm.calls.promote_prototypes. java/ * Make-lang.in (java/decl.o, java/expr.o, java/parse.o): Depend on target.h. * decl.c: Include target.h. (start_java_method): Replace PROMOTE_PROTOTYPES with targetm.calls.promote_prototypes. * expr.c: Include target.h. (pop_arguments): Replace PROMOTE_PROTOTYPES with targetm.calls.promote_prototypes. * parse.y: Include target.h. (start_complete_expand_method): Replace PROMOTE_PROTOTYPES with targetm.calls.promote_prototypes. From-SVN: r77345
2004-02-03decl.c (java_init_decl_processing): Remove duplicate gnu/gcj/RawData.Tom Tromey1-1/+0
* decl.c (java_init_decl_processing): Remove duplicate gnu/gcj/RawData. From-SVN: r77151
2004-01-16re PR java/13273 (gcj generates call to abstract method)Andrew Haley1-2/+1
2004-01-16 Andrew Haley <aph@redhat.com> PR java/13273: * typeck.c (shallow_find_method): New. (find_method_in_superclasses): New. (find_method_in_interfaces): New. (lookup_do): Rewrite. * java-tree.h (SEARCH_ONLY_INTERFACE): Delete. * jcf-parse.c (read_class): Save and restore output_class. * decl.c (java_expand_body): Set output_class from fndecl. From-SVN: r75980
2004-01-09re PR java/12755 (Binary Compatibility: Resolving static methods and classes ↵Andrew Haley1-72/+33
is not thread safe) 2004-01-09 Andrew Haley <aph@redhat.com> PR java/12755: * parse.y (java_fix_constructors): Set output_class. (java_reorder_fields): Likewise. (java_layout_classes): Likewise. (java_expand_classes): Generate indirect dispatch tables. (java_expand_classes): Set output_class. (java_finish_classes): Likewise. * lang.c (java_init): Turn on always_initialize_class_p if we're using indirect dis[atch. (java_decl_ok_for_sibcall): Use output_class, not current_class. (java_get_callee_fndecl): Use class local atable. * jcf-parse.c (always_initialize_class_p): Decl moved to java-tree.h. (HANDLE_CLASS_INFO): Set output_class. (read_class): Likewise. (parse_class_file): Call gen_indirect_dispatch_tables. (parse_zip_file_entries): Set output_class. (java_parse_file): Set output_class. Don't emit symbol tables. * java-tree.h (output_class): New. Remove global declarations for otable, atable, and ctable. (always_initialize_class_p): moved here from decl.c. (DECL_OWNER): New. (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL, TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL, TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New. (struct lang_type): Add otable_methods, otable_decl, otable_syms_decl, atable_methods, atable_decl, atable_syms_decl, ctable_decl, catch_classes, type_to_runtime_map. * expr.c (build_field_ref): Make otable, atable, and ctable class local rather than global. (build_known_method_ref): Likewise. (build_invokeinterface): Likewise. (java_expand_expr): Pass runtime type (rather than actual type) to expand_start_catch. * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for this class. Look up each class in that map to delete duplicates. (expand_end_java_handler): Pass runtime type (rather than actual type) to expand_start_catch. * decl.c: (always_initialize_class_p): Decl moved to java-tree.h. (do_nothing): New. (java_init_decl_processing): Rearrange things. Remove global declarations of otable, atable, and ctable. (java_init_decl_processing): Make lang_eh_runtime_type do_nothing. (java_expand_body): Set output_class. * constants.c (build_constant_data_ref): Use output_class, not current_class. (alloc_name_constant): Likewise. * class.c (gen_indirect_dispatch_tables): New. (build_class_ref): Generate hard reference to superclass, even if using indirect dispatch. (build_static_field_ref): Use class local atable. (make_class_data): Generate hard reference to superclass, even if using indirect dispatch. Generate symbolic references to interfaces when using indirect dispatch. (make_class_data): Emit otable, atable, and ctable. Make otable, atable, and ctable class local rather than global. (emit_catch_table): Make otable, atable, and ctable class local rather than global. From-SVN: r75590
2003-12-20class.c: Remove uses of "register" specifier in declarations of arguments ↵Kazu Hirata1-15/+15
and local... * class.c: Remove uses of "register" specifier in declarations of arguments and local variables. * decl.c: Likewise. * expr.c: Likewise. * gjavah.c: Likewise. * jcf-dump.c: Likewise. * jcf-io.c: Likewise. * jcf-parse.c: Likewise. * jcf-write.c: Likewise. * keyword.h: Likewise. * parse.y: Likewise. * typeck.c: Likewise. * verify.c: Likewise. From-SVN: r74882
2003-12-03class.c (make_class_data): Push field value to 'hack_signers' instead of ↵Michael Koch1-1/+1
'signers'. 2003-12-03 Michael Koch <konqueror@gmx.de> * class.c (make_class_data): Push field value to 'hack_signers' instead of 'signers'. * decl.c (java_init_decl_processing): Push field 'hack_signers' instead of 'signers'. From-SVN: r74246
2003-11-25re PR java/13183 ([unit-at-a-time] incorrect multidimensional array ↵Jeff Sturm1-0/+1
initializer with -O2) Fix PR java/13183. * constants.c (cpool_for_class): New function. (outgoing_cpool): Remove global variable. (alloc_name_constant): Use cpool_for_class. (build_constants_constructor): Likewise. * decl.c (java_expand_body): Set current_class. * java-tree.h (outgoing_cpool) Remove declaration. (init_outgoing_cpool): Likewise. * jcf-parse.c (init_outgoing_cpool): Remove function. (parse_class_file): Don't call init_outgoing_cpool. * parse.y (java_complete_expand_methods): Don't call init_outgoing_cpool. Don't save outgoing_cpool. (java_expand_classes): Don't restore outgoing_cpool. (java_finish_classes): Likewise. From-SVN: r73926
2003-11-18re PR java/12857 (Illegal method modifier when loading a generated .class)Jeff Sturm1-4/+0
Fix PR java/12857. decl.c (java_init_decl_processing): Don't initialize class_not_found_type_node, no_class_def_found_type_node. java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE, JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index. (class_not_found_type_node, no_class_def_found_type_node): Don't define. parse.y (build_dot_class_method_invocation): Add this_class argument. Qualify method invocations to a different class. (create_new_parser_context): Initialize saved_data_ctx to 0. (java_parser_context_save_global): Initialize saved_data_ctx to 1. (build_dot_class_method): Don't load classes. Register incomplete types. (build_incomplete_class_ref): Special cases for interfaces and inner classes. Move build_dot_class_method call to here... (patch_incomplete_class_ref): ...from here. Pass current_class to build_dot_class_method_invocation. (build_assertion): Pass class_type to build_dot_class_method_invocation. (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node. From-SVN: r73691
2003-11-17java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.Andrew Haley1-7/+15
2003-09-12 Andrew Haley <aph@redhat.com> * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New. (struct lang_decl_var:freed): New variable. * decl.c (poplevel): Mark local vars that have gone out of scope. (push_jvm_slot): Don't use the RTL of a var that has gone out of scope. From-SVN: r73675
2003-10-24lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.Andrew Haley1-0/+18
2003-10-22 Andrew Haley <aph@redhat.com> * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New. (java_get_callee_fndecl): New. * jcf-parse.c (java_parse_file): Call emit_catch_table(). * java-tree.h (ctable_decl): New. (catch_classes): New. (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES. * decl.c (java_init_decl_processing): Add catch_class_type. Add ctable_decl. Add catch_classes field. * class.c (build_indirect_class_ref): Break out from build_class_ref. (make_field_value): Check flag_indirect_dispatch. (make_class_data): Ditto. Tidy uses of PUSH_FIELD_VALUE. Add field catch_classes. (make_catch_class_record): New. * java-tree.h (PUSH_FIELD_VALUE): Tidy. 2003-10-22 Andrew Haley <aph@redhat.com> * java/lang/natClass.cc (initializeClass): Call _Jv_linkExceptionClassTable. (_Jv_LinkSymbolTable): Call )_Jv_ThrowNoSuchMethodError. Call _Jv_Defer_Resolution on a method whose ncode is NULL. (_Jv_linkExceptionClassTable): New function. (_Jv_LayoutVTableMethods): If superclass looks like a constant pool entry, look it up. * java/lang/Class.h (struct _Jv_CatchClass): New. (_Jv_linkExceptionClassTable): New friend. (_Jv_Defer_Resolution): New friend. (class Class.catch_classes): New field. * include/java-interp.h (Jv_Defer_Resolution): New method. (_Jv_PrepareClass): Make a friend of _Jv_MethodBase. (_Jv_MethodBase.deferred): New field. (_Jv_Defer_Resolution): New function. * resolve.cc (_Jv_PrepareClass): Resolve deferred handlers. * exception.cc (get_ttype_entry): Change return type to void**. (PERSONALITY_FUNCTION): Remove all code related to using a Utf8Const* for a match type. Change match type to be a pointer to a pointer, rather than a pointer to a Class. * defineclass.cc (handleCodeAttribute): Initialize method->deferred. (handleMethodsEnd): Likewise. From-SVN: r72886
2003-10-09decl.c (java_init_decl_processing): Declare signers field.Tom Tromey1-0/+1
* decl.c (java_init_decl_processing): Declare signers field. * class.c (make_class_data): Set signers field. From-SVN: r72270
2003-10-01jcf-parse.c (java_parse_file): Write otable and atable.Andrew Haley1-15/+32
2003-10-01 Andrew Haley <aph@redhat.com> * jcf-parse.c (java_parse_file): Write otable and atable. * java-tree.h (atable_methods): New. (atable_decl): New. (atable_syms_decl): New. (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL, JTI_ATABLE_SYMS_DECL. Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*. (symbol_*type): Rename method_symbol* to symbol*type. (emit_offset_symbol_table): Delete. (emit_symbol_table): New. (get_symbol_table_index): New. (atable_type): New. * expr.c (build_field_ref): Handle flag_indirect_dispatch. (build_known_method_ref): Likewise. (get_symbol_table_index): Rename from get_offset_table_index. Parameterize to allow re-use by differing types of symbol table. (build_invokevirtual): Pass table to get_offset_table_index. * decl.c (java_init_decl_processing): Push types and decls for atable and atable_syyms. * class.c (build_static_field_ref): Handle flag_indirect_dispatch. (make_class_data): Add new fields atable and atable_syms. (emit_symbol_table): Rename from emit_offset_symbol_table. Parameterize to allow re-use by different types of symbol table. (build_symbol_entry): Renamed from build_method_symbols_entry. 2003-10-01 Andrew Haley <aph@redhat.com> * java/lang/natClass.cc (initializeClass): Check for otable and atable. (_Jv_LinkOffsetTable): Check for existence of atable. Rewrite loops using for(). Search superinterfaces. Check for fields as well as methods. Initialize atable as well as otable: check for static methods as well as virtual methods. * java/lang/Class.h (struct _Jv_AddressTable): New. (atable): New. (atable_syms): New. * include/jvm.h (_Jv_equalUtf8Consts): constify. * prims.cc (_Jv_equalUtf8Consts): constify. From-SVN: r71979
2003-09-28c-decl.c (duplicate_decls): Copy DECL_SOURCE_LOCATION, not file and line ↵Richard Henderson1-6/+3
separately. * c-decl.c (duplicate_decls): Copy DECL_SOURCE_LOCATION, not file and line separately. f/ * com.c (duplicate_decls): Copy DECL_SOURCE_LOCATION, not file and line separately. java/ * check-init.c (check_init): Save and restore input_location instead of file and line separately. * decl.c (java_expand_body): Likewise. * jcf-write.c (generate_bytecode_insns): Likewise. * parse.y (safe_layout_class): Likewise. * jcf-parse.c (read_class, parse_class_file): Likewise. (java_parse_file): Use %H for warning locator. From-SVN: r71886
2003-09-28decl.c (java_optimize_inline, [...]): Remove.Jeff Sturm1-28/+0
* decl.c (java_optimize_inline, dump_function): Remove. * java-tree.h (java_optimize_inline): Remove declaration. * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set. * parse.y (source_end_java_method, java_expand_classes): Likewise. Remove dead code. From-SVN: r71882
2003-09-23decl.c (java_init_decl_processing): Don't emit otable decls if ↵Jeff Sturm1-10/+14
flag_indirect_dispatch is not set. * decl.c (java_init_decl_processing): Don't emit otable decls if flag_indirect_dispatch is not set. From-SVN: r71674
2003-09-21Revert DECL_SOURCE_LOCATION -> TREE_LOCUS change.Richard Henderson1-2/+3
From-SVN: r71641
2003-09-21tree.h (TREE_LOCUS): Rename from DECL_SOURCE_LOCATION; make const.Richard Henderson1-3/+2
* tree.h (TREE_LOCUS): Rename from DECL_SOURCE_LOCATION; make const. (TREE_FILENAME, TREE_LINENO): Likewise. (set_tree_locus, copy_tree_locus, set_tree_file_line): New. (TREE_LOCUS_SET_P): New. * c-aux-info.c, c-decl.c, c-parse.in, coverage.c, dbxout.c, diagnostic.c, dwarf2out.c, dwarfout.c, function.c, integrate.c, print-tree.c, stmt.c, toplev.c, tree-dump.c, tree-inline.c, tree-optimize.c, tree.c, tree.def, xcoffout.c, config/alpha/alpha.c, config/mips/mips.c, doc/c-tree.texi, objc/objc-act.c: Update to match. ada/ * trans.c, utils.c: Update for DECL_SOURCE_LOCATION rename and change to const. cp/ * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c, method.c, optimize.c, pt.c, semantics.c, tree.c: Update for DECL_SOURCE_LOCATION rename and change to const. f/ * com.c, ste.c: Update for DECL_SOURCE_LOCATION rename and change to const. java/ * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y, resource.c: Update for DECL_SOURCE_LOCATION rename and change to const. treelang/ * treetree.c: Update for DECL_SOURCE_LOCATION rename and change to const. From-SVN: r71636
2003-09-20c-format.c (gcc_diag_char_table): Add %J.Richard Henderson1-11/+8
* c-format.c (gcc_diag_char_table): Add %J. (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Likewise. (check_format_types): Fix wanted_type name lookup. (init_dynamic_diag_info): Setup %J. * diagnostic.c (text_specifies_location): Implement %J. * c-common.c, c-decl.c, c-objc-common.c, c-pragma.c, calls.c, dwarfout.c, expr.c, function.c, stmt.c, stor-layout.c, toplev.c, tree-inline.c, tree-optimize.c, varasm.c, config/arm/pe.c, config/i386/winnt.c, config/ia64/ia64.c, config/mcore/mcore.c, config/v850/v850.c, objc/objc-act.c: Use %J in diagnostics. * tree-inline.c: Include intl.h (inline_forbidden_p_1): Fix i18n of inline_forbidden_reason. * Makefile.in (tree-inline.o): Update. cp/ * decl.c, decl2.c, pt.c: Use %J in diagnostics. java/ * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics. testsuite/ * gcc.dg/format/gcc_diag-1.c: Add tests for %J. From-SVN: r71619
2003-09-03decl.c (java_expand_body): New function.Jeff Sturm1-0/+53
* 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-08-04java-tree.h (METHOD_TRANSIENT): Removed.Tom Tromey1-9/+0
* java-tree.h (METHOD_TRANSIENT): Removed. * decl.c (pushdecl): Removed some dead code. * class.c (get_access_flags_from_decl): Can't have transient method. (add_method_1): Can't have a transient method. From-SVN: r70152
2003-07-25* decl.c (force_poplevels): Fix warning call.Nathan Sidwell1-2/+1
From-SVN: r69782
2003-07-25objc-act.c (objc_check_decl): Don't use xxx_with_decl.Gabriel Dos Reis1-8/+12
* objc/objc-act.c (objc_check_decl): Don't use xxx_with_decl. (objc_declare_class): Likewise. (error_with_ivar): Likewise. (start_class): Likewise. (warn_with_method): Likewise. java/ * expr.c (expand_java_field_op): Don't use xxx_with_decl (expand_java_field_op): Likewise. * class.c (layout_class_method): Likewise (emit_register_classes): Likewise. * decl.c (pushdecl): Likewise. (poplevel): Likewise. (force_poplevels): Likewise. (give_name_to_locals): Likewise. * check-init.c (check_for_initialization): Likewise. From-SVN: r69780
2003-07-01c-tree.h (define_label): Replace filename and lineno arguments with a ↵Nathan Sidwell1-2/+1
location_t. * c-tree.h (define_label): Replace filename and lineno arguments with a location_t. * c-decl.c (poplevel): Adjust define_label call. (pop_label_level): Likewise. (define_label): Replace filename and lineno arguments with a location_t. (store_parm_decls): Use DECL_SOURCE_LOCATION. * c-parse.in (label): Adjust define_label call. * cp/cp-tree.h (define_label): Replace filename and lineno arguments with a location_t. * cp/decl.c (pop_label): Adjust define_label call. (define_label): Replace filename and lineno arguments with a location_t. * cp/semantics.c (finish_label): Adjust define_label call. * java/decl.c (poplevel): Adjust define_label call. From-SVN: r68766
2003-06-20tree.h (expand_function_end): Remove all parameters.Nathan Sidwell1-1/+1
* tree.h (expand_function_end): Remove all parameters. * function.c (expand_function_end): Remove all parameters. Use input_location. Never expand_end_bindings. * c-decl.c (c_expand_body_1): Adjust expand_function_end call. * coverage.c (create_coverage): Likewise. * ada/utils.c (end_subprog_body): Adjust expand_function_end call. * cp/semantics.c (genrtl_finish_function): Adjust expand_function_end call. * f/com.c (finish_function): Adjust expand_function_end call. * java/class.c (push_class): Use a location_t to save place. (emit_register_classes): Set input_location. Adjust expand_function_end call. * java/resource.c (write_resource_constructor): Likewise. * java/decl.c (end_java_method): Adjust expand_function_end call. * java/parse.y (source_end_java_method): Likewise. * treelang/treetree.c (tree_code_create_function_wrapup): Adjust expand_function_end call. From-SVN: r68255
2003-06-14tree.h (init_function_start): Remove filename and line paramters.Nathan Sidwell1-1/+1
* tree.h (init_function_start): Remove filename and line paramters. * function.c (init_function_start): Remove filename and line parameters. Use DECL_SOURCE_LOCATION. * c-decl.c (store_parm_decls): Adjust init_function_start call. (c_expand_body_1): Likewise. * coverage.c (create_coverage): Likewise. * ada/utils.c (begin_subprog_body): Adjust init_function_start call. * cp/decl.c (start_function): Adjust init_function_start call. * cp/method.c (use_thunk): Likewise. * cp/semantics.c (genrtl_start_function): Likewise. * f/com.c (stor_parm_decls): Adjust init_function_start call. * java/class.c (emit_register_classes): Adjust init_function_start call. * java/decl.c (complete_start_java_method): Likewise. * java/resource.c (write_resource_constructor): Likewise. * objc/objc-act.c (build_tmp_function_decl): Set line number to zero. (hack_method_prototype): Adjust init_function_start call. * treelang/treetree.c (tree_code_create_function_initial): Adjust init_function_start call. From-SVN: r67953
2003-05-13class.c (layout_class_method): Set DECL_EXTERNAL.Richard Henderson1-0/+29
* class.c (layout_class_method): Set DECL_EXTERNAL. * decl.c (java_mark_decl_local, java_mark_class_local): New. * java-tree.h (java_mark_class_local): Declare. * jcf-parse.c (parse_class_file): Use it. * parse.y (java_expand_classes): Likewise. From-SVN: r66768
2003-05-01input.h (lineno): Rename to ...Nathan Sidwell1-2/+2
* 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-26builtins.def (DEF_LIB_ALWAYS_BUILTIN, [...]): Delete.Roger Sayle1-17/+6
* builtins.def (DEF_LIB_ALWAYS_BUILTIN, DEF_UNUSED_BUILTIN): Delete. (abs, labs, fabs, fabsf, fabsl, abort, exit, _exit, _Exit): Use the appropriate macro to define built-in function. (fmod,fmodf,fmodl): New built-in functions. * java/decl.c (java_init_decl_processing): Get soft_fmod_node from built_in_decls[BUILT_IN_FMOD] rather than define it ourselves. * doc/extend.texi (fmod,fmodf,fmodl): Document new built-ins. From-SVN: r63445
2003-02-12decl.c (java_init_decl_processing): Change soft_lookupjnimethod_node to ↵Ranjit Mathew1-1/+3
reflect the change in signature of... 2003-02-12 Ranjit Mathew <rmathew@hotmail.com> * decl.c (java_init_decl_processing): Change soft_lookupjnimethod_node to reflect the change in signature of _Jv_LookupJNIMethod in libjava/jni.cc * expr.c (build_jni_stub): Calculate and pass the size on the stack of the arguments to a JNI function. Use new target macro MODIFY_JNI_METHOD_CALL to allow a target to modify the call to a JNI method. From-SVN: r62795
2003-01-22gcj.texi (Input and output files): Mention non-class entries.Tom Tromey1-0/+1
* gcj.texi (Input and output files): Mention non-class entries. * decl.c (java_init_decl_processing): Call init_resource_processing. * java-tree.h (compile_resource_data, write_resource_constructor, compile_resource_file, init_resource_processing): Declare. * config-lang.in (gtfiles): Added resource.c. * Make-lang.in (gt-java-resource.h): New target. (JAVA_OBJS): Added resource.o. (java/resource.o): New target. * resource.c: New file. * class.c (compile_resource_file): Moved to resource.c. (registerResource_libfunc): Likewise. (utf8_decl_list): Mark with GTY; now static. * jcf-parse.c (classify_zip_file): New function. (parse_zip_file_entries): Use it; compile .properties files. (process_zip_dir): Use classify_zip_file and compute_class_name. Don't write class name into zip directory. (java_parse_file): Call write_resource_constructor. (compute_class_name): New function. * jcf-io.c (read_zip_member): Reindented. From-SVN: r61614
2003-01-18check-init.c: Fix comment typos.Kazu Hirata1-1/+1
* check-init.c: Fix comment typos. * class.c: Likewise. * constants.c: Likewise. * decl.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * java-except.h: Likewise. * java-tree.h: Likewise. * javaop.h: Likewise. * jcf-dump.c: Likewise. * jcf-io.c: Likewise. * jcf-parse.c: Likewise. * jcf-write.c: Likewise. * lang.c: Likewise. * mangle.c: Likewise. * typeck.c: Likewise. * verify.c: Likewise. From-SVN: r61477
2003-01-14decl.c (java_init_decl_processing): _Jv_NewMultiArray is a varargs function ↵Andrew Haley1-1/+3
-- correct. 2003-01-14 Andrew Haley <aph@redhat.com> * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a varargs function -- correct. From-SVN: r61289
2003-01-14decl.c (java_init_decl_processing): Temporarily back out previous patch.Andrew Haley1-3/+2
2003-01-14 Andrew Haley <aph@redhat.com> * decl.c (java_init_decl_processing): Temporarily back out previous patch. From-SVN: r61286
2003-01-14[multiple changes]Andrew Haley1-2/+3
2003-01-14 Andrew Haley <aph@redhat.com> * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a varargs function -- correct. * parse.y (patch_assignment): Copy the rhs of an assignment into a temporary if the RHS is a reference. 2003-01-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf. * keyword.h: Regenerated. * All Files: Convert to ISO C style function definitions. From-SVN: r61281
2003-01-12* All Files: Convert to ISO C style function definitions.Kaveh R. Ghazi1-81/+40
From-SVN: r61218
2003-01-10decl.c, [...]: Don't cast return value of xmalloc et al.Kaveh Ghazi1-1/+1
* decl.c, parse-scan.y, parse.y: Don't cast return value of xmalloc et al. From-SVN: r61138
2003-01-09* All Files: Remove PARAMS macro.Kaveh R. Ghazi1-9/+9
From-SVN: r61133
2003-01-01Make-lang.in, [...]: Replace "GNU CC" with "GCC" in the copyright header.Steven Bosscher1-5/+5
* 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-12-16Merge basic-improvements-branch to trunkZack Weinberg1-0/+2
From-SVN: r60174
2002-12-03natClassLoader.cc (_Jv_PrepareCompiledClass): Call _Jv_PushClass.Andrew Haley1-0/+1
2002-12-03 Andrew Haley <aph@redhat.com> * java/lang/natClassLoader.cc (_Jv_PrepareCompiledClass): Call _Jv_PushClass. (_Jv_InitNewClassFields): Set protectionDomain and chain = NULL. (_Jv_PopClass): New. (_Jv_PushClass): New. * java/lang/natClass.cc (forName (jstring)): Use a StackTrace to discover the ClassLoader of our caller. (_Jv_CheckArrayStore): Don't check that a class is assignment compatible with Object. * java/lang/natVMTHrowable.cc: Delete. * gnu/gcj/runtime/StackTrace.java: New, partly copied from java.lang.VMThrowable. (StackTrace(), StackTrace(int)): New constructors. (classAt, methodAt, update, methodAtAddress): New methods. (map): New field. * java/lang/VMThrowable.java: Use StackTrace instead of natVMTHrowable. * java/lang/Class.h (getClassLoaderInternal): New. (class Class): Be friendly with _Jv_PopClass and _Jv_PushClass. Be friendly with gnu::gcj::runtime::StackTrace. (Object.chain): New field. * include/java-interp.h (class _Jv_InterpMethod): Be friendly with gnu::gcj::runtime::StackTrace. * prims.cc (_Jv_NewObjectArray): Use getClassLoaderInternal() instead of getClassLoader(). * verify.cc (class _Jv_BytecodeVerifier): Likewise. java::lang::VMThrowable. * Makefile.am (core_java_source_files): Add MethodRef.java, StackTrace.java. (nat_source_files): Remove natVMThrowable.cc; add natStackTrace.cc. * Makefile.in: Rebuild. 2002-12-03 Andrew Haley <aph@redhat.com> * class.c (make_class_data): New field, "chain". * decl.c (java_init_decl_processing): Likewise. From-SVN: r59769
2002-11-28* decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.Kaveh R. Ghazi1-1/+1
From-SVN: r59594
2002-11-18re PR java/7912 (invalid verification error for arrays)Tom Tromey1-0/+10
Fix for PR java/7912: * expr.c (can_widen_reference_to): Allow cast of array to Cloneable or Serializable. * java-tree.h (java_lang_cloneable_identifier_node): Declare. (java_io_serializable_identifier_node): Likewise. * parse.y (java_lang_cloneable, java_io_serializable): Removed. (valid_ref_assignconv_cast_p): Use new identifier nodes. * lex.c (java_init_lex): Don't initialize java_lang_cloneable and java_io_serializable. * decl.c (java_init_decl_processing): Initialize java_lang_cloneable_identifier_node and java_io_serializable_identifier_node. (java_lang_cloneable_identifier_node): New global. (java_io_serializable_identifier_node): Likewise. From-SVN: r59227
2002-11-18buffer.c: Remove unnecessary casts.Jens-Michael Hoffmann1-2/+2
2002-11-14 Jens-Michael Hoffmann <jensmh@gmx.de> * buffer.c: Remove unnecessary casts. * check-init.c: Likewise. * class.c: Likewise. * constants.c: Likewise. * decl.c: Likewise. * except.c: Likewise. * gjavah.c: Likewise. * jcf-io.c: Likewise. * jcf-parse.c: Likewise. * jcf-path.c: Likewise. * jvspec.c: Likewise. * lang.c: Likewise. * lex.c: Likewise. * verify.c: Likewise. From-SVN: r59224
2002-11-06re PR java/6388 (Integer.MIN_VALUE == 0x80000000 optimized to false on powerpc)Tom Tromey1-1/+15
Fix for PR java/6388. * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while. * java-tree.h (enum java_tree_index): New values JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE. (decimal_int_max, decimal_long_max): New defines. * lex.c (yylex): Rewrote range checking. Sign extend literals. (error_if_numeric_overflow): Rewrote range checking. * decl.c (java_init_decl_processing): Initialize decimal_int_max, decimal_long_max. From-SVN: r58843
2002-11-02Reverted erroneous checkinTom Tromey1-9/+1
From-SVN: r58756
2002-11-02re PR java/6388 (Integer.MIN_VALUE == 0x80000000 optimized to false on powerpc)Tom Tromey1-1/+9
Fix for PR java/6388. * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while. * java-tree.h (enum java_tree_index): New values JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE. (decimal_int_max, decimal_long_max): New defines. * lex.c (yylex): Rewrote range checking. Sign extend literals. (error_if_numeric_overflow): Rewrote range checking. * decl.c (java_init_decl_processing): Initialize decimal_int_max, decimal_long_max. From-SVN: r58755
2002-09-21ChangeLog: Follow spelling conventions.Kazu Hirata1-1/+1
* ChangeLog: Follow spelling conventions. * class.c: Likewise. * decl.c: Likewise. * expr.c: Likewise. * gjavah.c: Likewise. * java-tree.h: Likewise. * jcf-dump.c: Likewise. * jcf-parse.c: Likewise. * jvspec.c: Likewise. * lang.c: Likewise. * mangle.c: Likewise. * parse.y: Likewise. From-SVN: r57378
2002-08-16Make-lang.in (java-tree-inline.o): New.Andrew Haley1-6/+46
2002-07-30 Andrew Haley <aph@cambridge.redhat.com> * Make-lang.in (java-tree-inline.o): New. (JAVA_OBJS): Add java-tree-inline.o. * parse.y (source_end_java_method): Call java_optimize_inline. (java_expand_method_bodies): Save method's tree in DECL_SAVED_TREE. (add_stmt_to_compound): Keep track of the number of statments. * lang.c (java_init): Enable flag_inline_trees. (java_post_options): If flag_inline_functions is on, enable flag_inline_trees instread. (decl_constant_value): New. (java_tree_inlining_walk_subtrees): New. * java-tree.h (DECL_NUM_STMTS): New macro. (java_optimize_inline): Declare. * expr.c (java_expand_expr): Allow a BLOCK to return a value. Handle a LABEL_EXPR. * decl.c (build_result_decl): If we already have a DECL_RESULT don't make another. (dump_function): New. (java_optimize_inline): New. (dump_function): New. From-SVN: r56377
2002-07-01tree.h: Modify builtin_function interface to take an extra argument ATTRS...Roger Sayle1-26/+30
* tree.h: Modify builtin_function interface to take an extra argument ATTRS, which is a tree representing an attribute list. * c-decl.c (builtin_function): Accept additional parameter. * objc/objc-act.c (builtin_function): Likewise. * f/com.c (builtin_function): Likewise. * java/decl.c (builtin_function): Likewise. * ada/utils.c (builtin_function): Likewise. * cp/decl.c (builtin_function): Likewise. (builtin_function_1): Likewise. * c-common.c (c_common_nodes_and_builtins): Pass an additional NULL_TREE argument to builtin_function. (builtin_function_2): Likewise. * cp/call.c (build_java_interface_fn_ref): Likewise. * objc/objc-act.c (synth_module_prologue): Likewise. * java/decl.c (java_init_decl_processing): Likewise. * f/com.c (ffe_com_init_0): Likewise. * config/alpha/alpha.c (alpha_init_builtins): Pass an additional NULL_TREE argument builtin_function. * config/arm/arm.c (def_builtin): Likewise. * config/c4x/c4x.c (c4x_init_builtins): Likewise. * config/i386/i386.c (def_builtin): Likewise. * config/ia64/ia64.c (def_builtin): Likewise. * config/rs6000/rs6000.c (def_builtin): Likewise. From-SVN: r55161
2002-06-21mangle.c (integer_type_codes): Const-ify.Kaveh R. Ghazi1-1/+1
cp: * mangle.c (integer_type_codes): Const-ify. java: * decl.c (clear_binding_level): Const-ify. From-SVN: r54890