From fce8df1021b8e76afd5e8f909557826fcbf3ff19 Mon Sep 17 00:00:00 2001 From: aph Date: Mon, 29 Jun 2009 17:50:59 +0000 Subject: 2009-06-29 Andrew Haley PR java/40590 * tools/gnu/classpath/tools/javah/FieldHelper.java (print): Use printName(). * tools/gnu/classpath/tools/javah/MethodHelper.java (print): Use printName(). * tools/gnu/classpath/tools/javah/CniStubPrinter.java (printDecl): Use printName(). * tools/gnu/classpath/tools/javah/Keywords.java (words): Replace with keywords list from gcc/java/mangle.c. * tools/gnu/classpath/tools/javah/ClassWrapper.java (printMethods): Don't pre-convert a C++ keyword. (print(CniPrintStream)): Call CniPrintStream.printName(). (printContents): Likewise. * tools/gnu/classpath/tools/javah/CniPrintStream.java (getClassName): Don't call replaceAll("/", "::"). (print(Type)): Add ""::" befor name, " *" after. Use printName(), not print. (printName(PrintStream, String), printName(String), printlnName): New methods. (moveToPackage): Use printName(). 2009-06-29 Andrew Haley PR java/40590 * java-tree.h (cxx_keyword_p): New declaration. * mangle_name.c (utf8_cmp): Move here from mangle.c. (cxx_keywords): Likewise. (cxx_keyword_p): Likewise. (MANGLE_CXX_KEYWORDS): New macro. (append_gpp_mangled_name): Use MANGLE_CXX_KEYWORDS. (append_gpp_mangled_name): Likewise. * mangle.c: Move code to mangle_name.c. (mangle_member_name): Don't call cxx_keyword_p. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149059 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/java/java-tree.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/java/java-tree.h') diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h index 98352a2eaf2..6bf2ecd8217 100644 --- a/gcc/java/java-tree.h +++ b/gcc/java/java-tree.h @@ -1224,6 +1224,8 @@ extern void java_read_sourcefilenames (const char *fsource_filename); extern void rewrite_reflection_indexes (void *); +int cxx_keyword_p (const char *name, int length); + #define DECL_FINAL(DECL) DECL_LANG_FLAG_3 (DECL) /* Access flags etc for a method (a FUNCTION_DECL): */ -- cgit v1.2.1 From bfec3452cfb96a7546809ee1af3fffb9eba9d658 Mon Sep 17 00:00:00 2001 From: rguenth Date: Fri, 17 Jul 2009 15:49:34 +0000 Subject: 2009-07-17 Richard Guenther PR c/40401 * tree-pass.h (pass_diagnose_omp_blocks): Declare. (pass_warn_unused_result): Likewise. (TODO_set_props): Remove. * omp-low.c (diagnose_omp_structured_block_errors): Change to run as a pass. (pass_diagnose_omp_blocks): Define. * c-decl.c (pop_file_scope): Do not finalize the CU here. (c_gimple_diagnostics_recursively): Remove. (finish_function): Do not call it. (c_write_global_declarations): Continue after errors. Finalize the CU here. * c-gimplify.c (c_genericize): Do not gimplify here. * c-common.c (c_warn_unused_result): Move ... * tree-cfg.c (do_warn_unused_result): ... here. (run_warn_unused_result): New function. (gate_warn_unused_result): New function. (pass_warn_unused_result): New pass. * c-common.h (c_warn_unused_result): Remove. * flags.h (flag_warn_unused_result): Declare. * c-opts.c (c_common_init_options): Enable flag_warn_unused_result. * opts.c (flag_warn_unused_result): Initialize to false. * toplev.c (compile_file): Add comment. * omp-low.c (create_omp_child_function): Do not register the function with the frontend. (diagnose_omp_structured_block_errors): Prepare to be called as optimization pass. (gate_diagnose_omp_blocks): New function. (pass_diagnose_omp_blocks): New pass. * cgraph.h (cgraph_optimize): Remove. (cgraph_analyze_function): Likewise. * cgraph.c (cgraph_add_new_function): Gimplify C++ thunks. * cgraphunit.c (cgraph_lower_function): Lower nested functions before their parents here. (cgraph_finalize_function): Not here. (cgraph_analyze_function): Gimplify functions here. (cgraph_finalize_compilation_unit): Continue after errors. Optimize the callgraph from here. (cgraph_optimize): Make static. * langhooks.c (write_global_declarations): Finalize the CU. * gimplify.c (gimplify_asm_expr): Do not emit ASMs with errors. (gimplify_function_tree): Assert we gimplify only once. Set PROP_gimple_any property. * tree-nested.c (gimplify_all_functions): New function. (lower_nested_functions): Gimplify all nested functions. * gimple.h (diagnose_omp_structured_block_errors): Remove. * passes.c (init_optimization_passes): Add pass_warn_unused_result and pass_diagnose_omp_blocks after gimplification. Do not set TODO_set_props on all_lowering_passes. (execute_one_pass): Do not handle TODO_set_props. * Makefile.in (cgraphunit.o): Add $(TREE_DUMP_H) dependency. (gimplify.o): Add tree-pass.h dependency. * tree-inline.c (copy_statement_list): Properly copy STATEMENT_LIST. (copy_tree_body_r): Properly handle TARGET_EXPR like SAVE_EXPR. (unsave_r): Likewise. * c-omp.c (c_finish_omp_atomic): Set DECL_CONTEXT on the temporary variable. cp/ * decl.c (finish_function): Do not emit unused result warnings from here. * cp-objcp-common.h (LANG_HOOKS_POST_GIMPLIFY_PASS): Use c_warn_unused_result_pass. * semantics.c (expand_or_defer_fn): Adjust assertion about IL status. * optimize.c (clone_body): Clone in GENERIC. (maybe_clone_body): Do not clear DECL_SAVED_TREE. * decl2.c (cp_write_global_declarations): Fix body test. Do not call cgraph_optimize. * Make-lang.in (optimize.o): Add tree-iterator.h dependency. * method.c (use_thunk): Register thunk with cgraph_finalize_function. * error.c (function_category): Guard access of DECL_LANG_SPECIFIC. java/ * java-gimplify.c (java_genericize): Do not gimplify here. But replace all local references. (java_gimplify_expr): Do not replace local references here. (java_gimplify_modify_expr): Likewise. * jcf-parse.c (java_parse_file): Do not finalize the CU or optimize the cgraph here. * decl.c (java_replace_reference): Make static. (java_replace_references): New function. (end_java_method): Clear base_decl_map. * java-tree.h (java_replace_references): Declare. (java_replace_reference): Remove. ada/ * utils.c (end_subprog_body): Revert to pre-tuples state. Remove unused parameter. (gnat_gimplify_function): Do not gimplify here. Fold into its only caller and remove. (gnat_builtin_function): Adjust for end_subprog_body signature change. (gnat_write_global_declarations): Also finalize the CU. * misc.c (gnat_parse_file): Do not finalize the CU here. * trans.c (gigi): Revert to pre-tuples state. (Subprogram_Body_to_gnu): Adjust for end_subprog_body signature change. * gigi.h (end_subprog_body): Remove unused parameter. fortran/ * f95-lang.c (gfc_be_parse_file): Do not finalize the CU here. * trans-decl.c (gfc_gimplify_function): Remove. (build_entry_thunks): Do not gimplify here. (create_main_function): Likewise. (gfc_generate_function_code): Likewise. * g++.dg/rtti/crash4.C: New testcase. * g++.dg/torture/20090706-1.C: Likewise. * gcc.dg/redecl-17.c: Likewise. * gfortran.dg/missing_optional_dummy_5.f90: Adjust pattern. * gcc.dg/declspec-9.c: Expect extra error. * gcc.dg/declspec-10.c: Likewise. * gcc.dg/declspec-11.c: Likewise. * gcc.dg/redecl-10.c: Expect extra warnings. * gcc.target/i386/pr39082-1.c: Adjust diagnostic location. * gcc.target/i386/pr39545-1.c: Likewise. * g++.dg/ext/asm3.C: Expect more errors. * g++.dg/gomp/block-1.C: Likewise. * g++.dg/gomp/block-2.C: Likewise. * g++.dg/gomp/block-3.C: Likewise. * g++.dg/gomp/block-5.C: Likewise. * g++.old-deja/g++.jason/report.C: Expect extra warnings. * g++.dg/warn/unused-result1.C: XFAIL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149750 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/java/java-tree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/java/java-tree.h') diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h index 6bf2ecd8217..e68b136db71 100644 --- a/gcc/java/java-tree.h +++ b/gcc/java/java-tree.h @@ -1119,7 +1119,7 @@ extern int find_class_or_string_constant (struct CPool *, int, tree); extern tree pushdecl_top_level (tree); extern tree pushdecl_function_level (tree); -extern tree java_replace_reference (tree, bool); +extern tree java_replace_references (tree *, int *, void *); extern int alloc_class_constant (tree); extern void init_expr_processing (void); extern void push_super_field (tree, tree); -- cgit v1.2.1 From 321856ae54afc12d5aef1a56c195e51dfdd160e5 Mon Sep 17 00:00:00 2001 From: aph Date: Wed, 12 Aug 2009 16:10:12 +0000 Subject: 2009-08-12 Andrew Haley * builtins.c (compareAndSwapInt_builtin): Use flag_use_atomic_builtins. (compareAndSwapLong_builtin): Likewise. (compareAndSwapObject_builtin): Likewise. * jvspec.c: Add flag_use_atomic_builtins. * gcj.texi: Likewise. * java-tree.h: Likewise. * lang.opt: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150699 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/java/java-tree.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc/java/java-tree.h') diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h index e68b136db71..3bdd75a2ed8 100644 --- a/gcc/java/java-tree.h +++ b/gcc/java/java-tree.h @@ -145,6 +145,9 @@ extern int flag_newer; /* When nonzero, call a library routine to do integer divisions. */ extern int flag_use_divide_subroutine; +/* When nonzero, use atomic builtins. */ +extern int flag_use_atomic_builtins; + /* When nonzero, generate code for the Boehm GC. */ extern int flag_use_boehm_gc; -- cgit v1.2.1 From f639fdbff97b434f0ee9d6d2f03b6c5483efbed2 Mon Sep 17 00:00:00 2001 From: rguenth Date: Tue, 1 Sep 2009 08:38:10 +0000 Subject: 2009-09-01 Richard Guenther * tree-flow.h (mark_addressable): Move declaration ... * tree.h (mark_addressable): ... here. * stmt.c (expand_asm_operands): Use mark_addressable, not lang_hooks.mark_addressable. * langhooks-def.h (LANG_HOOKS_INITIALIZER): Remove LANG_HOOKS_MARK_ADDRESSABLE. * langhooks.h (struct lang_hooks): Remove mark_addressable langhook. * c-objc-common.h (LANG_HOOKS_MARK_ADDRESSABLE): Remove. ada/ * gcc-interface/misc.c (LANG_HOOKS_MARK_ADDRESSABLE): Remove. cp/ * cp-objcp-common.h (LANG_HOOKS_MARK_ADDRESSABLE): Remove. fortran/ * f95-lang.c (gfc_mark_addressable): Remove. (LANG_HOOKS_MARK_ADDRESSABLE): Likewise. java/ * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Remove. * java-tree.h (java_mark_addressable): Likewise. * typeck.c (java_mark_addressable): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151260 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/java/java-tree.h | 1 - 1 file changed, 1 deletion(-) (limited to 'gcc/java/java-tree.h') diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h index 3bdd75a2ed8..29027eb6463 100644 --- a/gcc/java/java-tree.h +++ b/gcc/java/java-tree.h @@ -988,7 +988,6 @@ struct GTY(()) lang_type { struct eh_range; extern void java_parse_file (int); -extern bool java_mark_addressable (tree); extern tree java_type_for_mode (enum machine_mode, int); extern tree java_type_for_size (unsigned int, int); extern tree java_truthvalue_conversion (tree); -- cgit v1.2.1 From e38def9ca7953bb5611d08ce8617249516ba5a99 Mon Sep 17 00:00:00 2001 From: rth Date: Mon, 14 Sep 2009 19:18:58 +0000 Subject: Squash commit of EH in gimple git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151696 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/java/java-tree.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc/java/java-tree.h') diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h index 29027eb6463..8ffe2422967 100644 --- a/gcc/java/java-tree.h +++ b/gcc/java/java-tree.h @@ -714,6 +714,8 @@ union GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"), /* List of checked thrown exceptions, as specified with the `throws' keyword */ #define DECL_FUNCTION_THROWS(DECL) (DECL_LANG_SPECIFIC(DECL)->u.f.throws_list) +/* VAR_DECL containing the caught exception object. */ +#define DECL_FUNCTION_EXC_OBJ(DECL) (DECL_LANG_SPECIFIC(DECL)->u.f.exc_obj) /* For each function decl, init_test_table contains a hash table whose entries are keyed on class names, and whose values are local boolean decls. The variables are intended to be TRUE when the @@ -785,6 +787,7 @@ struct GTY(()) lang_decl_func { int arg_slot_count; source_location last_line; /* End line number for a function decl */ tree throws_list; /* Exception specified by `throws' */ + tree exc_obj; /* Decl holding the exception object. */ /* Class initialization test variables */ htab_t GTY ((param_is (struct treetreehash_entry))) init_test_table; -- cgit v1.2.1 From 3eafef1ab2554978e8e09caa01cce033143513ac Mon Sep 17 00:00:00 2001 From: froydnj Date: Fri, 14 May 2010 20:47:39 +0000 Subject: PR 44103 * java-tree.h (START_RECORD_CONSTRUCTOR): Change first argument to a vector. Move call to build_constructor... (FINISH_RECORD_CONSTRUCTOR): ...here. Add necessary arguments. Clear TREE_CONSTANT on the constructor. (PUSH_SUPER_VALUE): Change first argument to a vector. (PUSH_FIELD_VALUE): Likewise. * resource.c (compile_resource_data): Update calls to above macros. * constants.c (build_constants_constructor): Likewise. * class.c (build_utf8_ref): Likewise. (make_field_value): Likewise. (make_method_value): Likewise. (add_table_and_syms): New function. (make_class_data): Call it. Update calls to above macros. (build_symbol_table_entry): New function. (build_symbol_entry): Call it. Update calls to above macros. (emit_symbol_table): Likewise. (make_catch_class_record): Update calls to above macros. (build_assertion_table_entry): New function. (add_assertion_table_entry): Call it. (emit_assertion_table): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159414 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/java/java-tree.h | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) (limited to 'gcc/java/java-tree.h') diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h index 8ffe2422967..c60298ba4d3 100644 --- a/gcc/java/java-tree.h +++ b/gcc/java/java-tree.h @@ -1461,50 +1461,54 @@ extern tree *type_map; #define FINISH_RECORD(RTYPE) layout_type (RTYPE) -/* Start building a RECORD_TYPE constructor with a given TYPE in CONS. */ -#define START_RECORD_CONSTRUCTOR(CONS, CTYPE) \ +/* Start building a RECORD_TYPE constructor's elements in V. The + constructor will have type CTYPE. */ +#define START_RECORD_CONSTRUCTOR(V, CTYPE) \ do \ { \ - CONS = build_constructor ((CTYPE), VEC_alloc (constructor_elt, gc, 0)); \ - CONSTRUCTOR_APPEND_ELT (CONSTRUCTOR_ELTS (CONS), TYPE_FIELDS (CTYPE), \ - NULL); \ + V = VEC_alloc (constructor_elt, gc, 0); \ + CONSTRUCTOR_APPEND_ELT (V, TYPE_FIELDS (CTYPE), NULL); \ } \ while (0) -/* Append a field initializer to CONS for the dummy field for the inherited +/* Append a field initializer to V for the dummy field for the inherited fields. The dummy field has the given VALUE, and the same type as the super-class. Must be specified before calls to PUSH_FIELD_VALUE. */ -#define PUSH_SUPER_VALUE(CONS, VALUE) \ +#define PUSH_SUPER_VALUE(V, VALUE) \ do \ { \ - constructor_elt *_elt___ = VEC_last (constructor_elt, \ - CONSTRUCTOR_ELTS (CONS)); \ + constructor_elt *_elt___ = VEC_last (constructor_elt, V); \ tree _next___ = TREE_CHAIN (_elt___->index); \ gcc_assert (!DECL_NAME (_elt___->index)); \ _elt___->value = VALUE; \ - CONSTRUCTOR_APPEND_ELT (CONSTRUCTOR_ELTS (CONS), _next___, NULL); \ + CONSTRUCTOR_APPEND_ELT (V, _next___, NULL); \ } \ while (0) -/* Append a field initializer to CONS for a field with the given VALUE. +/* Append a field initializer to V for a field with the given VALUE. NAME is a char* string used for error checking; the initializer must be specified in order. */ -#define PUSH_FIELD_VALUE(CONS, NAME, VALUE) \ +#define PUSH_FIELD_VALUE(V, NAME, VALUE) \ do \ { \ - constructor_elt *_elt___ = VEC_last (constructor_elt, \ - CONSTRUCTOR_ELTS (CONS)); \ + constructor_elt *_elt___ = VEC_last (constructor_elt, V); \ tree _next___ = TREE_CHAIN (_elt___->index); \ gcc_assert (strcmp (IDENTIFIER_POINTER (DECL_NAME (_elt___->index)), \ NAME) == 0); \ _elt___->value = VALUE; \ - CONSTRUCTOR_APPEND_ELT (CONSTRUCTOR_ELTS (CONS), _next___, NULL); \ + CONSTRUCTOR_APPEND_ELT (V, _next___, NULL); \ } \ while (0) -/* Finish creating a record CONSTRUCTOR CONS. */ -#define FINISH_RECORD_CONSTRUCTOR(CONS) \ - VEC_pop (constructor_elt, CONSTRUCTOR_ELTS (CONS)) +/* Finish creating a record CONSTRUCTOR CONS with type CTYPE and elements V. */ +#define FINISH_RECORD_CONSTRUCTOR(CONS, V, CTYPE) \ + do \ + { \ + VEC_pop (constructor_elt, V); \ + CONS = build_constructor (CTYPE, V); \ + TREE_CONSTANT (CONS) = 0; \ + } \ + while (0) #define BLOCK_EXPR_DECLS(NODE) BLOCK_VARS(NODE) #define BLOCK_EXPR_BODY(NODE) BLOCK_SUBBLOCKS(NODE) -- cgit v1.2.1 From 8ce390427438cd93ede36ccf2bc1db8288d22cce Mon Sep 17 00:00:00 2001 From: froydnj Date: Tue, 18 May 2010 23:45:21 +0000 Subject: gcc/ * tree.h (build_call_list): Remove. * tree.c (build_call_list): Remove. gcc/ada/ * gcc-interface/trans.c (call_to_gnu): Use build_call_vec instead of build_call_list. * gcc-interface/utils.c (build_function_stub): Likewise. gcc/cp/ * tree.c (build_min_non_dep_call_vec): Update comment. gcc/java/ * expr.c (expand_java_multianewarray): Use build_call_vec instead of build_call_list. (pop_arguments): Return a VEC instead of a tree. Take a method type rather than a list of argument types. (rewrite_rule): Change signature. of rewrite_arglist member. (rewrite_arglist_getcaller): Update signature. (rewrite_arglist_getclass): Likewise. (maybe_rewrite_invocation): Update for rewrite_arglist change. (build_known_method_ref): Take a VEC instead of a tree. (invoke_build_dtable): Likewise. (expand_invoke): Update calls to pop_arguments. Use build_call_vec instead of build_call_list. (build_jni_stub): Use build_call_vec instead of build_call_list. * java-tree.h (maybe_rewrite_invocation): Update declaration. (build_known_method_ref): Likewise. (invoke_build_dtable): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159548 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/java/java-tree.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gcc/java/java-tree.h') diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h index c60298ba4d3..fad667d5f49 100644 --- a/gcc/java/java-tree.h +++ b/gcc/java/java-tree.h @@ -1067,14 +1067,14 @@ extern void initialize_builtins (void); extern tree lookup_name (tree); extern bool special_method_p (tree); -extern void maybe_rewrite_invocation (tree *, tree *, tree *, tree *); -extern tree build_known_method_ref (tree, tree, tree, tree, tree, tree); +extern void maybe_rewrite_invocation (tree *, VEC(tree,gc) **, tree *, tree *); +extern tree build_known_method_ref (tree, tree, tree, tree, VEC(tree,gc) *, tree); extern tree build_class_init (tree, tree); extern int attach_init_test_initialization_flags (void **, void *); extern tree build_invokevirtual (tree, tree, tree); extern tree build_invokeinterface (tree, tree); extern tree build_jni_stub (tree); -extern tree invoke_build_dtable (int, tree); +extern tree invoke_build_dtable (int, VEC(tree,gc) *); extern tree build_field_ref (tree, tree, tree); extern tree java_modify_addr_for_volatile (tree); extern void pushdecl_force_head (tree); -- cgit v1.2.1 From 8faccfb9f69195ab30cced8423b3047677f92e10 Mon Sep 17 00:00:00 2001 From: jakub Date: Tue, 25 May 2010 16:19:11 +0000 Subject: PR debug/43260 * java-tree.h (pending_static_fields): New extern declaration. (java_write_globals): New prototype. * lang.c (LANG_HOOKS_WRITE_GLOBALS): Define. * decl.c (java_mark_class_local): When clearing DECL_EXTERNAL of a static field push it into pending_static_fields vector. * class.c (pending_static_fields): New variable. (add_field): If static field is not DECL_EXTERNAL, push it into pending_static_fields vector. (java_write_globals): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159828 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/java/java-tree.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gcc/java/java-tree.h') diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h index fad667d5f49..dc16eb2bc10 100644 --- a/gcc/java/java-tree.h +++ b/gcc/java/java-tree.h @@ -1,7 +1,7 @@ /* Definitions for parsing and type checking for the GNU compiler for the Java(TM) language. Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + 2005, 2006, 2007, 2008, 2010 Free Software Foundation, Inc. This file is part of GCC. @@ -1231,6 +1231,10 @@ extern void rewrite_reflection_indexes (void *); int cxx_keyword_p (const char *name, int length); +extern GTY(()) VEC(tree,gc) *pending_static_fields; + +extern void java_write_globals (void); + #define DECL_FINAL(DECL) DECL_LANG_FLAG_3 (DECL) /* Access flags etc for a method (a FUNCTION_DECL): */ -- cgit v1.2.1 From 43d03f3adddb1a5785e730b84ede1e1e85f90334 Mon Sep 17 00:00:00 2001 From: froydnj Date: Wed, 26 May 2010 13:55:30 +0000 Subject: * class.c (utf8_decl_list): Delete. (build_utf8_ref): Remove references to it. * java-tree.h (all_class_list): Delete. (predef_filenames): Delete. (enum java_tree_index) [JTI ALL_CLASS_LIST,JTI_PREDEF_FILENAMES]: Delete. * jcf-parse.c (parse_roots): Decrease size to 2. (current_file_list): Convert to a VEC. (all_class_list): Declare. (jcf_parse): Adjust for new type of all_class_list. (java_layout_seen_class_methods): Likewise. (predefined_filenames): Declare. (add_predefined_file): Use it. (predefined_filename_p): Likewise. (java_parse_file): Adjust for new type of current_file_list. * git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159870 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/java/java-tree.h | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'gcc/java/java-tree.h') diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h index dc16eb2bc10..0482abec36c 100644 --- a/gcc/java/java-tree.h +++ b/gcc/java/java-tree.h @@ -102,10 +102,6 @@ struct JCF; #define output_class \ java_global_trees[JTI_OUTPUT_CLASS] -/* List of all class DECLs seen so far. */ -#define all_class_list \ - java_global_trees[JTI_ALL_CLASS_LIST] - /* List of virtual decls referred to by this translation unit, used to generate virtual method offset symbol table. */ @@ -370,9 +366,6 @@ enum java_tree_index JTI_MAIN_CLASS, JTI_CURRENT_CLASS, JTI_OUTPUT_CLASS, - JTI_ALL_CLASS_LIST, - - JTI_PREDEF_FILENAMES, JTI_MAX }; @@ -630,9 +623,6 @@ extern GTY(()) tree java_global_trees[JTI_MAX]; #define nativecode_ptr_array_type_node \ java_global_trees[JTI_NATIVECODE_PTR_ARRAY_TYPE_NODE] -#define predef_filenames \ - java_global_trees[JTI_PREDEF_FILENAMES] - #define nativecode_ptr_type_node ptr_type_node /* The decl for "_Jv_ResolvePoolEntry". */ -- cgit v1.2.1 From 3d5bf92fb5aa822ce8c705c602afb3b66382b81f Mon Sep 17 00:00:00 2001 From: froydnj Date: Wed, 26 May 2010 19:27:58 +0000 Subject: * java-tree.h (struct lang_decl_func): Change type of throws_list field to a VEC. * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): Adjust for changed type of DECL_FUNCTION_THROWS. * class.c (make_method_value): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159899 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/java/java-tree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/java/java-tree.h') diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h index 0482abec36c..83f3b3d4a36 100644 --- a/gcc/java/java-tree.h +++ b/gcc/java/java-tree.h @@ -776,7 +776,7 @@ struct GTY(()) lang_decl_func { int max_stack; int arg_slot_count; source_location last_line; /* End line number for a function decl */ - tree throws_list; /* Exception specified by `throws' */ + VEC(tree,gc) *throws_list; /* Exception specified by `throws' */ tree exc_obj; /* Decl holding the exception object. */ /* Class initialization test variables */ -- cgit v1.2.1 From c9d228b7caffdcdd8753641944c5af49ad360513 Mon Sep 17 00:00:00 2001 From: froydnj Date: Fri, 28 May 2010 13:41:55 +0000 Subject: * java-tree.h (method_entry): Declare. Declare VECs containing it. (struct lang_type): Change type of otable_methods, atable_methods, and itable_methods to VECs. Fix comment for atable_methods. (emit_symbol_table): Take a VEC instead of a tree. (get_symbol_table_index): Take a VEC * instead of a tree *. * class.c (add_table_and_syms): Take a VEC instead of a tree. (emit_symbol_table): Update for changed parameter type. * expr.c (get_symbol_table_index): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159974 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/java/java-tree.h | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'gcc/java/java-tree.h') diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h index 83f3b3d4a36..f48e4215925 100644 --- a/gcc/java/java-tree.h +++ b/gcc/java/java-tree.h @@ -916,6 +916,14 @@ struct GTY(()) lang_decl { #define TYPE_REFLECTION_DATASIZE(T) \ (TYPE_LANG_SPECIFIC (T)->reflection_datasize) +typedef struct GTY(()) method_entry_d { + tree method; + tree special; +} method_entry; + +DEF_VEC_O(method_entry); +DEF_VEC_ALLOC_O(method_entry,gc); + struct GTY(()) lang_type { tree signature; struct JCF *jcf; @@ -923,18 +931,18 @@ struct GTY(()) lang_type { tree cpool_data_ref; /* Cached */ tree package_list; /* List of package names, progressive */ - tree otable_methods; /* List of static decls referred to by this - class. */ + VEC(method_entry,gc) *otable_methods; /* List of static decls referred + to by this class. */ tree otable_decl; /* The static address table. */ tree otable_syms_decl; - tree atable_methods; /* List of static decls referred to by this - class. */ + VEC(method_entry,gc) *atable_methods; /* List of abstract methods + referred to by this class. */ tree atable_decl; /* The static address table. */ tree atable_syms_decl; - tree itable_methods; /* List of interfaces methods referred - to by this class. */ + VEC(method_entry,gc) *itable_methods; /* List of interface methods + referred to by this class. */ tree itable_decl; /* The interfaces table. */ tree itable_syms_decl; @@ -1103,7 +1111,8 @@ extern void make_class_data (tree); extern int alloc_name_constant (int, tree); extern int alloc_constant_fieldref (tree, tree); extern void emit_register_classes (tree *); -extern tree emit_symbol_table (tree, tree, tree, tree, tree, int); +extern tree emit_symbol_table (tree, tree, VEC(method_entry,gc) *, + tree, tree, int); extern void lang_init_source (int); extern void write_classfile (tree); extern char *print_int_node (tree); @@ -1206,7 +1215,7 @@ extern void register_exception_range(struct eh_range *, int, int); extern void finish_method (tree); extern void java_expand_body (tree); -extern int get_symbol_table_index (tree, tree, tree *); +extern int get_symbol_table_index (tree, tree, VEC(method_entry,gc) **); extern tree make_catch_class_record (tree, tree); extern tree emit_catch_table (tree); -- cgit v1.2.1 From ba72912a012b97cad825eebee3f5f22253d0afe4 Mon Sep 17 00:00:00 2001 From: lauras Date: Tue, 8 Jun 2010 07:25:24 +0000 Subject: gcc/ada: 2010-06-08 Laurynas Biveinis * gcc-interface/utils.c (init_gnat_to_gnu): Use typed GC allocation. (init_dummy_type): Likewise. (gnat_pushlevel): Likewise. * gcc-interface/trans.c (Attribute_to_gnu): Likewise. (Subprogram_Body_to_gnu): Likewise. (Compilation_Unit_to_gnu): Likewise. (start_stmt_group): Likewise. (extract_encoding): Likewise. (decode_name): Likewise. * gcc-interface/misc.c (gnat_printable_name): Likewise. * gcc-interface/decl.c (annotate_value): Likewise. * gcc-interface/ada-tree.h (struct lang_type): Add variable_size GTY option. (struct lang_decl): Likewise. (SET_TYPE_LANG_SPECIFIC): Use typed GC allocation. (SET_DECL_LANG_SPECIFIC): Likewise. gcc/c-family: 2010-06-08 Laurynas Biveinis * c-pragma.c (push_alignment): Use typed GC allocation. (handle_pragma_push_options): Likewise. * c-common.c (parse_optimize_options): Likewise. * c-common.h (struct sorted_fields_type): Add variable_size GTY option. gcc/cp: 2010-06-08 Laurynas Biveinis * typeck2.c (abstract_virtuals_error): Likewise. * pt.c (maybe_process_partial_specialization): Likewise. (register_specialization): Likewise. (add_pending_template): Likewise. (lookup_template_class): Likewise. (push_tinst_level): Likewise. * parser.c (cp_lexer_new_main): Likewise. (cp_lexer_new_from_tokens): Likewise. (cp_token_cache_new): Likewise. (cp_parser_context_new): Likewise. (cp_parser_new): Likewise. (cp_parser_nested_name_specifier_opt): Likewise. (cp_parser_template_id): Likewise. * name-lookup.c (binding_entry_make): Likewise. (binding_table_construct): Likewise. (binding_table_new): Likewise. (cxx_binding_make): Likewise. (pushdecl_maybe_friend): Likewise. (begin_scope): Likewise. (push_to_top_level): Likewise. * lex.c (init_reswords): Likewise. (retrofit_lang_decl): Likewise. (cxx_dup_lang_specific_decl): Likewise. (copy_lang_type): Likewise. (cxx_make_type): Likewise. * decl.c (make_label_decl): Likewise. (check_goto): Likewise. (start_preparsed_function): Likewise. (save_function_data): Likewise. * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise. * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise. * class.c (finish_struct_1): Likewise. * cp-tree.h (struct lang_type): Add variable_size GTY option. (struct lang_decl): Likewise. * parser.c (cp_parser_new): Update comment to not reference ggc_alloc. gcc/fortran: 2010-06-08 Laurynas Biveinis * trans-types.c (gfc_get_nodesc_array_type): Use typed GC allocation. (gfc_get_array_type_bounds): Likewise. * trans-decl.c (gfc_allocate_lang_decl): Likewise. (gfc_find_module): Likewise. * f95-lang.c (pushlevel): Likewise. * trans.h (struct lang_type): Add variable_size GTY option. (struct lang_decl): Likewise. gcc/java: 2010-06-08 Laurynas Biveinis * jcf-reader.c (jcf_parse_constant_pool): Use typed GC allocation. * jcf-parse.c (java_parse_file): Likewise. (process_zip_dir): Likewise. * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise. (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise. * expr.c (add_type_assertion): Likewise. * decl.c (make_binding_level): Likewise. (java_dup_lang_specific_decl): Likewise. * constants.c (set_constant_entry): Likewise. (cpool_for_class): Likewise. * class.c (add_method_1): Likewise. (java_treetreehash_new): Likewise. * java-tree.h (struct lang_type): Add variable_size GTY option. (struct lang_decl): Likewise. * jch.h (struct cpool_entry): Likewise. * java-tree.h (java_treetreehash_create): Remove parameter ggc. * except.c (prepare_eh_table_type): Update java_treetreehash_create call. * class.c (add_method_1): Update java_treetreehash_create call. (java_treetreehash_create): Remove parameter gc. Use htab_create_ggc. gcc/lto: 2010-06-08 Laurynas Biveinis * lto.c (lto_read_in_decl_state): Use typed GC allocation. (lto_file_read): Likewise. (new_partition): Likewise. (read_cgraph_and_symbols): Likewise. gcc/objc: 2010-06-08 Laurynas Biveinis * objc-act.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Use typed GC allocation. * objc-act.c (objc_volatilize_decl): Likewise. (objc_build_string_object): Likewise. (hash_init): Likewise. (hash_enter): Likewise. (hash_add_attr): Likewise. (add_class): Likewise. (start_class): Likewise. gcc/objcp: 2010-06-08 Laurynas Biveinis * objcp-decl.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Use typed GC allocation. gcc: 2010-06-08 Laurynas Biveinis * doc/tm.texi (Per-Function Data): Do not reference ggc_alloc. * doc/gty.texi (GTY Options): Document typed GC allocation and variable_size GTY option. * ggc-internal.h: New. * ggc.h: Update copyright year. (digit_string): Move to stringpool.c. (ggc_mark_stringpool, ggc_purge_stringpool, ggc_mark_roots) (gt_pch_save_stringpool, gt_pch_fixup_stringpool) (gt_pach_restore_stringpool, gt_pch_p_S, gt_pch_note_object) (init_ggc_pch, ggc_pch_count_object, ggc_pch_total_size) (ggc_pch_this_base, ggc_pch_alloc_object, ggc_pch_prepare_write) (ggc_pch_write_object, ggc_pch_finish, ggc_pch_read) (ggc_force_collect, ggc_get_size, ggc_statistics) (ggc_print_common_statistics): Move to ggc-internal.h. (digit_vector, new_ggc_zone, destroy_ggc_zone, ggc_alloc_stat) (ggc_alloc, ggc_alloc_cleared, ggc_realloc, ggc_calloc, GGC_NEW) (GGC_CNEW, GGC_NEWVEC, GGC_CNEWVEC, GGC_NEWVAR, ggc_alloc_rtvec) (ggc_alloc_tree, gt_pch_save, ggc_min_expand_heuristic) (ggc_min_heapsize_heuristic, ggc_alloc_zone) (ggc_alloc_zone_pass_stat): Remove. (ggc_internal_alloc_stat, ggc_internal_alloc) (ggc_internal_cleared_alloc_stat): New. (GGC_RESIZEVEC, GGC_RESIZEVAR): Redefine. (ggc_internal_vec_alloc_stat) (ggc_internal_cleared_vec_alloc_stat) (ggc_internal_vec_alloc_stat, ggc_internal_cleared_vec_alloc) (ggc_alloc_atomic_stat, ggc_alloc_atomic) (ggc_alloc_cleared_atomic, ggc_cleared_alloc_htab_ignore_args) (ggc_cleared_alloc_ptr_array_two_args): New. (htab_create_ggc, splay_tree_new_ggc): Redefine. (ggc_splay_alloc): Change the type of the first argument to enum gt_types_enum. (ggc_alloc_string): Make macro. (ggc_alloc_string_stat): New. (ggc_strdup): Redefine. (rtl_zone, tree_zone, tree_id_zone): Declare unconditionally. (ggc_alloc_rtvec_sized): New. (ggc_alloc_zone_stat): Rename to ggc_internal_alloc_zone_stat. (ggc_internal_alloc_zone_pass_stat, ggc_internal_alloc_zone_stat) (ggc_internal_cleared_alloc_zone_stat) (ggc_internal_zone_alloc_stat) (ggc_internal_zone_cleared_alloc_stat) (ggc_internal_zone_vec_alloc_stat) (ggc_alloc_zone_rtx_def_stat) (ggc_alloc_zone_tree_node_stat) (ggc_alloc_zone_cleared_tree_node_stat) (ggc_alloc_cleared_gimple_statement_d_stat): New. * ggc-common.c: Include ggc-internal.h. (ggc_internal_cleared_alloc_stat): Rename from ggc_alloc_cleared_stat. (ggc_realloc_stat): Use ggc_internal_alloc_stat. (ggc_calloc): Remove. (ggc_cleared_alloc_htab_ignore_args): New. (ggc_cleared_alloc_ptr_array_two_args): New. (ggc_splay_alloc): Add obj_type parameter. (init_ggc_heuristics): Formatting fixes. * ggc-none.c: Update copyright year. (ggc_alloc_stat): Rename to ggc_alloc_stat. (ggc_alloc_cleared_stat): Rename to ggc_internal_cleared_alloc_stat. (struct alloc_zone, rtl_zone, tree_zone, tree_id_zone): New. * ggc-page.c: Update copyright year. Include ggc-internal.h. Remove references to ggc_alloc in comments. (ggc_alloc_typed_stat): Call ggc_internal_alloc_stat. (ggc_alloc_stat): Rename to ggc_internal_alloc_stat. (new_ggc_zone, destroy_ggc_zone): Remove. (struct alloc_zone, rtl_zone, tree_zone, tree_id_zone): New. * ggc-zone.c: Include ggc-internal.h. Remove references to ggc_alloc in comments. (ggc_alloc_zone_stat): ggc_internal_alloc_zone_stat. (ggc_internal_alloc_zone_pass_stat): New. (ggc_internal_cleared_alloc_zone_stat): New. (ggc_alloc_typed_stat): Use ggc_internal_alloc_zone_pass_stat. (ggc_alloc_stat): Rename ggc_internal_alloc_stat. (new_ggc_zone, destroy_ggc_zone): Remove. * stringpool.c: Update copyright year. Include ggc-internal.h (digit_vector): Make static. (digit_string): Moved from ggc.h. (stringpool_ggc_alloc): Use ggc_alloc_atomic. (ggc_alloc_string): Rename to ggc_alloc_string_stat. * Makefile.in (GGC_INTERNAL_H): New. (ggc_common.o, ggc-page.o, ggc-zone.o, stringpool.o): Add $(GGC_INTERNAL_H) to dependencies. * gentype.c: Update copyright year. (walk_type): Accept variable_size GTY option. (USED_BY_TYPED_GC_P): New macro. (write_enum_defn): Use USED_BY_TYPED_GC_P. Do not output whitespace at the end of strings. (get_type_specifier, variable_size_p): New functions. (alloc_quantity, alloc_zone): New enums. (write_typed_alloc_def): New function. (write_typed_struct_alloc_def): Likewise. (write_typed_typed_typedef_alloc_def): Likewise. (write_typed_alloc_defns): Likewise. (output_typename, write_splay_tree_allocator_def): Likewise. (write_splay_tree_allocators): Likewise. (main): Call write_typed_alloc_defns and write_splay_tree_allocators. * lto-streamer.h (lto_file_decl_data_ptr): New. * passes.c (order): Define using cgraph_node_ptr. * strinpool.c (struct string_pool_data): Declare nested_ptr using ht_identifier_ptr. * gimple.h (union gimple_statement_d): Likewise. * rtl.h (struct rtx_def): Likewise. (struct rtvec_def): Likewise. * tree.h (union tree_node): Likewise. * tree-ssa-operands.h (struct ssa_operand_memory_d): Likewise. * cfgloop.c (record_loop_exits): Use htab_create_ggc. * tree-scalar-evolution.c (scev_initialize): Likewise. * alias.c (record_alias_subset): Update splay_tree_new_ggc call. * dwarf2asm.c (dw2_force_const_mem): Likewise. * omp-low.c (lower_omp_critical): Likewise. * bitmap.h (struct bitmap_head_def): Update comment to not reference ggc_alloc. * config/pa/pa.c (get_deferred_label): Use GGC_RESIZEVEC. * ira.c (fix_reg_equiv_init): Use GGC_RESIZEVEC. * ipa-prop.c (duplicate_ggc_array): Rename to duplicate_ipa_jump_func_array. Use typed GC allocation. (ipa_edge_duplication_hook): Call duplicate_ipa_jump_func_array. * gimple.c (gimple_alloc_stat): Use ggc_alloc_cleared_gimple_statement_d_stat. * varasm.c (create_block_symbol): Use ggc_alloc_zone_rtx_def. * tree.c (make_node_stat): Use ggc_alloc_zone_cleared_tree_node_stat. (make_tree_vec_stat): Likewise. (build_vl_exp_stat): Likewise. (copy_node_stat): Use ggc_alloc_zone_tree_node_stat. (make_tree_binfo_stat): Likewise. (tree_cons_stat): Likewise. * rtl.c (rtx_alloc_stat): Use ggc_alloc_zone_rtx_def_stat. (shallow_copy_rtx_stat): Likewise. (make_node_stat): Likewise. * lto-symtab.c: Fix comment. * tree-cfg.c (create_bb): Update comment to not reference ggc_alloc_cleared. * tree-ssa-structalias.c (struct heapvar_for_stmt): Fix param_is value. * varpool.c (varpool_node): Use typed GC allocation. (varpool_extra_name_alias): Likewise. * varasm.c (emutls_decl): Likewise. (get_unnamed_section): Likewise. (get_noswitch_section): Likewise. (get_section): Likewise. (get_block_for_section): Likewise. (build_constant_desc): Likewise. (create_constant_pool): Likewise. (force_const_mem): Likewise. * tree.c (build_vl_exp_stat): Likewise. (build_real): Likewise. (build_string): Likewise. (decl_debug_expr_insert): Likewise. (decl_value_expr_insert): Likewise. (type_hash_add): Likewise. (build_omp_clause): Likewise. * tree-ssanames.c (duplicate_ssa_name_ptr_info): Likewise. * tree-ssa.c (init_tree_ssa): Likewise. * tree-ssa-structalias.c (heapvar_insert): Likewise. * tree-ssa-operands.c (ssa_operand_alloc): Likewise. * tree-ssa-loop-niter.c (record_estimate): Likewise. * tree-ssa-alias.c (get_ptr_info): Likewise. * tree-scalar-evolution.c (new_scev_info_str): Likewise. * tree-phinodes.c (allocate_phi_node): Likewise. * tree-iterator.c (tsi_link_before): Likewise. (tsi_link_after): Likewise. * tree-eh.c (add_stmt_to_eh_lp_fn): Likewise. * tree-dfa.c (create_var_ann): Likewise. * tree-cfg.c (create_bb): Likewise. * toplev.c (alloc_for_identifier_to_locale): Likewise. (general_init): Likewise. * stringpool.c (stringpool_ggc_alloc): Likewise. (gt_pch_save_stringpool): Likewise. * sese.c (if_region_set_false_region): Likewise. * passes.c (do_per_function_toporder): Likewise. * optabs.c (set_optab_libfunc): Likewise. (set_conv_libfunc): Likewise. * lto-symtab.c (lto_symtab_register_decl): Likewise. * lto-streamer-in.c (lto_input_eh_catch_list): Likewise. (input_eh_region): Likewise. (input_eh_lp): Likewise. (make_new_block): Likewise. (unpack_ts_real_cst_value_fields): Likewise. * lto-section-in.c (lto_new_in_decl_state): Likewise. * lto-cgraph.c (input_node_opt_summary): Likewise. * loop-init.c (loop_optimizer_init): Likewise. * lambda.h (lambda_vector_new): Likewise. * lambda-code.c (replace_uses_equiv_to_x_with_y): Likewise. * ira.c (update_equiv_regs): Likewise. * ipa.c (cgraph_node_set_new): Likewise. (cgraph_node_set_add): Likewise. (varpool_node_set_new): Likewise. (varpool_node_set_add): Likewise. * ipa-prop.c (ipa_compute_jump_functions_for_edge): Likewise. (duplicate_ipa_jump_func_array): Likewise. (ipa_read_node_info): Likewise. * ipa-cp.c (ipcp_create_replace_map): Likewise. * integrate.c (get_hard_reg_initial_val): Likewise. * gimple.c (gimple_alloc_stat): Likewise. (gimple_build_omp_for): Likewise. (gimple_seq_alloc): Likewise. (gimple_copy): Likewise. * gimple-iterator.c (gsi_insert_before_without_update): Likewise. (gsi_insert_after_without_update): Likewise. * function.c (add_frame_space): Likewise. (insert_temp_slot_address): Likewise. (assign_stack_temp_for_type): Likewise. (allocate_struct_function): Likewise. (types_used_by_var_decl_insert): Likewise. * except.c (init_eh_for_function): Likewise. (gen_eh_region): Likewise. (gen_eh_region_catch): Likewise. (gen_eh_landing_pad): Likewise. (add_call_site): Likewise. * emit-rtl.c (get_mem_attrs): Likewise. (get_reg_attrs): Likewise. (start_sequence): Likewise. (init_emit): Likewise. * dwarf2out.c (new_cfi): Likewise. (queue_reg_save): Likewise. (dwarf2out_frame_init): Likewise. (new_loc_descr): Likewise. (find_AT_string): Likewise. (new_die): Likewise. (add_var_loc_to_decl): Likewise. (clone_die): Likewise. (clone_as_declaration): Likewise. (break_out_comdat_types): Likewise. (new_loc_list): Likewise. (loc_descriptor): Likewise. (add_loc_descr_to_each): Likewise. (add_const_value_attribute): Likewise. (tree_add_const_value_attribute): Likewise. (add_comp_dir_attribute): Likewise. (add_name_and_src_coords_attributes): Likewise. (lookup_filename): Likewise. (store_vcall_insn): Likewise. (dwarf2out_init): Likewise. * dbxout.c (dbxout_init): Likewise. * config/xtensa/xtensa.c (xtensa_init_machine_status): Likewise. * config/sparc/sparc.c (sparc_init_machine_status): Likewise. * config/score/score7.c (score7_output_external): Likewise. * config/score/score3.c (score3_output_external): Likewise. * config/s390/s390.c (s390_init_machine_status): Likewise. * config/rs6000/rs6000.c (builtin_function_type): Likewise. (rs6000_init_machine_status): Likewise. (output_toc): Likewise. * config/pa/pa.c (pa_init_machine_status): Likewise. (get_deferred_plabel): Likewise. * config/moxie/moxie.c (moxie_init_machine_status): Likewise. * config/mmix/mmix.c (mmix_init_machine_status): Likewise. * config/mips/mips.c (mflip_mips16_use_mips16_p): Likewise. * config/mep/mep.c (mep_init_machine_status): Likewise. (mep_note_pragma_flag): Likewise. * config/m32c/m32c.c (m32c_init_machine_status): Likewise. * config/iq2000/iq2000.c (iq2000_init_machine_status): Likewise. * config/ia64/ia64.c (ia64_init_machine_status): Likewise. * config/i386/winnt.c (i386_pe_record_external_function): Likewise. (i386_pe_maybe_record_exported_symbol): Likewise. * config/i386/i386.c (get_dllimport_decl): Likewise. (ix86_init_machine_status): Likewise. (assign_386_stack_local): Likewise. * config/frv/frv.c (frv_init_machine_status): Likewise. * config/darwin.c (machopic_indirection_name): Likewise. * config/cris/cris.c (cris_init_machine_status): Likewise. * config/bfin/bfin.c (bfin_init_machine_status): Likewise. * config/avr/avr.c (avr_init_machine_status): Likewise. * config/arm/arm.c (arm_init_machine_status): Likewise. * config/alpha/alpha.c (alpha_init_machine_status): Likewise. (alpha_need_linkage): Likewise. (alpha_use_linkage): Likewise. * cgraph.c (cgraph_allocate_node): Likewise. (cgraph_create_edge_1): Likewise. (cgraph_create_indirect_edge): Likewise. (cgraph_add_asm_node): Likewise. * cfgrtl.c (init_rtl_bb_info): Likewise. * cfgloop.c (alloc_loop): Likewise. (rescan_loop_exit): Likewise. * cfg.c (init_flow): Likewise. (alloc_block): Likewise. (unchecked_make_edge): Likewise. * c-parser.c (c_parse_init): Likewise. (c_parse_file): Likewise. * c-decl.c (bind): Likewise. (record_inline_static): Likewise. (push_scope): Likewise. (make_label): Likewise. (lookup_label_for_goto): Likewise. (finish_struct): Likewise. (finish_enum): Likewise. (c_push_function_context): Likewise. * bitmap.c (bitmap_element_allocate): Likewise. (bitmap_gc_alloc_stat): Likewise. * alias.c (record_alias_subset): Likewise. (init_alias_analysis): Likewise. include: 2010-06-08 Laurynas Biveinis * splay-tree.h: Update copyright years. (splay_tree_s): Document fields. (splay_tree_new_typed_alloc): New. * hashtab.h: Update copyright years. (htab_create_typed_alloc): New. libcpp: 2010-06-08 Laurynas Biveinis * include/symtab.h (ht_identifier_ptr): New. libiberty: 2010-06-08 Laurynas Biveinis * splay-tree.c: Update copyright years. (splay_tree_new_typed_alloc): New. (splay_tree_new_with_allocator): Use it. * hashtab.c: Update copyright years. (htab_create_typed_alloc): New. (htab_create_alloc): Use it. * functions.texi: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160425 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/java/java-tree.h | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'gcc/java/java-tree.h') diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h index f48e4215925..282b5802ed9 100644 --- a/gcc/java/java-tree.h +++ b/gcc/java/java-tree.h @@ -750,11 +750,12 @@ union GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"), (DECL_LANG_SPECIFIC (NODE)->u.v.vtable) /* Create a DECL_LANG_SPECIFIC if necessary. */ -#define MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC(T) \ - if (DECL_LANG_SPECIFIC (T) == NULL) \ - { \ - DECL_LANG_SPECIFIC ((T)) = GGC_CNEW (struct lang_decl); \ - DECL_LANG_SPECIFIC (T)->desc = LANG_DECL_VAR; \ +#define MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC(T) \ + if (DECL_LANG_SPECIFIC (T) == NULL) \ + { \ + DECL_LANG_SPECIFIC ((T)) \ + = ggc_alloc_cleared_lang_decl (sizeof (struct lang_decl)); \ + DECL_LANG_SPECIFIC (T)->desc = LANG_DECL_VAR; \ } /* A ConstantExpression, after folding and name resolution. */ @@ -840,7 +841,7 @@ typedef struct GTY(()) type_assertion { extern tree java_treetreehash_find (htab_t, tree); extern tree * java_treetreehash_new (htab_t, tree); -extern htab_t java_treetreehash_create (size_t size, int ggc); +extern htab_t java_treetreehash_create (size_t size); /* DECL_LANG_SPECIFIC for VAR_DECL, PARM_DECL and sometimes FIELD_DECL (access methods on outer class fields) and final fields. */ @@ -861,7 +862,7 @@ struct GTY(()) lang_decl_var { enum lang_decl_desc {LANG_DECL_FUNC, LANG_DECL_VAR}; -struct GTY(()) lang_decl { +struct GTY((variable_size)) lang_decl { enum lang_decl_desc desc; union lang_decl_u { @@ -879,7 +880,7 @@ struct GTY(()) lang_decl { #define MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC(T) \ if (TYPE_LANG_SPECIFIC ((T)) == NULL) \ TYPE_LANG_SPECIFIC ((T)) \ - = GGC_CNEW (struct lang_type); + = ggc_alloc_cleared_lang_type (sizeof (struct lang_type)); #define TYPE_DUMMY(T) (TYPE_LANG_SPECIFIC(T)->dummy_class) @@ -924,7 +925,10 @@ typedef struct GTY(()) method_entry_d { DEF_VEC_O(method_entry); DEF_VEC_ALLOC_O(method_entry,gc); -struct GTY(()) lang_type { +/* FIXME: the variable_size annotation here is needed because these types are + variable-sized in some other frontends. Due to gengtype deficiency the GTY + options of such types have to agree across all frontends. */ +struct GTY((variable_size)) lang_type { tree signature; struct JCF *jcf; struct CPool *cpool; -- cgit v1.2.1 From 0c4db5ff3e6dc0c3f4b6e5d74471cf8170133401 Mon Sep 17 00:00:00 2001 From: froydnj Date: Mon, 28 Jun 2010 12:06:52 +0000 Subject: * java-tree.h (struct lang_type) [catch_classes]: Change type to a VEC. * except.c (prepare_eh_table_type): Call CONSTRUCTOR_APPEND_ELT instead of tree_cons. * class.c (make_class): Add dummy entry to TYPE_CATCH_CLASSES. (emit_catch_table): Adjust for new type of TYPE_CATCH_CLASSES. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161487 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/java/java-tree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/java/java-tree.h') diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h index 282b5802ed9..ccaa0e34eb7 100644 --- a/gcc/java/java-tree.h +++ b/gcc/java/java-tree.h @@ -952,7 +952,7 @@ struct GTY((variable_size)) lang_type { tree ctable_decl; /* The table of classes for the runtime type matcher. */ - tree catch_classes; + VEC(constructor_elt,gc) *catch_classes; htab_t GTY ((param_is (struct treetreehash_entry))) type_to_runtime_map; /* The mapping of classes to exception region -- cgit v1.2.1 From 1767a056f10a2ccbc900df04d01193da73a3d272 Mon Sep 17 00:00:00 2001 From: froydnj Date: Thu, 15 Jul 2010 14:31:28 +0000 Subject: gcc/ * tree.h (DECL_CHAIN): Define. * alias.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * c-decl.c: Likewise. * c-parser.c: Likewise. * c-typeck.c: Likewise. * cfgexpand.c: Likewise. * cgraph.c: Likewise. * cgraphunit.c: Likewise. * combine.c: Likewise. * config/alpha/alpha.c: Likewise. * config/arm/arm.c: Likewise. * config/frv/frv.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/winnt-cxx.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/mep/mep.c: Likewise. * config/mips/mips.c: Likewise. * config/pa/som.h: Likewise. * config/rs6000/rs6000.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh.c: Likewise. * config/sh/symbian-cxx.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/vxworks.c: Likewise. * config/xtensa/xtensa.c: Likewise. * coverage.c: Likewise. * dbxout.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * expr.c: Likewise. * function.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimplify.c: Likewise. * integrate.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-split.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-type-escape.c: Likewise. * langhooks.c: Likewise. * lto-cgraph.c: Likewise. * omp-low.c: Likewise. * stor-layout.c: Likewise. * tree-cfg.c: Likewise. * tree-complex.c: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-inline.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-object-size.c: Likewise. * tree-pretty-print.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-tailcall.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. gcc/ada/ * gcc-interface/decl.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * gcc-interface/trans.c: Likewise. * gcc-interface/utils.c: Likewise. * gcc-interface/utils2.c: Likewise. gcc/c-family/ * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * c-format.c: Likewise. gcc/cp/ * cp-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN. * call.c: Likewise. * class.c: Likewise. * cp-gimplify.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * init.c: Likewise. * mangle.c: Likewise. * name-lookup.c: Likewise. * optimize.c: Likewise. * parser.c: Likewise. * pt.c: Likewise. * rtti.c: Likewise. * search.c: Likewise. * semantics.c: Likewise. * typeck.c: Likewise. * typeck2.c: Likewise. gcc/fortran/ * f95-lang.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * trans-common.c: Likewise. * trans-decl.c: Likewise. * trans-types.c: Likewise. * trans.c: Likewise. gcc/java/ * java-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN. * boehm.c: Likewise. * class.c: Likewise. * decl.c: Likewise. * expr.c: Likewise. * jcf-parse.c: Likewise. * typeck.c: Likewise. * verify-glue.c: Likewise. gcc/objc/ * objc-act.c: Carefully replace TREE_CHAIN with DECL_CHAIN. gcc/testsuite/ * g++.dg/plugin/attribute_plugin.c: Carefully replace TREE_CHAIN with DECL_CHAIN. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162223 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/java/java-tree.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gcc/java/java-tree.h') diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h index ccaa0e34eb7..110eb83e00c 100644 --- a/gcc/java/java-tree.h +++ b/gcc/java/java-tree.h @@ -1461,7 +1461,7 @@ extern tree *type_map; if (TYPE_FIELDS (RTYPE) == NULL_TREE) \ TYPE_FIELDS (RTYPE) = _field; \ else \ - TREE_CHAIN(FIELD) = _field; \ + DECL_CHAIN(FIELD) = _field; \ DECL_CONTEXT (_field) = (RTYPE); \ DECL_ARTIFICIAL (_field) = 1; \ FIELD = _field; } @@ -1485,7 +1485,7 @@ extern tree *type_map; do \ { \ constructor_elt *_elt___ = VEC_last (constructor_elt, V); \ - tree _next___ = TREE_CHAIN (_elt___->index); \ + tree _next___ = DECL_CHAIN (_elt___->index); \ gcc_assert (!DECL_NAME (_elt___->index)); \ _elt___->value = VALUE; \ CONSTRUCTOR_APPEND_ELT (V, _next___, NULL); \ @@ -1499,7 +1499,7 @@ extern tree *type_map; do \ { \ constructor_elt *_elt___ = VEC_last (constructor_elt, V); \ - tree _next___ = TREE_CHAIN (_elt___->index); \ + tree _next___ = DECL_CHAIN (_elt___->index); \ gcc_assert (strcmp (IDENTIFIER_POINTER (DECL_NAME (_elt___->index)), \ NAME) == 0); \ _elt___->value = VALUE; \ -- cgit v1.2.1