aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/expr.c
AgeCommit message (Collapse)AuthorFilesLines
2003-11-06expr.c (java_stack_swap): Make sure destination stack slots are of the ↵Andrew Haley1-2/+3
correct type. 2003-11-06 Andrew Haley <aph@redhat.com> * expr.c (java_stack_swap): Make sure destination stack slots are of the correct type. From-SVN: r73306
2003-10-22ChangeLog: Fix typos.Kazu Hirata1-2/+2
* ChangeLog: Fix typos. * expr.c: Fix comment typos. * jcf-write.c: Likewise. * lang.c: Likewise. * lex.c: Likewise. * mangle.c: Likewise. * parse-scan.y: Likewise. * parse.y: Likewise. From-SVN: r72809
2003-10-22expr.c (expand_byte_code): Only warn about dead bytecode when extra_warnings ↵Tom Tromey1-4/+6
is set. * expr.c (expand_byte_code): Only warn about dead bytecode when extra_warnings is set. From-SVN: r72805
2003-10-01jcf-parse.c (java_parse_file): Write otable and atable.Andrew Haley1-16/+49
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-28expr.c (java_check_reference): Use the semantics of COND_EXPRs with ↵Roger Sayle1-4/+2
void-type branches instead of using a... * expr.c (java_check_reference): Use the semantics of COND_EXPRs with void-type branches instead of using a COMPOUND_EXPR. From-SVN: r71883
2003-09-28toplev.c (flag_evaluation_order): New global variable.Roger Sayle1-10/+5
* toplev.c (flag_evaluation_order): New global variable. * flags.h (flag_evaluation_order): Prototype here. * expr.c (expand_operands): If we need to preserve observable evaluation order, protect exp1 from clobbering exp0's result. * java/lang.c (java_init_options): Set flag_evaluation_order. * java/expr.c (force_evaluation_order): Don't attempt to force evaluation order of binary operations using save_expr. * java/parse.y (java_complete_lhs): No longer need to call force_evaluation_order when constructing binary operators. From-SVN: r71873
2003-09-20c-format.c (gcc_diag_char_table): Add %J.Richard Henderson1-7/+6
* 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-18tree.def (FFS_EXPR, [...]): Delete unused tree codes.Roger Sayle1-1/+0
* tree.def (FFS_EXPR, CLZ_EXPR, CTZ_EXPR, POPCOUNT_EXPR, PARITY_EXPR): Delete unused tree codes. * c-common.c (c_common_truthvalue_conversion): Delete references to FFS_EXPR and POPCOUNT_EXPR. * c-pretty-print.c (pp_c_postfix_expression): Remove FFS_EXPR. (pp_c_expression): Likewise. * expr.c (expand_expr): Delete RTL expansion of FFS_EXPR, CLZ_EXPR, CTZ_EXPR, POPCOUNT_EXPR and PARITY_EXPR. * fold-const.c (tree_expr_nonnegative_p): Remove FFS_EXPR, CLZ_EXPR, CTZ_EXPR, POPCOUNT_EXPR and PARITY_EXPR. Add support for calls to BUILT_IN_FFS, BUILT_IN_PARITY and BUILT_IN_POPCOUNT and their long and long long variants. * cp/lex.c (init_operators): Remove operator_name_info for FFS_EXPR. * cp/class.c (instantiate_type): Remove FFS_EXPR case. * f/com.c (ffecom_overlap_): Remove FFS_EXPR case. (ffecom_tree_canonize_ref_): Likewise. (ffe_truthvalue_conversion): Likewise. * java/expr.c (java_truthvalue_conversion): Remove FFS_EXPR case. * java/check-init.c (check_init): Likewise. From-SVN: r71525
2003-09-03decl.c (java_expand_body): New function.Jeff Sturm1-0/+2
* 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-07-25objc-act.c (objc_check_decl): Don't use xxx_with_decl.Gabriel Dos Reis1-5/+7
* 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-15* expr.c: Remove the last argument to expand_assignment().Kazu Hirata1-7/+7
From-SVN: r69380
2003-07-07rtl.h (emit_line_note): Take a location_t.Nathan Sidwell1-1/+1
* rtl.h (emit_line_note): Take a location_t. (emit_line_note_force): Remove. (set_file_and_line_for_statement): Take a location_t. * tree.g (emit_line_note): Take a location_t. * emit-rtl.c (emit_line_note): Take a location_t. (emit_line_note_force): Remove. * function.c (init_function_start): Adjust emit_line_note call. (expand_function_end): Use force_next_line_note, not emit_line_note_force. * c-parse.in (maybe_type_qual): Adjust emit_line_note calls. * c-semantics.c (genrtl_do_pushlevel, genrtl_goto_stmt, genrtl_expr_stmt_value, genrtl_decl_stmt, genrtl_if_stmt, genrtl_while_stmt, genrtl_do_stmt_1, genrtl_return_stmt, genrtl_for_stmt, genrtl_break_stmt, genrtl_continue_stmt, genrtl_continue_stmt, genrtl_switch_stmt, genrtl_asm_stmt): Likewise. * expr.c (expand_expr): Likewise. * integrate.c (expand_inline_function): Likewise. * stmt.c (set_file_and_line_for_stmt): Take a location_t. (expand_decl_init): Adjust emit_line_note call. * ada/trans.c (build_unit_elab, set_lineno): Adjust emit_line_note calls. * cp/semantics.c: (genrtl_try_block) Adjust emit_line_note calls. * f/com.c (bison_rule_pushlevel_, bison_rule_compstmt_): Adjust emit_line_note calls. * f/ste.c (ffeste_emit_line_note_): Likewise. * java/expr.c (expand_byte_code): * treelang/treetree.c (tree_code_if_start, tree_code_if_else, tree_code_if_end, tree_code_create_function_initial, tree_code_create_function_wrapup, tree_code_generate_return, tree_code_output_expression_statement): Adjust emit_line_note calls. From-SVN: r69047
2003-06-28* c-format.c (check_format_string, get_constant)Zack Weinberg1-1/+1
* cfgrtl.c (rtl_split_edge): Mark the definition static, matching the forward declaration. cp: * decl.c (build_typename_type) * mangle.c (write_template_template_arg) * parser.c (cp_parser_scope_through_which_access_occurs) * pt.c (push_access_scope_real, push_access_scope, pop_access_scope) * repo.c (get_base_filename) * semantics.c (maybe_convert_cond): Mark the definition static, matching the forward declaration. java: * class.c (build_method_symbols_entry) * expr.c (get_offset_table_index) * jcf-parse.c (jcf_parse): Mark the definition static, matching the forward declaration. From-SVN: r68622
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-03-11parse.y (resolve_field_access): Initialize class if field is found in ↵Tom Tromey1-1/+8
another static field. * parse.y (resolve_field_access): Initialize class if field is found in another static field. * expr.c (build_class_init): Don't optimize out initialization of implemented interface. From-SVN: r64185
2003-02-12decl.c (java_init_decl_processing): Change soft_lookupjnimethod_node to ↵Ranjit Mathew1-9/+27
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-23expr.c (build_known_method_ref): Use method's context to find method table ↵Tom Tromey1-5/+8
index. * expr.c (build_known_method_ref): Use method's context to find method table index. From-SVN: r61670
2003-01-22expr.c (build_invokeinterface): Abort if method's context is not an interface.Tom Tromey1-4/+5
* expr.c (build_invokeinterface): Abort if method's context is not an interface. From-SVN: r61615
2003-01-18check-init.c: Fix comment typos.Kazu Hirata1-4/+4
* 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-12* All Files: Convert to ISO C style function definitions.Kaveh R. Ghazi1-198/+86
From-SVN: r61218
2003-01-09* All Files: Remove PARAMS macro.Kaveh R. Ghazi1-40/+39
From-SVN: r61133
2003-01-09expr.c, [...]: Don't rely on the `DEFUN', `AND' or `__STDC__' macros.Kaveh R. Ghazi1-1/+0
* expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c, jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or `__STDC__' macros. From-SVN: r61131
2003-01-03re PR java/8712 (ICE at fold-const.c:2934)Tom Tromey1-3/+1
Fix for PR java/8712: * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR, when simply checking against `null'. From-SVN: r60859
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-11-18re PR java/7912 (invalid verification error for arrays)Tom Tromey1-2/+7
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-09-27expr.c (build_java_array_length_access): Check for null pointer.Andrew Haley1-6/+24
2002-09-26 Andrew Haley <aph@redhat.com> * expr.c (build_java_array_length_access): Check for null pointer. * expr.c (expand_java_arrayload): Likewise. From-SVN: r57591
2002-09-21ChangeLog: Follow spelling conventions.Kazu Hirata1-2/+2
* 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-2/+8
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-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-06-25* expr.c (JSR): Avoid undefined operation on PC.Andreas Schwab1-1/+5
From-SVN: r54987
2002-06-04java-tree.h, [...]: Remove all #if JAVA_USE_HANDLES blocks...Zack Weinberg1-29/+6
* java-tree.h, class.c, expr.c, jcf-parse.c, parse.y, typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks, all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE, and all now-pointless local variables. Rename other local variables to reflect their not being handles. * java-tree.h, jcf-dump.c, jcf-io.c: Remove all #if JCF_USE_STDIO blocks. * parse.y: Add missing semicolon at end of rule. From-SVN: r54261
2002-06-04Merge from pch-branch up to tag pch-commit-20020603.Geoffrey Keating1-40/+35
From-SVN: r54232
2002-04-24expr.c (PRE_JSR): Call NOTE_LABEL for return address.Per Bothner1-0/+1
* expr.c (PRE_JSR): Call NOTE_LABEL for return address. * java-tree.h (BCODE_RETURN_TARGET): Removed - never set. (BCODE_TARGET): Remove BCODE_RETURN_TARGET. From-SVN: r52735
2002-04-18class.c (make_class_data): Set DECL_ALIGN on static class data, for hash ↵Bryce McKinlay1-0/+3
synchronization. * class.c (make_class_data): Set DECL_ALIGN on static class data, for hash synchronization. * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects. * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for class_type_node. From-SVN: r52448
2002-04-04c-common.c (truthvalue_conversion): Rename, update.Neil Booth1-6/+6
* c-common.c (truthvalue_conversion): Rename, update. * c-common.h (c_common_truthvalue_conversion): New. * c-convert.c (convert): Update. * c-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. * c-parse.in (expr_no_commas, if_prefix, select_or_iter_stmt): Update. * c-typeck.c (build_binary_op, build_unary_op, build_conditional_expr): Update. * fold-const.c (constant_boolean_node, fold): Use langhook. * langhooks-def.h (LANGHOOK_INITIALIZER): Update. * langhooks.h (struct lang_hooks): New hook. * stmt.c (expand_decl_cleanup): Use langhook. * tree.h (truthvalue_conversion): Remove. ada: * gigi.h (truthvalue_conversion): Rename. * misc.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. * trans.c (tree_transform): Update. * utils2.c (truthvalue_conversion): Rename, update. (build_binary_op, build_unary_op): Update. cp: * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. * cvt.c: Update comment. * init.c (expand_cleanup_for_base): Update. * semantics.c (finish_parenthesized_expr): Update. * typeck.c (cp_truthvalue_conversion): Update. f: * com.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. (truthvalue_conversion): Rename. Update. Make static. (ffecom_truth_value): Update. java: * expr.c (truthvalue_conversion): Rename. Update. (expand_compare): Update. * java-tree.h (java_truthvalue_conversion): New. * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. objc: * objc-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. From-SVN: r51880
2002-04-01c-common.c (unsigned_conversion_warning, [...]): Use new hooks.Neil Booth1-1/+1
* c-common.c (unsigned_conversion_warning, convert_and_check, unsigned_type, signed_type, shorten_compare, c_common_get_alias_set, c_common_nodes_and_builtins): Use new hooks. (unsigned_type, signed_type, signed_or_unsigned_type): Rename. * c-common.h (unsigned_type, signed_type, signed_or_unsigned_type): New. * c-decl.c (grokdeclarator): Update. * c-format.c (check_format_types): Update. * c-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. * c-typeck.c (build_binary_op, convert_for_assignment): Update. * convert.c (convert_to_integer): Use new hooks. * expmed.c (make_tree): Use new hooks. * expr.c (store_expr): Use new hooks. * fold-const.c (operand_equal_for_comparison_p, build_range_check, all_ones_mask_p, unextend, fold): Use new hooks. * langhooks.h (struct lang_hooks_for_types): New hooks. * tree.h (signed_or_unsigned_type, signed_type, unsigned_type): Remove. ada: * gigi.h (unsigned_type, signed_type, signed_or_unsigned_type): Rename. * misc.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. * trans.c (tree_transform, convert_with_check): Update. * utils.c (unsigned_type, signed_type, signed_or_unsigned_type): Rename. cp: * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. * decl.c (grokdeclarator): Update. * mangle.c (write_integer_cst): Update. * typeck.c (build_binary_op): Update. f: * com.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. (unsigned_type, signed_type, signed_or_unsigned_type): Rename. java: * expr.c (build_java_binop): Update. * java-tree.h (java_signed_type, java_unsigned_type, java_signed_or_unsigned_type): Update. * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. * parse.y (patch_binop): Update. * typeck.c (signed_or_unsigned_type, unsigned_type, signed_type): Update. objc: * objc-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. From-SVN: r51684
2002-03-27expr.c (expand_invoke): Don't generate null pointer check if we're calling ↵Tom Tromey1-2/+3
<init>. * expr.c (expand_invoke): Don't generate null pointer check if we're calling <init>. From-SVN: r51487
2002-03-27c-common.c (c_expand_expr): Fix prototype.Neil Booth1-2/+2
* c-common.c (c_expand_expr): Fix prototype. * c-common.h (c_expand_expr): Always declare, update. * c-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine. * c-objc-common.c (c_objc_common_init): No global hook. * expr.c (expand_expr): Use langhook. * expr.h (enum expand_modifier): Conditionally declare. * langhooks-def.h (lhd_expand_expr, LANG_HOOKS_EXPAND_EXPR): New. (LANG_HOOKS_INITIALIZER): Update. * langhooks.c (lhd_expand_expr): New. * langhooks.h (struct lang_hooks): New hook. * toplev.c (lang_expand_expr_t, lang_expand_expr): Delete. (lang_independent_init): Don't default hook. ada: * misc.c (LANG_HOOKS_EXPAND_EXPR): Redefine. (gnat_init): Don't set hook. (gnat_expand_expr): Fix prototype. cp: * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine. * cp-tree.h (init_cplus_expand): Remove. (cxx_expand_expr): New. * expr.c (cplus_expand_expr): Rename cxx_expand_expr, fix prototype. (init_cplus_expand): Remove. * lex.c (cxx_init): Don't call init_cplus_expand. java: * expr.c (java_lang_expand_expr): Rename java_expand_expr, fix prototype. * java-tree.h (java_lang_expand_expr): Similarly. * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine. (java_init): Don't set hook. objc: * objc-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine. From-SVN: r51462
2002-03-27re PR java/5850 (resolving inherited member variables with same name works ↵Bryce McKinlay1-10/+0
poorly) Fix for PR java/5850: * parse.y (lookup_field_wrapper): Call itself recursively for enclosing context if field was not found in the current scope. * expr.c (lookup_field): Don't look in enclosing contexts. From-SVN: r51438
2002-03-23Andrew Haley <aph@cambridge.redhat.com>Tom Tromey1-1/+5
2002-03-22 Tom Tromey <tromey@redhat.com> Andrew Haley <aph@cambridge.redhat.com> * expr.c (build_field_ref): Don't build a check if the field is a member of `this'. From-SVN: r51213
2002-03-11parse.y (patch_assignment): Wrap the right-hand-side with a save_expr to ↵Bryce McKinlay1-3/+9
prevent it getting evaluated twice... * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr to prevent it getting evaluated twice in the store checking case. * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when examining OBJECT. From-SVN: r50570
2002-03-08re PR java/5812 (GCJ 3.0.2 segfaults on class file from Sun JDK 1.3 compiler)Per Bothner1-11/+9
Fix for PR java/5812. * expr.c (build_java_jsr): Take pc arguments, and do lookup_label gere instead of in JSR macro. Likewise with load_type_state call. Do the latter on if the return_pc has been verified (the jsr returns). (JSR): No just call build_java_jsr. From-SVN: r50455
2002-03-03emit-rtl.c, [...]: Remove all #ifndef REAL_ARITHMETIC blocks...Zack Weinberg1-4/+0
* emit-rtl.c, final.c, fold-const.c, gengenrtl.c, optabs.c, print-tree.c, real.c, real.h, recog.c, rtl.c, simplify-rtx.c, tree.c, config/m68k/m68k.c, f/com.c, f/target.h, java/expr.c, java/jcf-parse.c, java/lex.c: Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef REAL_ARITHMETIC blocks unconditional. Delete some further #ifdef blocks predicated on REAL_ARITHMETIC. * flags.h, toplev.c: Delete remaining references to flag_pretend_float. * doc/invoke.texi: Remove documentation of -fpretend-float. * doc/tm.texi: Describe the various REAL_* macros as provided by real.h, not by the target configuration files. * config/alpha/alpha.h, config/alpha/unicosmk.h, config/arm/arm.h, config/avr/avr.h, config/c4x/c4x.h, config/convex/convex.h, config/cris/cris.h, config/d30v/d30v.h, config/dsp16xx/dsp16xx.h, config/h8300/h8300.h, config/i370/i370.h, config/i386/i386.h, config/i386/osf1elf.h, config/i960/i960.h, config/ia64/ia64.h, config/m32r/m32r.h, config/m68hc11/m68hc11.h, config/m68k/dpx2.h, config/m68k/linux-aout.h, config/m68k/linux.h, config/m68k/m68k.h, config/m68k/sun3.h, config/m68k/vxm68k.h, config/mcore/mcore.h, config/mips/mips.h, config/mmix/mmix.h, config/mn10200/mn10200.h, config/mn10300/mn10300.h, config/pa/pa.h, config/pj/pj.h, config/rs6000/rs6000.h, config/s390/s390.h, config/sh/sh.h, config/sparc/freebsd.h, config/sparc/linux.h, config/sparc/linux64.h, config/sparc/sol2.h, config/sparc/sparc.h, config/sparc/vxsim.h, config/stormy16/stormy16.h, config/v850/v850.h, config/vax/vax.h, config/xtensa/xtensa.h: Do not define, undefine, or mention in comments any of REAL_ARITHMETIC, REAL_VALUE_ATOF, REAL_VALUE_HTOF, REAL_VALUE_ISNAN, REAL_VALUE_ISINF, REAL_VALUE_TO_TARGET_SINGLE, REAL_VALUE_TO_TARGET_DOUBLE, REAL_VALUE_TO_TARGET_LONG_DOUBLE, REAL_VALUE_TO_DECIMAL, REAL_VALUE_TYPE, REAL_VALUES_EQUAL, REAL_VALUES_LESS, REAL_VALUE_LDEXP, REAL_VALUE_FIX, REAL_VALUE_UNSIGNED_FIX, REAL_VALUE_RNDZINT, REAL_VALUE_UNSIGNED_RNDZINT, REAL_INFINITY, REAL_VALUE_NEGATE, REAL_VALUE_TRUNCATE, REAL_VALUE_TO_INT, or REAL_VALUE_FROM_INT. From-SVN: r50263
2002-02-28* expr.c (build_java_arraystore_check): Fix formatting.Bryce McKinlay1-3/+3
From-SVN: r50167
2002-02-28expr.c (java_array_data_offset): Removed function.Bryce McKinlay1-51/+89
* expr.c (java_array_data_offset): Removed function. (JAVA_ARRAY_LENGTH_OFFSET): Removed macro. (build_java_array_length_access): Obtain "length" value using a COMPONENT_REF, instead of INDIRECT_REF and arithmetic. (build_java_arrayaccess): Correct comment. Access "data" using a COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF. (build_java_arraystore_check): New function. (expand_java_arraystore): Use build_java_arraystore_check. * parse.y (patch_assignment): Simplify code to insert a store check when lvalue is an ARRAY_REF. Use build_java_arraystore_check. * check-init.c (check_init): Update to reflect that an array length access is now a COMPONENT_REF. * gcj.texi (Code Generation): Improve documentation of -fno-bounds-check. Add documentation for -fno-store-check. * java-tree.h (flag_store_check): Declare. (build_java_arraystore_check): Declare. * lang.c (flag_store_check): Initialize to 1. (lang_f_options): Add store-check option. * jvspec.c: Don't pass store-check option to jvgenmain. * lang-options.h: Add help string for -fno-store-check. From-SVN: r50129
2002-02-20builtins.c (check_for_builtin): New function.Per Bothner1-1/+3
* builtins.c (check_for_builtin): New function. (build_call_or_builtin): Remove. * java-tree.h: Update accordingly. * expr.c (expand_invoke): Use build + check_for_builtin instead of build_call_or_builtin. * parse.y (patch_invoke): Likewise. This avoids needlessly creating a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER flag (which had caused jcf-write to incorrectly emit invokevirtual). From-SVN: r49909
2002-01-28expr.c (build_jni_stub): Ensure storage for `meth' is generated.Tom Tromey1-1/+6
* expr.c (build_jni_stub): Ensure storage for `meth' is generated. * parse.y (java_complete_expand_methods): Set current_function_decl before building JNI stub. From-SVN: r49286
2002-01-27reverted accidental checkinTom Tromey1-6/+1
From-SVN: r49272
2002-01-27builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not BUILT_IN_SQRTF.Andreas Tobler1-1/+6
2002-01-26 Andreas Tobler <a.tobler@schweiz.ch> * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not BUILT_IN_SQRTF. From-SVN: r49271