aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/java-tree.h
AgeCommit message (Collapse)AuthorFilesLines
2001-09-14java-tree.h (TYPE_IMPORT_LIST): New macro.Alexandre Petit-Bianco1-0/+4
2001-09-13 Alexandre Petit-Bianco <apbianco@redhat.com> * java-tree.h (TYPE_IMPORT_LIST): New macro. (TYPE_IMPORT_DEMAND_LIST): Likewise. (struct lang_type): New fields import_list and import_demand_list. * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST with ctxp counterparts. (do_resolve_class): New local saved_enclosing_type, initialized, passed as parameter to find_in_imports and find_in_imports_on_demand. (find_in_imports): Added paramater enclosing_type, use its TYPE_IMPORT_LIST when applicable. (find_in_imports_on_demand): Added parameter enclosing_type, use its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals declaration and initialization. (fold_constant_for_init): Switch/restore current_class to the appropriate context. ( http://gcc.gnu.org/ml/gcc-patches/2001-09/msg00563.html ) From-SVN: r45619
2001-09-07java-tree.h (compile_resource_file): Grouped with other prototypes.Alexandre Petit-Bianco1-3/+1
2001-09-06 Alexandre Petit-Bianco <apbianco@redhat.com> * java-tree.h (compile_resource_file): Grouped with other prototypes. * jvspec.c (lang_specific_driver): Removed unused local `ptr.' (http://gcc.gnu.org/ml/gcc-patches/2001-09/msg00249.html ) From-SVN: r45475
2001-09-06class.c (O_BINARY): Define if necessary.Anthony Green1-0/+6
* class.c (O_BINARY): Define if necessary. (registerResource_libfunc): Declare. (init_class_processing): Initilize registerResource_libfunc. (compile_resource_file): New function. * java-tree.h (resource_name): Declare. (compile_resource_file): Declare. * jcf-parse.c (yyparse): Handle compiling java resource files. * lang.c (java_decode_option): Handle -fcompile-resource option. * jvspec.c (lang_specific_driver): Handle -R flag for compiling resource files. * gcj.texi (Code Generation): Add documentation for -R flag. From-SVN: r45448
2001-08-17[multiple changes]Alexandre Petit-Bianco1-3/+17
2001-08-16 Alexandre Petit-Bianco <apbianco@redhat.com> * jcf-parse.c (load_class): New locals saved and class_loaded. If loading a class_or_name fails, try considering an innerclass name and load the enclosing context. * parse.y (resolve_inner_class): New function. (find_as_inner_class): Added leading comment. (register_incomplete_type): Keep the current context as enclosing context for JDEP_FIELD dependencies. (do_resolve_class): Locals new_class_decl and super initialized to NULL. Call resolve_inner_class, explore the enclosing context superclass if necessary. Fixes PR java/4007 2001-08-12 Alexandre Petit-Bianco <apbianco@redhat.com> * decl.c (init_decl_processing): exception_type_node, class_not_found_type_node, and no_class_def_found_type_node initialized. predef_filenames augmented accordingly. instinit_identifier_node initialized. * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed. * java-tree.h (enum java_tree_index): New entries JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE, JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE. (exception_type_node): New macro. (class_not_found_type_node): Likewise. (no_class_def_found_type_node): Likewise. (instinit_identifier_node): Likewise. (PREDEF_FILENAMES_SIZE): Adjusted. (TYPE_HAS_FINAL_VARIABLE): Fixed typo. (struct lang_type): Fixed typo in bitfield name. (DECL_INSTINIT_P): New macro. (ID_INSTINIT_P): Likewise. * jcf-write.c (generate_classfile): instinit$ bears the Synthetic attribute. * parse.y (encapsulate_with_try_catch): New function. (generate_instinit): Likewise. (build_instinit_invocation): Likewise. (ctors_unchecked_throws_clause_p): Likewise. (add_instance_initializer): Deleted. (build_instance_initializer): Likewise. (in_instance_initializer): Likewise. (check_method_redefinition): instinit$ not to be verified. (java_complete_expand_methods): Generate instinit$, simplified code. (build_dot_class_method): Eliminated unnecessary locals. Use encapsulate_with_try_catch, removed unnecessary code. (fix_constructors): New local iii. Use build_instinit_invocation. (patch_method_invocation): Added comment. (maybe_use_access_method): Don't consider instinit$. (find_applicable_accessible_methods_list): Shorten the search for instinit$ too. (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed. (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer. (patch_throw_statement): Likewise. Fixed typo. 2001-08-09 Alexandre Petit-Bianco <apbianco@redhat.com> * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and `poplevel' in the right order. (http://gcc.gnu.org/ml/gcc-patches/2001-08/msg01061.html ) From-SVN: r44982
2001-08-08check-init.c (flags.h): IncludeAlexandre Petit-Bianco1-3/+33
2001-08-08 Alexandre Petit-Bianco <apbianco@redhat.com> * check-init.c (flags.h): Include (check_init): Don't report uninitialized static class initialization flags, don't free bit index when doing static class initialization optimization. (check_for_initialization): Return type changed to `unsigned int.' (attach_initialized_static_class): New function. * class.c (add_method_1): Create the initialized static class table if necessary. (finish_class): Always emit deferred inline methods. * decl.c (emit_init_test_initialization): Moved to expr.c (complete_start_java_method): Don't traverse DECL_FUNCTION_INIT_TEST_TABLE. (lang_mark_tree): Mark hash tables in function decls. * expr.c (emit_init_test_initialization): Moved from decl.c. (build_class_init): Create LAG_DECL_SPECIFIC for the static class initialization flag, set DECL_CONTEXT and LOCAL_CLASS_INITIALIZATION_FLAG. (java_lang_expand_expr): Emit initialization code for static class initialized flags when entering block, if necessary. * gcj.texi (-fno-optimize-static-class-initialization): Documented. * java-tree.h (flag_optimize_sci): New global variable declaration. (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro. (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise. (LOCAL_FINAL_P): Fixed typo in comment. (FINAL_VARIABLE_P): Likewise. (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro. (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise. (struct lang_decl): New fields `ict', `smic' and `cif.' (check_for_initialization): New returned value for global. (attach_initialized_static_class): New global function. (STATIC_CLASS_INIT_OPT_P): New macro. * lang-options.h (-fno-optimize-static-class-initialization): New flag. * lang.c (java_decode_option): Handle `-fno-optimize-static-class-initialization' * parse.y (start_complete_expand_method): New function. (java_expand_method_bodies): Likewise. (attach_init_test_initialization_flags): Likewise. (adjust_init_test_initialization): Likewise. (emit_test_initialization): Likewise. (java_complete_expand_methods): Nullify abstract and native method bodies. (java_complete_expand_method): New locals `fbody', `block_body' and `exception_copy.' Reorganized: directly return on empty method bodies, call `start_complete_expand_method', remember definitely initialized static class in function, don't expand method bodies. (java_expand_classes): Call `java_expand_method_bodies' before `finish_class' when compiling to native. (resolve_expression_name): Use `orig' after building outer class field access. (patch_invoke): Remember static method invokations. (http://gcc.gnu.org/ml/gcc-patches/2001-08/msg00454.html) From-SVN: r44733
2001-08-02java-tree.h (all_class_filename): New macro.Alexandre Petit-Bianco1-8/+12
2001-08-02 Alexandre Petit-Bianco <apbianco@redhat.com> * java-tree.h (all_class_filename): New macro. (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.' (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link newly created IDENTIFIER_NODE to `all_class_filename.' (http://gcc.gnu.org/ml/gcc-patches/2001-08/msg00093.html) Proxima Estacion Esperanza From-SVN: r44588
2001-08-01java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): Use ggc_add_tree_root to ↵Jeff Sturm1-1/+1
register roots. * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): Use ggc_add_tree_root to register roots. From-SVN: r44530
2001-07-06lang.c (flag_assume_compiled): Removed.Tom Tromey1-5/+0
* lang.c (flag_assume_compiled): Removed. * java-tree.h (flag_assume_compiled): Removed. * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc, -fhash-synchronization, -fuse-divide-subroutine, -fcheck-references, -femit-class-file, -femit-class-files, -fassume-compiled. Updated --encoding information. Changed -foutput-class-dir to `-d'. From-SVN: r43799
2001-06-27class.c (set_super_info): Call `set_class_decl_access_flags.'Alexandre Petit-Bianco1-0/+1
2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com> * class.c (set_super_info): Call `set_class_decl_access_flags.' (set_class_decl_access_flags): New function. * java-tree.h (set_class_decl_access_flags): New prototype. * jcf-parse.c (handle_innerclass_attribute): Read and set access flags. (parse_class_file): New local `decl_max_locals.' Take wide types into account to compute DECL_MAX_LOCALS. * parse.y (type_import_on_demand_declaration:): Ignore duplicate imports on demand. (http://gcc.gnu.org/ml/gcc-patches/2001-06/msg01718.html ) From-SVN: r43618
2001-04-26Fix method search wrt scope of inner classes to match JLS2.Per Bothner1-0/+1
From-SVN: r41604
2001-04-26jcf-write.c (generate_bytecode_insns case SWITCH_EXPR): Fix thinko: If a ↵Per Bothner1-0/+1
single case, use if_icmpeq, not ifeq. * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR): Fix thinko: If a single case, use if_icmpeq, not ifeq. * constants.c (find_methodref_with_class_index): New function. (find_methodref_index): Use find_methodref_with_class_index. * java-tree.h (find_methodref_with_class_index): New declaration. * jcf-write.c (generate_bytecode_insns case CALL_EXPR): Don't change DECL_CONTEXT, instead use new find_methodref_with_class_index function. If context changed from interface to class, don't use invokeinterface. From-SVN: r41601
2001-04-20Fixes to compile multiple .class files at once.Per Bothner1-3/+8
From-SVN: r41472
2001-04-05re PR java/1315 (Inner class initializer crash)Alexandre Petit-Bianco1-0/+2
2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com> * java-tree.h (struct lang_decl): New macro `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.' * parse.y (build_instance_initializer): New function. (add_instance_initializer): Use it. (java_fix_constructors): Set `current_class' before fix pass. (fix_constructors): Just return if already fixed. Move `super()' invokation ahead. Use `build_instance_initializer.' Fixes PR java/1315. (http://gcc.gnu.org/ml/gcc-patches/2001-04/msg00343.html) From-SVN: r41129
2001-04-04java-tree.h (CONSTANT_VALUE_P): New macro.Per Bothner1-0/+7
* java-tree.h (CONSTANT_VALUE_P): New macro. * jcf-write.c (generate_classfile): Use CONSTANT_VALUE_P. * parse.y (maybe_build_class_init_for_field): New static function. (resolve_expression_name, resolve_field_access): Use maybe_build_class_init_for_field instead of build_class_init This does not do the init if the field is compile-time-constant. (resolve_field_access): Simplify. * parse.y (fold_constant_for_init): Merge test into switch. From-SVN: r41094
2001-03-28IA-64 ABI Exception Handling.Richard Henderson1-3/+1
From-SVN: r40924
2001-03-28java-tree.h (throw_node): Define as a single member of java_global_trees ↵Richard Henderson1-1/+3
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-23re PR java/1208 (Gcj can't compile a class file it generates.)Per Bothner1-1/+1
e * verify.c (verify_jvm_instructions): Replace 3 pop_type by POP_TYPE macro for better error pin-pointing. * java-tree.h: Fix typo in comment. * jcf-write.c (generate_bytecode_insns): Changes to TRY_FINALLY_EXPR. Don't include jsr/goto in exception range. Check if start and end of exception range are the same (also TRY_EXPR). Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false. However, do emit the following goto even if try_block is empty. Defer freeing exception_decl until after the finalizer, to make sure the local isn't reused in the finalizer. Fixes PR java/1208. * parse.y (java_complete_lhs): If the try-clause is empty, just return the finally-clause and vice versa. From-SVN: r40801
2001-03-23re PR java/1213 (gcj should check for incorrect CLASSPATH)Alexandre Petit-Bianco1-0/+4
2001-03-22 Alexandre Petit-Bianco <apbianco@redhat.com> * gcj.texi (Input Options): documented the check for attribute `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag. * java-tree.h (flag_force_classes_archive_check): Declared extern. * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro. (jcf_parse): Check for the right classes archive if necessary. * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it. (jcf_parse_fields): Fixed indentation. * jcf-write.c (append_gcj_attribute): New function. (generate_classfile): Compute the attribute count, invoke `append_gcj_attribute'. * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source' turned into bit fields. New bit field `right_zip.' (JCF_ZERO): Set `right_zip' to zero. * lang-options.h (-fforce-classes-archive-check): Added flag. * lang.c (flag_force_classes_archive_check): New flag. (lang_f_options): New entry `force-classes-archive-check.' Fixes PR java/1213. (http://gcc.gnu.org/ml/gcc-patches/2001-03/msg01662.html) From-SVN: r40788
2001-03-23gcj.texi (Configure-time Options): Add -fcheck-references.Andrew Haley1-0/+5
2001-02-07 Andrew Haley <aph@redhat.com> * gcj.texi (Configure-time Options): Add -fcheck-references. * expr.c (build_java_indirect_ref): New function. (build_java_array_length_access): Use build_java_indirect_ref to check for null references. (build_java_arrayaccess): Likewise. (build_get_class): Likewise. (build_field_ref): Likewise. (invoke_build_dtable): Likewise. (build_invokeinterface): Likewise. * lang.c (lang_f_options): Add flag_check_references. * jvspec.c (jvgenmain_spec): Add flag_check_references. * java-tree.h (flag_check_references): New variable. * lang.c (flag_check_references): Likewise. From-SVN: r40780
2001-03-19Fixes to process to command-line .class files in two passes. See ChangeLog.Per Bothner1-3/+9
From-SVN: r40637
2001-03-15java-tree.h (BLOCK_IS_IMPLICIT): New flag.Per Bothner1-0/+3
* 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-03-05Fix a problem where rest_of_decl_compilation applied to class_dtable_decl ↵Per Bothner1-5/+0
causes problems because it was done too early... Fix a problem where rest_of_decl_compilation applied to class_dtable_decl causes problems because it was done too early, before output file was opened. * decl.c (init_decl_processing): Remove init of class_dtable_decl. * class.c (class_dtable_decl): Add macro - element of class_roots. (make_class_data): Define class_dtable_decl. * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl): Removed. From-SVN: r40256
2001-03-02xm-lynx.h, [...]: Do not define TRUE or FALSE.Zack Weinberg1-1/+1
* config/xm-lynx.h, config/xm-std32.h, config/a29k/xm-a29k.h, config/a29k/xm-unix.h, config/alpha/xm-alpha.h, config/arc/xm-arc.h, config/arm/xm-arm.h, config/c4x/xm-c4x.h, config/clipper/xm-clix.h, config/convex/xm-convex.h, config/d30v/xm-d30v.h, config/dsp16xx/xm-dsp16xx.h, config/elxsi/xm-elxsi.h, config/fr30/xm-fr30.h, config/h8300/xm-h8300.h, config/i370/xm-i370.h, config/i370/xm-linux.h, config/i370/xm-mvs.h, config/i370/xm-oe.h, config/i386/xm-aix.h, config/i386/xm-i386.h, config/i386/xm-osf.h, config/i860/xm-i860.h, config/i960/xm-i960.h, config/ia64/xm-ia64.h, config/m32r/xm-m32r.h, config/m68k/xm-m68k.h, config/m88k/xm-m88k.h, config/mcore/xm-mcore.h, config/mips/xm-mips.h, config/mn10200/xm-mn10200.h, config/mn10300/xm-mn10300.h, config/ns32k/xm-ns32k.h, config/pa/xm-linux.h, config/pa/xm-pa.h, config/pa/xm-pa64hpux.h, config/pa/xm-pahpux.h, config/pa/xm-papro.h, config/pj/xm-pj.h, config/romp/xm-romp.h, config/rs6000/xm-beos.h, config/rs6000/xm-rs6000.h, config/rs6000/xm-sysv4.h, config/sh/xm-sh.h, config/sparc/xm-sparc.h, config/sparc/xm-sysv4.h, config/v850/xm-v850.h, config/vax/xm-vax.h, config/vax/xm-vms.h, config/we32k/xm-we32k.h: Do not define TRUE or FALSE. * config/i386/xm-aix.h, config/i386/xm-osf.h: Delete; made empty by above change. * config.gcc: Remove references to these files. * configure.in: Detect stdbool.h. * configure, config.in: Regenerate. * system.h: Include stddef.h here if available. Set HAVE__BOOL based on GCC_VERSION and __STDC_VERSION__. Then set up a sensible boolean type at the very end. * combine.c, cse.c, expr.c, fold-const.c, gensupport.c, f/com.c, config/mcore/mcore.c: Rename variables named 'true' and/or 'false'. * hash.h: Delete 'boolean' typedef and related #undefs. * f/proj.h: Delete 'bool' type. Don't include stddef.h here. * function.c, ggc-common.c, hash.h, hash.c, tlink.c, cp/decl.c, java/class.c, java/decl.c, java/java-tree.h: Replace all uses of 'boolean' with 'bool'. From-SVN: r40176
2001-02-23Handle compiling multiple input files at once, and @FILE syntax. See ChangeLog.Per Bothner1-0/+3
From-SVN: r40024
2001-02-13decl.c (classdollar_identifier_node): Initialize.Alexandre Petit-Bianco1-0/+4
2001-02-13 Alexandre Petit-Bianco <apbianco@cygnus.com> * decl.c (classdollar_identifier_node): Initialize. * java-tree.h (enum java_tree_index): New entry `JTI_CLASSDOLLAR_IDENTIFIER_NODE.' (classdollar_identifier_node): New macro. (ID_CLASSDOLLAR_P): Likewise. * parse.y (build_dot_class_method): Use `classdollar_identifier_node.' (build_dot_class_method_invocation): Likewise. (find_applicable_accessible_methods_list): `class$' can't be inherited. (http://gcc.gnu.org/ml/gcc-patches/2001-02/msg00760.html) From-SVN: r39650
2001-02-08Make-lang.in (JAVA_OBJS): Added java/mangle_name.oAlexandre Petit-Bianco1-0/+1
2001-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com> * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o (JVGENMAIN_OBJS): Likewise. * java-tree.h (append_gpp_mangled_name): New prototype. * jcf-parse.c (ggc_mark_jcf): Argument now `void *.' Removed cast calling `gcc_add_root.' * jvgenmain.c (mangle_obstack): New global, initialized. (main): Use it. (do_mangle_class): Constify local `ptr.' Removed macro `MANGLE_NAME.' Removed cast in `for.' Call append_gpp_mangle_name and update `count' if necessary. Use `mangle_obstack.' * mangle.c (append_unicode_mangled_name): Removed. (append_gpp_mangled_name): Likewise. (unicode_mangling_length): Likewise. (mangle_member_name): Return type set to `void.' (mangle_field_decl): Don't append `U' in escaped names. (mangle_method_decl): Likewise. (mangle_member_name): Just use `append_gpp_mangled_name.' * mangle_name.c: New file. (http://gcc.gnu.org/ml/gcc-patches/2001-02/msg00492.html) From-SVN: r39552
2001-02-04diagnostic.h (set_internal_error_function): Renamed.Richard Kenner1-1/+1
* 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-30java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.Bryce McKinlay1-3/+0
* java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE. * decl.c (init_decl_processing): Use integer_minus_one_node, not integer_negative_one_node. * expr.c (build_java_binop): Likewise. From-SVN: r39337
2001-01-25ChangeLog (2001-01-21): Fixed typo.Alexandre Petit-Bianco1-1/+3
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
2001-01-15All files with updated copyright when applicable.Alexandre Petit-Bianco1-5/+9
2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com> All files with updated copyright when applicable. * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o. * class.c (mangle_class_field): Function removed. (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise. (utf8_cmp, cxx_keyword_p): Moved to lex.c. (build_class_ref): Call `java_mangle_class_field' instead of `mangle_class_field.' (build_dtable_decl): Rewritten to call `java_mangle_vtable.' (layout_class): Call `java_mangle_decl' instead of `mangle_static_field.' (cxx_keywords): Initialized static array moved to `lex.c.' (layout_class_method): Changed leading comment. Simplified to call `java_mangle_decl.' Local `ptr' moved in for loop body. * decl.c (lang_mark_tree): Mark field `package_list.' * java-tree.h (TYPE_PACKAGE_LIST): New macro. (struct lang_type): New field `package_list.' (unicode_mangling_length): Prototype removed. (append_gpp_mangled_name, append_gpp_mangled_classtype, emit_unicode_mangled_name): Likewise. (cxx_keyword_p): New prototype. (java_mangle_decl, java_mangle_class_field, java_mangle_class_field_from_string, java_mangle_vtable): Likewise. * jcf-parse.c (jcf_parse_source): Constify `file' argument to `build_expr_wfl.' * jvgenmain.c (main_method_prefix): Global variable removed. (main_method_suffix): Likewise. (do_mangle_classname): New function. (main): Call it. Format changed to accomodate new mangling scheme. * lex.c: (utf8_cmp): Conditionally prototyped. (cxx_keywords): Moved from class.c, conditionally defined. (utf8_cmp, cxx_keyword_p): Likewise. * mangle.c (obstack.h, ggc.h): Included. (mangle_field_decl): New function. (mangle_method_decl, mangle_type, mangle_pointer_type, mangle_array_type, mangle_record_type, find_compression_pointer_match, find_compression_array_match, find_compression_record_match, find_compression_array_template_match, set_type_package_list, entry_match_pointer_p, emit_compression_string, init_mangling, finish_mangling, compression_table_add, mangle_member_name): Likewise. (mangle_obstack): New global. (MANGLE_RAW_STRING): New macro. (unicode_mangling_length): Turned static. (append_unicode_mangled_name): Renamed from `emit_unicode_mangled_name.' Turned static. `mangle_obstack' replaces `obstack', removed from the parameter list. (append_gpp_mangled_name): Turned static. `mangle_obstack' replaces parameter `obstack', removed from the parameter list. Call `append_unicode_mangled_name' instead of `emit_unicode_mangled_name. (append_gpp_mangled_classtype): Removed. (compression_table, compression_next): New static variables. * parse.y (temporary_obstack): Extern declaration removed. (This is the new C++ ABI compatibility patch: http://gcc.gnu.org/ml/gcc-patches/2001-01/msg01225.html) From-SVN: r39031
2001-01-14Various patches to emit better messages on verification errors.Per Bothner1-2/+8
From-SVN: r39019
2001-01-10[multiple changes]Alexandre Petit-Bianco1-0/+1
2001-01-08 Alexandre Petit-Bianco <apbianco@cygnus.com> * java-tree.h (lang_printable_name_wls): New prototype. * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT rather than `current_class' to print type name. Don't prepend type names when printing constructor names. (lang_printable_name_wls): New function. * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE. * parse.y (patch_method_invocation): Message tuned for constructors. (not_accessible_p): Grant `private' access from within enclosing contexts. 2001-01-05 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (patch_binop): Compute missing type in error situations. (http://gcc.gnu.org/ml/gcc-patches/2001-01/msg00752.html) From-SVN: r38870
2000-12-06[multiple changes]Alexandre Petit-Bianco1-13/+61
2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com> * jcf-write.c (OP1): Update `last_bc'. (struct jcf_block): Fixed indentation and typo in comments. New field `last_bc'. (generate_bytecode_insns): Insert `nop' if `jsr' immediately follows `monitorenter'. * parse.y (patch_synchronized_statement): New local `tmp'. Call `patch_string'. Fixes gcj/232. 2000-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com> * check-init.c (check_init): Fixed leading comment. Use LOCAL_FINAL_P. * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC. (give_name_to_locals): Likewise. (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl' fields in lang_decl_var. * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR, DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros. (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten. (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC, DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros. (LOCAL_FINAL): Rewritten. (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros. (struct lang_decl): Fixed comments. Added `synthetic_ctor' and `init_final' fields. (struct lang_decl_var): Fixed leading comment. Added `am', `wfl', `final_uid', `final_liic', `final_ierr' and `local_final' fields. (TYPE_HAS_FINAL_VARIABLE): New macro. (struct lang_type): Added `afv' field. * parse.y (check_static_final_variable_assignment_flag): New function. (reset_static_final_variable_assignment_flag): Likewise. (check_final_variable_local_assignment_flag): Likewise. (reset_final_variable_local_assignment_flag): Likewise. (check_final_variable_indirect_assignment): Likewise. (check_final_variable_global_assignment_flag): Likewise. (add_inner_class_fields): Use LOCAL_FINAL_P. (register_fields): Handle local finals and final variables. (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR. (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC. (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC on local finals. (java_complete_expand_methods): Loop to set TYPE_HAS_FINAL_VARIABLE. Call `reset_final_variable_local_assignment_flag' and `check_final_variable_local_assignment_flag' accordingly before and after constructor expansion. Call `reset_static_final_variable_assignment_flag' before expanding <clinit> and after call `check_static_final_variable_assignment_flag' if the current_class isn't an interface. After all methods have been expanded, call `check_final_variable_global_assignment_flag' and `check_static_final_variable_assignment_flag' if the current class is an interface. (maybe_yank_clinit): Fixed typo in comment. (build_outer_field_access_methods): Removed old sanity check. Use FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC. Don't create access methods for finals. (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'. (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if existing DECL_INIT has been processed. (java_complete_lhs): Likewise. (check_final_assignment): Filter input on `lvalue''s TREE_CODE. Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new logic. (patch_assignment): Use LOCAL_FINAL_P. (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if DECL_INITIAL is nullified. Fixes gcj/163. 2000-10-09 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (pop_current_osb): New function. (array_type:): Use `dims:', changed actions accordingly. Suggested by Anthony Green. (array_creation_expression:): Used pop_current_osb. (cast_expression:): Likewise. (search_applicable_method_list): Fixed indentation. 2000-10-08 Anthony Green <green@redhat.com> * parse.y (array_type_literal): Remove production. (type_literals): Refer to array_type, not array_type_literal. (http://gcc.gnu.org/ml/gcc-patches/2000-12/msg00317.html) From-SVN: r38070
2000-11-19java-tree.h (cyclic_inheritance_report): Constify.Kaveh R. Ghazi1-1/+1
* java-tree.h (cyclic_inheritance_report): Constify. * parse.y (cyclic_inheritance_report): Likewise. From-SVN: r37564
2000-11-04lang-options.h: Mention -Wout-of-date.Tom Tromey1-0/+4
* lang-options.h: Mention -Wout-of-date. * jcf-dump.c (flag_newer): New global. * gjavah.c (flag_newer): New global. * jcf-io.c (find_class): Only warn when flag_newer set. * lang.c (flag_newer): New global. (struct string_option): New declaration. (lang_W_options): New global. (process_option_with_no): New function. (lang_decode_option): Use it. From-SVN: r37244
2000-10-18gjavah.c (add_class_decl): Removed unused variables `tname', `tlen' and ↵Alexandre Petit-Bianco1-0/+10
`name_index'. 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com> * gjavah.c (add_class_decl): Removed unused variables `tname', `tlen' and `name_index'. * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro. * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME in `wfl_operator' with value. (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE. (jcf_figure_file_type): Fixed identation. * lex.c (java_get_line_col): Use EOF. Tuned `^' placement. * parse.y (analyze_clinit_body): New function. (static_initializer:): Reset `current_static_block'. (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in `wfl_operator' with new value. (lookup_cl): Use EXPR_WFL_FILENAME. (maybe_yank_clinit): Handle bogus <clinit> bodies, call analyze_clinit_body. (build_outer_field_access): Access to this$<n> built from current_class, not its outer context. (build_access_to_thisn): Fixed leading comment. Tidied things up. (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'. (patch_method_invocation): Use `is_static_flag' when already initialized. (patch_newarray): Removed assignment in ternary operator. (http://gcc.gnu.org/ml/gcc-patches/2000-10/msg00629.html) From-SVN: r36946
2000-10-13[multiple changes]Alexandre Petit-Bianco1-1/+1
2000-10-11 Rodney Brown <RodneyBrown@mynd.com> * java-tree.h: Constify current_encoding. * lang.c: Constify current_encoding. 2000-10-10 Jeff Sturm <jeff.sturm@appnet.com> * jvgenmain.c (class_mangling_suffix): Omit `.'. (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'. 2000-10-10 Alexandre Petit-Bianco <apbianco@cygnus.com> * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's patch. Fixes gcj/340. (http://gcc.gnu.org/ml/gcc-patches/2000-10/msg00374.html) From-SVN: r36864
2000-10-13Remove obstacks.Mark Mitchell1-2/+0
* 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-10-05[multiple changes]Alexandre Petit-Bianco1-0/+2
Tue Oct 3 13:44:37 2000 Alexandre Petit-Bianco <apbianco@cygnus.com> * decl.c (find_local_variable): Removed uncessary type check and fixed range check typo. From Corey Minyard. Wed Sep 13 16:06:52 2000 Alexandre Petit-Bianco <apbianco@cygnus.com> * decl.c (give_name_to_locals): New local `code_offset'. Call `maybe_adjust_start_pc.' * expr.c (note_instructions): New function. (expand_byte_code): Don't collect insn starts here. (peek_opcode_at_pc): New function. (maybe_adjust_start_pc): Likewise. * java-tree.h (maybe_adjust_start_pc): Declare. (note_instructions): Likewise. * jcf-parse.c (parse_class_file): Call `note_instructions.' Wed Sep 13 11:50:35 2000 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (field_access:): Fixed indentation. (qualify_ambiguous_name): Properly qualify `this.a[b].c'. (http://gcc.gnu.org/ml/gcc-patches/2000-10/msg00067.html) From-SVN: r36717
2000-10-01c-decl.c (c_expand_body): Don't generate RTL if flag_syntax_only.Mark Mitchell1-8/+6
* c-decl.c (c_expand_body): Don't generate RTL if flag_syntax_only. (lang_mark_false_label_stack): Remove. * c-lex.c (init_c_lex): Add file_info_tree as GC root. Allocate <top level> string in GC area. (mark_splay_tree_node): New function. (mark_splay_tree): Likewise. * except.c (mark_eh_status): Only call lang_mark_false_label_stack if it exists. * ggc-callbacks.c (lang_mark_false_label_stack): Remove. * ggc-common.c (lang_mark_false_label_stack): Change type. * ggc.h (ggc_alloc_string): Add comment. (ggc_strdup): New function. * decl.c (lang_mark_false_label_stack): Remove. * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared. * com.c (lang_mark_false_label_stack): Remove. Convert to GC. * Make-lang.in (s-java): Don't depend on ggc-callbacks.o. * Makefile.in (BACKEND): Don't include ggc-callbacks.o. (typeck.o): Depend on ggc.h. * class.c (add_method_1): Use GC functions for allocation. (init_class_processing): Register roots. * decl.c (ggc_p): Set to 1. (pending_local_decls): Make it static. (push_jvm_slot): Use GC functions for allocation. (init_decl_processing): Register roots. (give_name_to_locals): Use GC functions for allocation. (lang_mark_tree): New function. * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC functions for allocation. * jcf-parse.c (jcf_parse_source): Use ggc_strdup. * lex.c (java_lex): Use build_string, rather than replicating it inline. * parse.y (goal): Add more roots. (mark_parser_ctxt): New function. * typeck.c: Include ggc.h. * splay-tree.c (splay_tree_insert): Fix formatting. From-SVN: r36687
2000-09-23Make-lang.in (JAVA_SRCS): Include java-tree.h.Mark Mitchell1-119/+381
* 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-0/+3
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-29expr.c (can_widen_reference_to): Fixed indentation.Alexandre Petit-Bianco1-0/+2
2000-08-29 Alexandre Petit-Bianco <apbianco@cygnus.com> * expr.c (can_widen_reference_to): Fixed indentation. * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment. * parse.y: `finit$' replaces `$finit$' in comments. (try_builtin_assignconv): Fixed leading comment. (http://gcc.gnu.org/ml/gcc-patches/2000-08/msg01246.html) From-SVN: r36039
2000-08-23java-tree.h (flag_extraneous_semicolon): New extern.Alexandre Petit-Bianco1-0/+4
2000-08-08 Alexandre Petit-Bianco <apbianco@cygnus.com> * java-tree.h (flag_extraneous_semicolon): New extern. * lang-options.h: (-Wextraneous-semicolon): New option. * lang.c (flag_redundant): Fixed typo in leading comment. (flag_extraneous_semicolon): New global. (lang_decode_option): Set `flag_extraneous_semicolon' when -Wall. Decode `-Wextraneous-semicolon'. * parse.y (type_declaration:): Removed `SC_TK' hack, added `empty_statement' rule. (class_body_declaration): Likewise. (method_body:): Accept `;' as a method body. (static_initializer:): Removed `SC_TK' hack. (constructor_block_end:): Likewise. (empty_statement:): Report deprecated empty declaration. Fixes gcj/295 (Fix to gcj/295: http://sources.redhat.com/ml/java-prs/2000-q3/msg00095.html) From-SVN: r35929
2000-08-17decl.c (finit_leg_identifier_node): New global.Alexandre Petit-Bianco1-2/+8
2000-08-15 Alexandre Petit-Bianco <apbianco@cygnus.com> * decl.c (finit_leg_identifier_node): New global. (init_decl_processing): Use `finit$' to initialize finit_identifier_node. Use `$finit$' to initialize finit_leg_identifier_node. * expr.c (expand_java_field_op): Use ID_FINIT_P. * java-tree.h (finit_identifier_node): Changed attached comment. (finit_leg_identifier_node): New declaration. (ID_FINIT_P): Take finit_identifier_node and finit_leg_identifier_node into account. This is a backward compatibility hack. (http://gcc.gnu.org/ml/gcc-patches/2000-08/msg00664.html See also the matching Java run-time patch: http://sources.redhat.com/ml/java-discuss/2000-08/msg00031.html) From-SVN: r35768
2000-08-11class.c (maybe_layout_super_class): Fixed indentation.Alexandre Petit-Bianco1-0/+4
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-20[multiple changes]Alexandre Petit-Bianco1-0/+3
2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (patch_method_invocation): Fixed comment. (maybe_use_access_method): Build this$<n>s to the context of the target method, or a type that extends it. Fixes gcj/242. 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (not_accessible_p): Access granted to innerclasses (indirectly) extending the reference type. Fixes gcj/249. 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (resolve_qualified_expression_name): Verify qualified access to `this.' Fixes gcj/239. 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com> * class.c (set_super_info): Handled protected inner classes. (common_enclosing_context_p): Bail early if arguments aren't both inner classes. (get_access_flags_from_decl): Handle private and protected inner classes. * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro. (CLASS_PROTECTED): Likewise. (struct lang_type): New bitfield `poic.' * parse.y (jdep_resolve_class): Call check_inner_class_access on inner classes only. (check_inner_class_access): Renamed arguments, added comments. Handles protected inner classes (fixes gcj/225) (not_accessible_p): Fixed comments. Avoid handling inner classes. 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (resolve_qualified_expression_name): Handle inner class access. Fixes gcj/256. (Fixes gcj/242, gcj/249, gcj/239, gcj/225 and gcj/256: http://gcc.gnu.org/ml/gcc-patches/2000-07/msg00801.html) From-SVN: r35156
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-26[multiple changes]Alexandre Petit-Bianco1-0/+3
2000-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com> * class.c (set_super_info): Handle ACC_PRIVATE for (inner) classes. * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro. (struct lang_type): New field `pic.' (CLASS_PRIVATE): New macro. * parse.y (check_inner_class_access): New function. (jdep_resolve_class): Call it. 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz> * parse.y (register_fields): Permit static fields in inner classes if they are final. Fix for PR gcj/255. (These patches are fixes to the PR #224 and #255: http://sourceware.cygnus.com/ml/java-prs/2000-q2/msg00158.html http://sourceware.cygnus.com/ml/java-prs/2000-q2/msg00287.html) From-SVN: r34725
2000-06-21[multiple changes]Alexandre Petit-Bianco1-2/+3
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