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/resource.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'gcc/java/resource.c') diff --git a/gcc/java/resource.c b/gcc/java/resource.c index 550e1d505d8..401e6342f0b 100644 --- a/gcc/java/resource.c +++ b/gcc/java/resource.c @@ -55,6 +55,7 @@ void compile_resource_data (const char *name, const char *buffer, int length) { tree rtype, field = NULL_TREE, data_type, rinit, data, decl; + VEC(constructor_elt,gc) *v = NULL; data_type = build_prim_array_type (unsigned_byte_type_node, strlen (name) + length); @@ -65,15 +66,15 @@ compile_resource_data (const char *name, const char *buffer, int length) rtype, field, "resource_length", unsigned_int_type_node); PUSH_FIELD (input_location, rtype, field, "data", data_type); FINISH_RECORD (rtype); - START_RECORD_CONSTRUCTOR (rinit, rtype); - PUSH_FIELD_VALUE (rinit, "name_length", + START_RECORD_CONSTRUCTOR (v, rtype); + PUSH_FIELD_VALUE (v, "name_length", build_int_cst (NULL_TREE, strlen (name))); - PUSH_FIELD_VALUE (rinit, "resource_length", + PUSH_FIELD_VALUE (v, "resource_length", build_int_cst (NULL_TREE, length)); data = build_string (strlen(name) + length, buffer); TREE_TYPE (data) = data_type; - PUSH_FIELD_VALUE (rinit, "data", data); - FINISH_RECORD_CONSTRUCTOR (rinit); + PUSH_FIELD_VALUE (v, "data", data); + FINISH_RECORD_CONSTRUCTOR (rinit, v, rtype); TREE_CONSTANT (rinit) = 1; decl = build_decl (input_location, -- 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/resource.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'gcc/java/resource.c') diff --git a/gcc/java/resource.c b/gcc/java/resource.c index 401e6342f0b..96fc0870416 100644 --- a/gcc/java/resource.c +++ b/gcc/java/resource.c @@ -25,21 +25,15 @@ 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 "java-tree.h" #include "jcf.h" -#include "obstack.h" #include "toplev.h" #include "output.h" #include "parse.h" #include "function.h" #include "ggc.h" #include "stdio.h" -#include "target.h" -#include "expr.h" #include "tree-iterator.h" #include "cgraph.h" -- 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/resource.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'gcc/java/resource.c') diff --git a/gcc/java/resource.c b/gcc/java/resource.c index 96fc0870416..56a0a1b04d6 100644 --- a/gcc/java/resource.c +++ b/gcc/java/resource.c @@ -43,7 +43,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ #endif /* A list of all the resources files. */ -static GTY(()) tree resources = NULL; +static GTY(()) VEC(tree,gc) *resources; void compile_resource_data (const char *name, const char *buffer, int length) @@ -86,13 +86,14 @@ compile_resource_data (const char *name, const char *buffer, int length) rest_of_decl_compilation (decl, global_bindings_p (), 0); varpool_finalize_decl (decl); - resources = tree_cons (NULL_TREE, decl, resources); + VEC_safe_push (tree, gc, resources, decl); } void write_resource_constructor (tree *list_p) { - tree iter, t, register_resource_fn; + tree decl, t, register_resource_fn; + unsigned ix; if (resources == NULL) return; @@ -105,9 +106,9 @@ write_resource_constructor (tree *list_p) register_resource_fn = t; /* Write out entries in the same order in which they were defined. */ - for (iter = nreverse (resources); iter ; iter = TREE_CHAIN (iter)) + for (ix = 0; VEC_iterate (tree, resources, ix, decl); ix++) { - t = build_fold_addr_expr (TREE_VALUE (iter)); + t = build_fold_addr_expr (decl); t = build_call_expr (register_resource_fn, 1, t); append_to_statement_list (t, list_p); } -- 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/resource.c | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/java/resource.c') diff --git a/gcc/java/resource.c b/gcc/java/resource.c index 56a0a1b04d6..d96d2d8d362 100644 --- a/gcc/java/resource.c +++ b/gcc/java/resource.c @@ -28,6 +28,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ #include "tree.h" #include "java-tree.h" #include "jcf.h" +#include "diagnostic-core.h" #include "toplev.h" #include "output.h" #include "parse.h" -- cgit v1.2.1