From ff9ddbc50d2773d25300aa8a2a5ba56d9c1a8060 Mon Sep 17 00:00:00 2001 From: jakub Date: Sat, 28 Nov 2009 16:21:52 +0000 Subject: * jvspec.c (lang_specific_driver): Remove unused saw_verbose_flag variable. * jcf-dump.c (main): Remove unused general_purpose_bits variable. * builtins.c (initialize_builtins): Remove unused float_ftype_float variable. * expr.c (java_stack_pop): Remove unused val variable. (build_jni_stub): Remove unused res_type variable. * verify-impl.c (check_field_constant): Remove unused len variable. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154727 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/java/expr.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'gcc/java/expr.c') diff --git a/gcc/java/expr.c b/gcc/java/expr.c index 72ca77303ec..3c0e2ca1572 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -632,7 +632,7 @@ java_stack_pop (int count) { while (count > 0) { - tree type, val; + tree type; gcc_assert (stack_pointer != 0); @@ -644,7 +644,7 @@ java_stack_pop (int count) type = stack_type_map[stack_pointer - 2]; } - val = pop_value (type); + pop_value (type); count--; } } @@ -2652,7 +2652,7 @@ build_jni_stub (tree method) tree jniarg0, jniarg1, jniarg2, jniarg3; tree jni_func_type, tem; tree env_var, res_var = NULL_TREE, block; - tree method_args, res_type; + tree method_args; tree meth_var; tree bind; @@ -2805,7 +2805,6 @@ build_jni_stub (tree method) TREE_SIDE_EFFECTS (body) = 1; /* Finally, do the return. */ - res_type = void_type_node; if (res_var != NULL_TREE) { tree drt; -- cgit v1.2.1 From 4081d362fba108e17784f385774bfae44e2dcee2 Mon Sep 17 00:00:00 2001 From: jakub Date: Wed, 7 Apr 2010 20:27:37 +0000 Subject: * tree-ssa-pre.c (my_rev_post_order_compute): Remove set but not used count variable. * genemit.c (gen_expand, gen_split): Avoid set but not used warnings when operandN variables aren't used in the body of the expander or splitter. * tree-outof-ssa.c (FOR_EACH_ELIM_GRAPH_SUCC, FOR_EACH_ELIM_GRAPH_PRED): Avoid set but not used warnings. * tree-ssa-operands.h (FOR_EACH_SSA_TREE_OPERAND): Likewise. * tree-flow.h (FOR_EACH_IMM_USE_FAST, FOR_EACH_IMM_USE_STMT, FOR_EACH_IMM_USE_ON_STMT): Likewise. * tree.h (FOR_EACH_CONSTRUCTOR_ELT): Likewise. * tree.c (PROCESS_ARG): Likewise. fortran/ * parse.c (parse_derived, parse_enum): Avoid set but not used warning. java/ * expr.c (process_jvm_instruction): Avoid set but not used warning. * builtins.c (compareAndSwapInt_builtin, compareAndSwapLong_builtin, getVolatile_builtin): Likewise. libjava/ * exception.cc (_Jv_Throw): Avoid set but not used warning. * include/java-assert.h (JvAssertMessage, JvAssert): Use argument in sizeof to avoid set but not used warnings. libjava/classpath/ * native/jni/midi-alsa/gnu_javax_sound_midi_alsa_AlsaPortDevice.c (Java_gnu_javax_sound_midi_alsa_AlsaPortDevice_run_1receiver_1thread_1): Avoid set but not used warning. libiberty/ * regex.c (byte_re_match_2_internal): Avoid set but not used warning. gcc/testsuite/ * gcc.dg/builtin-choose-expr.c: Avoid set but not used warnings. * gcc.dg/trunc-1.c: Likewise. * gcc.dg/vla-9.c: Likewise. * gcc.dg/dfp/composite-type.c: Likewise. libffi/ * testsuite/libffi.call/err_bad_abi.c: Remove unused args variable. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158084 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/java/expr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/java/expr.c') diff --git a/gcc/java/expr.c b/gcc/java/expr.c index 3c0e2ca1572..a6a3f391a57 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -1,6 +1,6 @@ /* Process expressions for the GNU compiler for the Java(TM) language. Copyright (C) 1996, 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. @@ -3329,6 +3329,7 @@ process_jvm_instruction (int PC, const unsigned char* byte_ops, { \ int saw_index = 0; \ int index = OPERAND_VALUE; \ + (void) saw_index; /* Avoid set but not used warning. */ \ build_java_ret \ (find_local_variable (index, return_address_type_node, oldpc)); \ } -- 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/expr.c | 146 +++++++++++++++++++++++++++++++------------------------- 1 file changed, 80 insertions(+), 66 deletions(-) (limited to 'gcc/java/expr.c') diff --git a/gcc/java/expr.c b/gcc/java/expr.c index a6a3f391a57..5eacd646fe4 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -75,7 +75,7 @@ static void expand_cond (enum tree_code, tree, int); static void expand_java_goto (int); static tree expand_java_switch (tree, int); static void expand_java_add_case (tree, int, int); -static tree pop_arguments (tree); +static VEC(tree,gc) *pop_arguments (tree); static void expand_invoke (int, int, int); static void expand_java_field_op (int, int, int); static void java_push_constant_from_pool (struct JCF *, int); @@ -1128,20 +1128,21 @@ static void expand_java_multianewarray (tree class_type, int ndim) { int i; - tree args = build_tree_list( NULL_TREE, null_pointer_node ); + VEC(tree,gc) *args = NULL; - for( i = 0; i < ndim; i++ ) - args = tree_cons (NULL_TREE, pop_value (int_type_node), args); + VEC_safe_grow (tree, gc, args, 3 + ndim); - args = tree_cons (NULL_TREE, - build_class_ref (class_type), - tree_cons (NULL_TREE, - build_int_cst (NULL_TREE, ndim), - args)); + VEC_replace (tree, args, 0, build_class_ref (class_type)); + VEC_replace (tree, args, 1, build_int_cst (NULL_TREE, ndim)); - push_value (build_call_list (promote_type (class_type), - build_address_of (soft_multianewarray_node), - args)); + for(i = ndim - 1; i >= 0; i-- ) + VEC_replace (tree, args, (unsigned)(2 + i), pop_value (int_type_node)); + + VEC_replace (tree, args, 2 + ndim, null_pointer_node); + + push_value (build_call_vec (promote_type (class_type), + build_address_of (soft_multianewarray_node), + args)); } /* ARRAY[INDEX] <- RHS. build_java_check_indexed_type makes sure that @@ -1931,16 +1932,28 @@ expand_java_add_case (tree switch_expr, int match, int target_pc) append_to_statement_list (x, &SWITCH_BODY (switch_expr)); } -static tree -pop_arguments (tree arg_types) +static VEC(tree,gc) * +pop_arguments (tree method_type) { - if (arg_types == end_params_node) - return NULL_TREE; - if (TREE_CODE (arg_types) == TREE_LIST) + function_args_iterator fnai; + tree type; + VEC(tree,gc) *args = NULL; + int arity; + + FOREACH_FUNCTION_ARGS (method_type, type, fnai) + { + /* XXX: leaky abstraction. */ + if (type == void_type_node) + break; + + VEC_safe_push (tree, gc, args, type); + } + + arity = VEC_length (tree, typestack); + + while (arity--) { - tree tail = pop_arguments (TREE_CHAIN (arg_types)); - tree type = TREE_VALUE (arg_types); - tree arg = pop_value (type); + tree arg = pop_value (VEC_index (tree, args, arity)); /* We simply cast each argument to its proper type. This is needed since we lose type information coming out of the @@ -1952,9 +1965,11 @@ pop_arguments (tree arg_types) && TYPE_PRECISION (type) < TYPE_PRECISION (integer_type_node) && INTEGRAL_TYPE_P (type)) arg = convert (integer_type_node, arg); - return tree_cons (NULL_TREE, arg, tail); + + VEC_replace (tree, args, arity, arg); } - gcc_unreachable (); + + return args; } /* Attach to PTR (a block) the declaration found in ENTRY. */ @@ -2079,34 +2094,30 @@ typedef struct const char *new_classname; const char *new_signature; int flags; - tree (*rewrite_arglist) (tree arglist); + void (*rewrite_arglist) (VEC(tree,gc) **); } rewrite_rule; /* Add __builtin_return_address(0) to the end of an arglist. */ -static tree -rewrite_arglist_getcaller (tree arglist) +static void +rewrite_arglist_getcaller (VEC(tree,gc) **arglist) { tree retaddr = build_call_expr (built_in_decls[BUILT_IN_RETURN_ADDRESS], 1, integer_zero_node); DECL_UNINLINABLE (current_function_decl) = 1; - - return chainon (arglist, - tree_cons (NULL_TREE, retaddr, - NULL_TREE)); + + VEC_safe_push (tree, gc, *arglist, retaddr); } /* Add this.class to the end of an arglist. */ -static tree -rewrite_arglist_getclass (tree arglist) +static void +rewrite_arglist_getclass (VEC(tree,gc) **arglist) { - return chainon (arglist, - tree_cons (NULL_TREE, build_class_ref (output_class), - NULL_TREE)); + VEC_safe_push (tree, gc, *arglist, build_class_ref (output_class)); } static rewrite_rule rules[] = @@ -2157,7 +2168,7 @@ special_method_p (tree candidate_method) method, update SPECIAL.*/ void -maybe_rewrite_invocation (tree *method_p, tree *arg_list_p, +maybe_rewrite_invocation (tree *method_p, VEC(tree,gc) **arg_list_p, tree *method_signature_p, tree *special) { tree context = DECL_NAME (TYPE_NAME (DECL_CONTEXT (*method_p))); @@ -2190,7 +2201,7 @@ maybe_rewrite_invocation (tree *method_p, tree *arg_list_p, *method_p = maybe_method; gcc_assert (*method_p); if (p->rewrite_arglist) - *arg_list_p = p->rewrite_arglist (*arg_list_p); + p->rewrite_arglist (arg_list_p); *method_signature_p = get_identifier (p->new_signature); *special = integer_one_node; @@ -2205,7 +2216,7 @@ maybe_rewrite_invocation (tree *method_p, tree *arg_list_p, tree build_known_method_ref (tree method, tree method_type ATTRIBUTE_UNUSED, tree self_type, tree method_signature ATTRIBUTE_UNUSED, - tree arg_list ATTRIBUTE_UNUSED, tree special) + VEC(tree,gc) *arg_list ATTRIBUTE_UNUSED, tree special) { tree func; if (is_compiled_class (self_type)) @@ -2282,18 +2293,19 @@ build_known_method_ref (tree method, tree method_type ATTRIBUTE_UNUSED, } tree -invoke_build_dtable (int is_invoke_interface, tree arg_list) +invoke_build_dtable (int is_invoke_interface, VEC(tree,gc) *arg_list) { tree dtable, objectref; + tree saved = save_expr (VEC_index (tree, arg_list, 0)); - TREE_VALUE (arg_list) = save_expr (TREE_VALUE (arg_list)); + VEC_replace (tree, arg_list, 0, saved); /* If we're dealing with interfaces and if the objectref argument is an array then get the dispatch table of the class Object rather than the one from the objectref. */ objectref = (is_invoke_interface - && is_array_type_p (TREE_TYPE (TREE_VALUE (arg_list))) - ? build_class_ref (object_type_node) : TREE_VALUE (arg_list)); + && is_array_type_p (TREE_TYPE (saved)) + ? build_class_ref (object_type_node) : saved); if (dtable_ident == NULL_TREE) dtable_ident = get_identifier ("vtable"); @@ -2461,7 +2473,8 @@ expand_invoke (int opcode, int method_ref_index, int nargs ATTRIBUTE_UNUSED) method_ref_index)); const char *const self_name = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (self_type))); - tree call, func, method, arg_list, method_type; + tree call, func, method, method_type; + VEC(tree,gc) *arg_list; tree check = NULL_TREE; tree special = NULL_TREE; @@ -2568,7 +2581,7 @@ expand_invoke (int opcode, int method_ref_index, int nargs ATTRIBUTE_UNUSED) just pop the arguments, push a properly-typed zero, and continue. */ method_type = get_type_from_signature (method_signature); - pop_arguments (TYPE_ARG_TYPES (method_type)); + pop_arguments (method_type); if (opcode != OPCODE_invokestatic) pop_type (self_type); method_type = promote_type (TREE_TYPE (method_type)); @@ -2577,7 +2590,7 @@ expand_invoke (int opcode, int method_ref_index, int nargs ATTRIBUTE_UNUSED) } method_type = TREE_TYPE (method); - arg_list = pop_arguments (TYPE_ARG_TYPES (method_type)); + arg_list = pop_arguments (method_type); flush_quick_stack (); maybe_rewrite_invocation (&method, &arg_list, &method_signature, @@ -2602,8 +2615,8 @@ expand_invoke (int opcode, int method_ref_index, int nargs ATTRIBUTE_UNUSED) We do omit the check if we're calling . */ /* We use a SAVE_EXPR here to make sure we only evaluate the new `self' expression once. */ - tree save_arg = save_expr (TREE_VALUE (arg_list)); - TREE_VALUE (arg_list) = save_arg; + tree save_arg = save_expr (VEC_index (tree, arg_list, 0)); + VEC_replace (tree, arg_list, 0, save_arg); check = java_check_reference (save_arg, ! DECL_INIT_P (method)); func = build_known_method_ref (method, method_type, self_type, method_signature, arg_list, special); @@ -2623,7 +2636,7 @@ expand_invoke (int opcode, int method_ref_index, int nargs ATTRIBUTE_UNUSED) else func = build1 (NOP_EXPR, build_pointer_type (method_type), func); - call = build_call_list (TREE_TYPE (method_type), func, arg_list); + call = build_call_vec (TREE_TYPE (method_type), func, arg_list); TREE_SIDE_EFFECTS (call) = 1; call = check_for_builtin (method, call); @@ -2648,14 +2661,14 @@ expand_invoke (int opcode, int method_ref_index, int nargs ATTRIBUTE_UNUSED) tree build_jni_stub (tree method) { - tree jnifunc, call, args, body, method_sig, arg_types; + tree jnifunc, call, body, method_sig, arg_types; tree jniarg0, jniarg1, jniarg2, jniarg3; tree jni_func_type, tem; tree env_var, res_var = NULL_TREE, block; tree method_args; tree meth_var; tree bind; - + VEC(tree,gc) *args = NULL; int args_size = 0; tree klass = DECL_CONTEXT (method); @@ -2689,10 +2702,22 @@ build_jni_stub (tree method) build_address_of (soft_getjnienvnewframe_node), 1, klass)); + /* The JNIEnv structure is the first argument to the JNI function. */ + args_size += int_size_in_bytes (TREE_TYPE (env_var)); + VEC_safe_push (tree, gc, args, env_var); + + /* For a static method the second argument is the class. For a + non-static method the second argument is `this'; that is already + available in the argument list. */ + if (METHOD_STATIC (method)) + { + args_size += int_size_in_bytes (TREE_TYPE (klass)); + VEC_safe_push (tree, gc, args, klass); + } + /* All the arguments to this method become arguments to the underlying JNI function. If we had to wrap object arguments in a special way, we would do that here. */ - args = NULL_TREE; for (tem = method_args; tem != NULL_TREE; tem = TREE_CHAIN (tem)) { int arg_bits = TREE_INT_CST_LOW (TYPE_SIZE (TREE_TYPE (tem))); @@ -2702,24 +2727,14 @@ build_jni_stub (tree method) #endif args_size += (arg_bits / BITS_PER_UNIT); - args = tree_cons (NULL_TREE, tem, args); + VEC_safe_push (tree, gc, args, tem); } - args = nreverse (args); arg_types = TYPE_ARG_TYPES (TREE_TYPE (method)); - /* For a static method the second argument is the class. For a - non-static method the second argument is `this'; that is already - available in the argument list. */ + /* Argument types for static methods and the JNIEnv structure. + FIXME: Write and use build_function_type_vec to avoid this. */ if (METHOD_STATIC (method)) - { - args_size += int_size_in_bytes (TREE_TYPE (klass)); - args = tree_cons (NULL_TREE, klass, args); - arg_types = tree_cons (NULL_TREE, object_ptr_type_node, arg_types); - } - - /* The JNIEnv structure is the first argument to the JNI function. */ - args_size += int_size_in_bytes (TREE_TYPE (env_var)); - args = tree_cons (NULL_TREE, env_var, args); + arg_types = tree_cons (NULL_TREE, object_ptr_type_node, arg_types); arg_types = tree_cons (NULL_TREE, ptr_type_node, arg_types); /* We call _Jv_LookupJNIMethod to find the actual underlying @@ -2774,8 +2789,7 @@ build_jni_stub (tree method) /* Now we make the actual JNI call via the resulting function pointer. */ - call = build_call_list (TREE_TYPE (TREE_TYPE (method)), - jnifunc, args); + call = build_call_vec (TREE_TYPE (TREE_TYPE (method)), jnifunc, args); /* If the JNI call returned a result, capture it here. If we had to unwrap JNI object results, we would do that here. */ -- cgit v1.2.1 From bd8191cfefa19f7d08f49baf401f8caaffadec19 Mon Sep 17 00:00:00 2001 From: froydnj Date: Wed, 19 May 2010 01:15:43 +0000 Subject: * expr.c (pop_arguments): Fix use of undeclared variable. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159555 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/java/expr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/java/expr.c') diff --git a/gcc/java/expr.c b/gcc/java/expr.c index 5eacd646fe4..177a03858e7 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -1949,7 +1949,7 @@ pop_arguments (tree method_type) VEC_safe_push (tree, gc, args, type); } - arity = VEC_length (tree, typestack); + arity = VEC_length (tree, args); while (arity--) { -- cgit v1.2.1 From a7a4626828090600459358ca745c4482cf9551a1 Mon Sep 17 00:00:00 2001 From: steven Date: Fri, 21 May 2010 13:53:22 +0000 Subject: gcc/ChangeLog: * tree.h: Include real.h and fixed-value.h as basic datatypes. * dfp.c, convert.c, reload1.c, reginfo.c, tree-flow.h, tree-ssa-threadedge.c, tree-ssanames.c, tree-loop-linear.c, tree-into-ssa.c, tree-vect-generic.c, tree-ssa-structalias.c, tree-ssa-loop-im.c, tree-dump.c, tree-complex.c, tree-ssa-uninit.c, genrecog.c, tree-ssa-threadupdate.c, tree-ssa-loop-niter.c, tree-pretty-print.c, tree-loop-distribution.c, tree-ssa-loop-unswitch.c, c-lex.c, optabs.c, postreload-gcse.c, tree-ssa-loop-manip.c, postreload.c, tree-ssa-loop-ch.c, tree-tailcall.c, tree.c, reload.c, tree-scalar-evolution.c, rtlanal.c, tree-phinodes.c, builtins.c, final.c, genoutput.c, fold-const.c, tree-ssa-dse.c, genautomata.c, tree-ssa-uncprop.c, toplev.c, tree-chrec.c, genemit.c, c-cppbuiltin.c, tree-ssa-sccvn.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, mode-switching.c, tree-call-cdce.c, cse.c, genpeep.c, tree-ssa-math-opts.c, tree-ssa-dom.c, tree-nrv.c, tree-ssa-propagate.c, tree-ssa-alias.c, tree-ssa-sink.c, jump.c, ifcvt.c, dwarf2out.c, expr.c, genattrtab.c, genconditions.c, tree-ssa-loop-ivcanon.c, tree-ssa-loop.c, tree-parloops.c, recog.c, tree-ssa-address.c, lcm.c, tree-eh.c, gimple-pretty-print.c, c-pretty-print.c, print-rtl.c, gcse.c, tree-if-conv.c, tree-data-ref.c, tree-affine.c, gimplify.c, tree-ssa-phiopt.c, implicit-zee.c, expmed.c, tree-dfa.c, emit-rtl.c, store-motion.c, cselib.c, tree-cfgcleanup.c, simplify-rtx.c, tree-ssa-pre.c, genpreds.c, tree-mudflap.c, print-tree.c, tree-ssa-copy.c, tree-ssa-forwprop.c, tree-ssa-dce.c, varasm.c, tree-nested.c, tree-ssa.c, tree-ssa-loop-prefetch.c, rtl.c, tree-inline.c, integrate.c, tree-optimize.c, tree-ssa-phiprop.c, fixed-value.c, combine.c, tree-profile.c, c-common.c, sched-vis.c, tree-cfg.c, passes.c, tree-ssa-reassoc.c, config/alpha/alpha.c, config/frv/frv.c, config/s390/s390.c, config/m32c/m32c.c, config/spu/spu.c, config/sparc/sparc.c, config/mep/mep.c, config/m32r/m32r.c, config/rx/rx.c, config/i386/i386.c, config/sh/sh.c, config/pdp11/pdp11.c, config/avr/avr.c, config/crx/crx.c, config/xtensa/xtensa.c, config/stormy16/stormy16.c, config/fr30/fr30.c, config/lm32/lm32.c, config/moxie/moxie.c, config/m68hc11/m68hc11.c, config/cris/cris.c, config/iq2000/iq2000.c, config/mn10300/mn10300.c, config/ia64/ia64.c, config/m68k/m68k.c, config/rs6000/rs6000.c, config/picochip/picochip.c, config/darwin.c, config/arc/arc.c, config/mcore/mcore.c, config/score/score3.c, config/score/score7.c, config/score/score.c, config/arm/arm.c, config/pa/pa.c, config/mips/mips.c, config/vax/vax.c, config/h8300/h8300.c, config/v850/v850.c, config/mmix/mmix.c, config/bfin/bfin.c: Clean up redundant includes. * Makefile.in: Update accordingly. java/ChangeLog: * typeck.c, decl.c, jcf-parse.c, except.c, expr.c: cp/Changelog: * error.c, tree.c, typeck2.c, cxx-pretty-print.c, mangle.c: Clean up redundant includes. fortran/ChangeLog: * trans-const.c, trans-types.c, trans-intrinsic.c: Clean up redundant includes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159663 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/java/expr.c | 1 - 1 file changed, 1 deletion(-) (limited to 'gcc/java/expr.c') diff --git a/gcc/java/expr.c b/gcc/java/expr.c index 177a03858e7..28853643988 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -29,7 +29,6 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ #include "coretypes.h" #include "tm.h" #include "tree.h" -#include "real.h" #include "rtl.h" #include "flags.h" #include "expr.h" -- cgit v1.2.1 From 3484143b5879162ba1779358e3da4622e8930d7f Mon Sep 17 00:00:00 2001 From: steven Date: Sun, 23 May 2010 17:48:41 +0000 Subject: * java-gimplify.c: Do not include tm.h, toplev.h. * typeck.c: Do not include tm.h. * mangle_name.c: Do not include tm.h. * jcf-dump.c: Do not include tm.h, ggc.h. * class.c: Do not include rtl.h, tm_p.h, target.h, except.h, cgraph.h. * decl.c: Do not include tm.h, rtl.h, function.h, expr.h, except.h, and timevar.h. * jcf-parse.c: Do not include tm.h and tm_p.h. * resource.c: Do not include tm.h, rtl.h, flags.h, obstack.h, target.h, and expr.h. * except.c: Do not include tm.h, rtl.h, function.h. * builtins.c: Do not include convert.h. Explain why RTL headers have to be included here. * verify-glue.c: Do not include tm.h. * jcf-depend.c: Do not include tm.h. * jcf-reader.c: Include ggc.h. * jcf-io.c: Do not include tm.h, toplev.h. * expr.c: Do not include tm.h, rtl.h, expr.h, except.h, tm_p.h, gimple.h. * lang.c: Do not include rtl.h, expr.h. * Make-lang.in: Update dependencies. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159764 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/java/expr.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'gcc/java/expr.c') diff --git a/gcc/java/expr.c b/gcc/java/expr.c index 28853643988..2cce0eef3ca 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -27,11 +27,8 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ #include "config.h" #include "system.h" #include "coretypes.h" -#include "tm.h" #include "tree.h" -#include "rtl.h" #include "flags.h" -#include "expr.h" #include "java-tree.h" #include "javaop.h" #include "java-opcodes.h" @@ -39,11 +36,8 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ #include "java-except.h" #include "parse.h" #include "toplev.h" -#include "except.h" -#include "tm_p.h" #include "ggc.h" #include "tree-iterator.h" -#include "gimple.h" #include "target.h" static void flush_quick_stack (void); -- cgit v1.2.1 From 668d54ffc3a7977d69440cf246689a24d77f1d6a Mon Sep 17 00:00:00 2001 From: froydnj Date: Mon, 24 May 2010 14:46:54 +0000 Subject: * expr.c (quick_stack): Change type to a VEC. Update comment. (tree_list_free_list): Delete. (flush_quick_stack): Update for quick_stack type change. (push_value): Likewise. (pop_value): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159782 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/java/expr.c | 63 +++++++++++++++++---------------------------------------- 1 file changed, 18 insertions(+), 45 deletions(-) (limited to 'gcc/java/expr.c') diff --git a/gcc/java/expr.c b/gcc/java/expr.c index 2cce0eef3ca..0f3cf1aef4e 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -90,8 +90,8 @@ tree dtable_ident = NULL_TREE; int always_initialize_class_p = 0; /* We store the stack state in two places: - Within a basic block, we use the quick_stack, which is a - pushdown list (TREE_LISTs) of expression nodes. + Within a basic block, we use the quick_stack, which is a VEC of expression + nodes. This is the top part of the stack; below that we use find_stack_slot. At the end of a basic block, the quick_stack must be flushed to the stack slot array (as handled by find_stack_slot). @@ -116,10 +116,7 @@ int always_initialize_class_p = 0; So dup cannot just add an extra element to the quick_stack, but iadd can. */ -static GTY(()) tree quick_stack; - -/* A free-list of unused permanent TREE_LIST nodes. */ -static GTY((deletable)) tree tree_list_free_list; +static GTY(()) VEC(tree,gc) *quick_stack; /* The physical memory page size used in this computer. See build_field_ref(). */ @@ -215,33 +212,24 @@ static void flush_quick_stack (void) { int stack_index = stack_pointer; - tree prev, cur, next; + unsigned ix; + tree t; - /* First reverse the quick_stack, and count the number of slots it has. */ - for (cur = quick_stack, prev = NULL_TREE; cur != NULL_TREE; cur = next) - { - next = TREE_CHAIN (cur); - TREE_CHAIN (cur) = prev; - prev = cur; - stack_index -= 1 + TYPE_IS_WIDE (TREE_TYPE (TREE_VALUE (cur))); - } - quick_stack = prev; + /* Count the number of slots the quick stack is holding. */ + for (ix = 0; VEC_iterate(tree, quick_stack, ix, t); ix++) + stack_index -= 1 + TYPE_IS_WIDE (TREE_TYPE (t)); - while (quick_stack != NULL_TREE) + for (ix = 0; VEC_iterate(tree, quick_stack, ix, t); ix++) { - tree decl; - tree node = quick_stack, type; - quick_stack = TREE_CHAIN (node); - TREE_CHAIN (node) = tree_list_free_list; - tree_list_free_list = node; - node = TREE_VALUE (node); - type = TREE_TYPE (node); + tree decl, type = TREE_TYPE (t); decl = find_stack_slot (stack_index, type); - if (decl != node) - java_add_stmt (build2 (MODIFY_EXPR, TREE_TYPE (node), decl, node)); + if (decl != t) + java_add_stmt (build2 (MODIFY_EXPR, TREE_TYPE (t), decl, t)); stack_index += 1 + TYPE_IS_WIDE (type); } + + VEC_truncate (tree, quick_stack, 0); } /* Push TYPE on the type stack. @@ -282,16 +270,8 @@ push_value (tree value) value = convert (type, value); } push_type (type); - if (tree_list_free_list == NULL_TREE) - quick_stack = tree_cons (NULL_TREE, value, quick_stack); - else - { - tree node = tree_list_free_list; - tree_list_free_list = TREE_CHAIN (tree_list_free_list); - TREE_VALUE (node) = value; - TREE_CHAIN (node) = quick_stack; - quick_stack = node; - } + VEC_safe_push (tree, gc, quick_stack, value); + /* If the value has a side effect, then we need to evaluate it whether or not the result is used. If the value ends up on the quick stack and is then popped, this won't happen -- so we flush @@ -604,15 +584,8 @@ static tree pop_value (tree type) { type = pop_type (type); - if (quick_stack) - { - tree node = quick_stack; - quick_stack = TREE_CHAIN (quick_stack); - TREE_CHAIN (node) = tree_list_free_list; - tree_list_free_list = node; - node = TREE_VALUE (node); - return node; - } + if (VEC_length (tree, quick_stack) != 0) + return VEC_pop (tree, quick_stack); else return find_stack_slot (stack_pointer, promote_type (type)); } -- 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/expr.c | 38 +++++++++++++------------------------- 1 file changed, 13 insertions(+), 25 deletions(-) (limited to 'gcc/java/expr.c') diff --git a/gcc/java/expr.c b/gcc/java/expr.c index 0f3cf1aef4e..62598e7c6a2 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -2289,34 +2289,22 @@ invoke_build_dtable (int is_invoke_interface, VEC(tree,gc) *arg_list) reused. */ int -get_symbol_table_index (tree t, tree special, tree *symbol_table) +get_symbol_table_index (tree t, tree special, + VEC(method_entry,gc) **symbol_table) { - int i = 1; - tree method_list; + method_entry *e; + unsigned i; - if (*symbol_table == NULL_TREE) - { - *symbol_table = build_tree_list (special, t); - return 1; - } - - method_list = *symbol_table; - - while (1) - { - tree value = TREE_VALUE (method_list); - tree purpose = TREE_PURPOSE (method_list); - if (value == t && purpose == special) - return i; - i++; - if (TREE_CHAIN (method_list) == NULL_TREE) - break; - else - method_list = TREE_CHAIN (method_list); - } + for (i = 0; VEC_iterate (method_entry, *symbol_table, i, e); i++) + if (t == e->method && special == e->special) + goto done; + + e = VEC_safe_push (method_entry, gc, *symbol_table, NULL); + e->method = t; + e->special = special; - TREE_CHAIN (method_list) = build_tree_list (special, t); - return i; + done: + return i+1; } tree -- cgit v1.2.1 From 6cbf667385e50fa23e729eebbee0dac150a77b52 Mon Sep 17 00:00:00 2001 From: froydnj Date: Fri, 28 May 2010 17:11:15 +0000 Subject: * expr.c (get_symbol_table_index): Add spaces in expression. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159984 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/java/expr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/java/expr.c') diff --git a/gcc/java/expr.c b/gcc/java/expr.c index 62598e7c6a2..0abcb0d1de7 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -2304,7 +2304,7 @@ get_symbol_table_index (tree t, tree special, e->special = special; done: - return i+1; + return i + 1; } 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/expr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/java/expr.c') diff --git a/gcc/java/expr.c b/gcc/java/expr.c index 0abcb0d1de7..042ed1b7297 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -463,7 +463,7 @@ add_type_assertion (tree klass, int assertion_code, tree op1, tree op2) if (*as_pp) return; - *as_pp = ggc_alloc (sizeof (type_assertion)); + *as_pp = ggc_alloc_type_assertion (); **(type_assertion **)as_pp = as; } -- cgit v1.2.1 From 0b205f4ca112a643f4f1b9c9886648b569e0b380 Mon Sep 17 00:00:00 2001 From: manu Date: Thu, 8 Jul 2010 04:22:54 +0000 Subject: =?UTF-8?q?2010-07-08=20=20Manuel=20L=C3=B3pez-Ib=C3=A1=C3=B1ez=20?= =?UTF-8?q?=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * toplev.h: Do not include diagnostic-core.h. Include diagnostic-core.h in every file that includes toplev.h. * c-tree.h: Do not include toplev.h. * pretty-print.h: Update comment. * Makefile.in: Update dependencies. * alias.c: Include diagnostic-core.h in every file that includes toplev.h. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * cfghooks.c: Likewise. * cfgloop.c: Likewise. * combine.c: Likewise. * config/alpha/alpha.c: Likewise. * config/arc/arc.c: Likewise. * config/arm/arm.c: Likewise. * config/arm/pe.c: Likewise. * config/avr/avr.c: Likewise. * config/bfin/bfin.c: Likewise. * config/cris/cris.c: Likewise. * config/crx/crx.c: Likewise. * config/darwin-c.c: Likewise. * config/darwin.c: Likewise. * config/fr30/fr30.c: Likewise. * config/frv/frv.c: Likewise. * config/h8300/h8300.c: Likewise. * config/host-darwin.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/netware.c: Likewise. * config/i386/nwld.c: Likewise. * config/i386/winnt-cxx.c: Likewise. * config/i386/winnt-stubs.c: Likewise. * config/i386/winnt.c: Likewise. * config/ia64/ia64-c.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/lm32/lm32.c: Likewise. * config/m32c/m32c-pragma.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32r/m32r.c: Likewise. * config/m68hc11/m68hc11.c: Likewise. * config/m68k/m68k.c: Likewise. * config/mcore/mcore.c: Likewise. * config/mep/mep-pragma.c: Likewise. * config/mep/mep.c: Likewise. * config/mmix/mmix.c: Likewise. * config/mn10300/mn10300.c: Likewise. * config/moxie/moxie.c: Likewise. * config/pa/pa.c: Likewise. * config/pdp11/pdp11.c: Likewise. * config/picochip/picochip.c: Likewise. * config/rs6000/rs6000-c.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/rx/rx.c: Likewise. * config/s390/s390.c: Likewise. * config/score/score.c: Likewise. * config/score/score3.c: Likewise. * config/score/score7.c: Likewise. * config/sh/sh.c: Likewise. * config/sh/symbian-base.c: Likewise. * config/sh/symbian-c.c: Likewise. * config/sh/symbian-cxx.c: Likewise. * config/sol2-c.c: Likewise. * config/sol2.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/v850/v850-c.c: Likewise. * config/v850/v850.c: Likewise. * config/vax/vax.c: Likewise. * config/vxworks.c: Likewise. * config/xtensa/xtensa.c: Likewise. * convert.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbxout.c: Likewise. * ddg.c: Likewise. * dominance.c: Likewise. * emit-rtl.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * fixed-value.c: Likewise. * fold-const.c: Likewise. * fwprop.c: Likewise. * gcse.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * gimple-low.c: Likewise. * gimplify.c: Likewise. * graph.c: Likewise. * haifa-sched.c: Likewise. * ifcvt.c: Likewise. * implicit-zee.c: Likewise. * integrate.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-iv.c: Likewise. * lto-opts.c: Likewise. * lto-symtab.c: Likewise. * main.c: Likewise. * modulo-sched.c: Likewise. * optabs.c: Likewise. * params.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * profile.c: Likewise. * real.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtlanal.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-rgn.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-ir.c: Likewise. * simplify-rtx.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * targhooks.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-dump.c: Likewise. * tree-eh.c: Likewise. * tree-inline.c: Likewise. * tree-nomudflap.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-phinodes.c: Likewise. * tree-profile.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssa.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vrp.c: Likewise. * varasm.c: Likewise. * vec.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. c-family/ * c-common.h: Include diagnostic-core.h. Error if already included. * c-semantics.c: Do not define GCC_DIAG_STYLE here. cp/ * cp-tree.h: Do not include toplev.h. java/ * boehm.c: Include diagnostic-core.h in every file that includes toplev.h. * class.c: Likewise. * constants.c: Likewise. * decl.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * jcf-parse.c: Likewise. * mangle.c: Likewise. * mangle_name.c: Likewise. * resource.c: Likewise. * typeck.c: Likewise. * verify-glue.c: Likewise. ada/ * gcc-interface/utils.c: Include diagnostic-core.h in every file that includes toplev.h. lto/ * lto-coff.c: Include diagnostic-core.h in every file that includes toplev.h. * lto-elf.c: Likewise. * lto-lang.c: Likewise. * lto-macho.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161943 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/java/expr.c | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/java/expr.c') diff --git a/gcc/java/expr.c b/gcc/java/expr.c index 042ed1b7297..3f517194044 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -35,6 +35,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ #include "jcf.h" #include "java-except.h" #include "parse.h" +#include "diagnostic-core.h" #include "toplev.h" #include "ggc.h" #include "tree-iterator.h" -- 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/expr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'gcc/java/expr.c') diff --git a/gcc/java/expr.c b/gcc/java/expr.c index 3f517194044..3c987c5fe82 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -1634,7 +1634,7 @@ lookup_field (tree *typep, tree name) tree save_field; int i; - for (field = TYPE_FIELDS (*typep); field; field = TREE_CHAIN (field)) + for (field = TYPE_FIELDS (*typep); field; field = DECL_CHAIN (field)) if (DECL_NAME (field) == name) return field; @@ -1952,7 +1952,7 @@ attach_init_test_initialization_flags (void **entry, void *ptr) if (TREE_CODE (block) == BIND_EXPR) { tree body = BIND_EXPR_BODY (block); - TREE_CHAIN (ite->value) = BIND_EXPR_VARS (block); + DECL_CHAIN (ite->value) = BIND_EXPR_VARS (block); BIND_EXPR_VARS (block) = ite->value; body = build2 (COMPOUND_EXPR, void_type_node, build1 (DECL_EXPR, void_type_node, ite->value), body); @@ -2239,7 +2239,7 @@ build_known_method_ref (tree method, tree method_type ATTRIBUTE_UNUSED, lookup_field (&class_type_node, methods_ident), NULL_TREE); for (meth = TYPE_METHODS (self_type); - ; meth = TREE_CHAIN (meth)) + ; meth = DECL_CHAIN (meth)) { if (method == meth) break; @@ -2643,7 +2643,7 @@ build_jni_stub (tree method) res_var = build_decl (input_location, VAR_DECL, get_identifier ("res"), TREE_TYPE (TREE_TYPE (method))); DECL_CONTEXT (res_var) = method; - TREE_CHAIN (env_var) = res_var; + DECL_CHAIN (env_var) = res_var; } method_args = DECL_ARGUMENTS (method); @@ -2673,7 +2673,7 @@ build_jni_stub (tree method) /* All the arguments to this method become arguments to the underlying JNI function. If we had to wrap object arguments in a special way, we would do that here. */ - for (tem = method_args; tem != NULL_TREE; tem = TREE_CHAIN (tem)) + for (tem = method_args; tem != NULL_TREE; tem = DECL_CHAIN (tem)) { int arg_bits = TREE_INT_CST_LOW (TYPE_SIZE (TREE_TYPE (tem))); #ifdef PARM_BOUNDARY @@ -3779,7 +3779,7 @@ promote_arguments (void) int i; tree arg; for (arg = DECL_ARGUMENTS (current_function_decl), i = 0; - arg != NULL_TREE; arg = TREE_CHAIN (arg), i++) + arg != NULL_TREE; arg = DECL_CHAIN (arg), i++) { tree arg_type = TREE_TYPE (arg); if (INTEGRAL_TYPE_P (arg_type) -- cgit v1.2.1