From 2a22f99cb12d82712dd93cfef808b1cef543601b Mon Sep 17 00:00:00 2001 From: Trevor Saunders Date: Sun, 12 Oct 2014 22:22:53 +0000 Subject: move many gc hashtab to hash_table gcc/ * asan.c, cfgloop.c, cfgloop.h, cgraph.c, cgraph.h, config/darwin.c, config/m32c/m32c.c, config/mep/mep.c, config/mips/mips.c, config/rs6000/rs6000.c, dwarf2out.c, function.c, function.h, gimple-ssa.h, libfuncs.h, optabs.c, output.h, rtl.h, sese.c, symtab.c, tree-cfg.c, tree-dfa.c, tree-ssa.c, varasm.c: Use hash-table instead of hashtab. * doc/gty.texi (for_user): Document new option. * gengtype.c (create_user_defined_type): Don't try to get a struct for char. (walk_type): Don't error out on for_user option. (write_func_for_structure): Emit user marking routines if requested by for_user option. (write_local_func_for_structure): Likewise. (main): Mark types with for_user option as used. * ggc.h (gt_pch_nx): Add overload for unsigned int. * hash-map.h (hash_map::hash_entry::pch_nx_helper): AddOverloads. * hash-table.h (ggc_hasher): New struct. (hash_table::create_ggc): New function. (gt_pch_nx): New overload for hash_table. java/ * class.c, decl.c, except.c, expr.c, java-tree.h, lang.c: Use hash_table instead of hashtab. objc/ * objc-act.c: use hash_table instead of hashtab. cp/ * cp-gimplify.c, cp-tree.h, decl.c, mangle.c, name-lookup.c, pt.c, semantics.c, tree.c, typeck2.c: Use hash_table instead of hashtab. fortran/ * trans-decl.c, trans.c, trans.h: Use hash_table instead of hashtab. c-family/ * c-common.c: Use hash_table instead of hashtab. From-SVN: r216127 --- gcc/java/lang.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'gcc/java/lang.c') diff --git a/gcc/java/lang.c b/gcc/java/lang.c index 8a68691..7f0b09d 100644 --- a/gcc/java/lang.c +++ b/gcc/java/lang.c @@ -57,8 +57,6 @@ static void put_decl_string (const char *, int); static void put_decl_node (tree, int); static void java_print_error_function (diagnostic_context *, const char *, diagnostic_info *); -static int merge_init_test_initialization (void * *, void *); -static int inline_init_test_initialization (void * *, void *); static bool java_dump_tree (void *, tree); static void dump_compound_expr (dump_info_p, tree); static bool java_decl_ok_for_sibcall (const_tree); @@ -713,10 +711,10 @@ decl_constant_value (tree decl) /* Create a mapping from a boolean variable in a method being inlined to one in the scope of the method being inlined into. */ -static int -merge_init_test_initialization (void **entry, void *x) +int +merge_init_test_initialization (treetreehash_entry **entry, void *x) { - struct treetreehash_entry *ite = (struct treetreehash_entry *) *entry; + struct treetreehash_entry *ite = *entry; splay_tree decl_map = (splay_tree)x; splay_tree_node n; tree *init_test_decl; @@ -761,9 +759,8 @@ merge_init_test_initialization (void **entry, void *x) void java_inlining_merge_static_initializers (tree fn, void *decl_map) { - htab_traverse - (DECL_FUNCTION_INIT_TEST_TABLE (fn), - merge_init_test_initialization, decl_map); + DECL_FUNCTION_INIT_TEST_TABLE (fn) + ->traverse (decl_map); } /* Lookup a DECL_FUNCTION_INIT_TEST_TABLE entry in the method we're @@ -772,10 +769,10 @@ java_inlining_merge_static_initializers (tree fn, void *decl_map) from the variable in the inlined class to the corresponding pre-existing one. */ -static int -inline_init_test_initialization (void **entry, void *x) +int +inline_init_test_initialization (treetreehash_entry **entry, void *x) { - struct treetreehash_entry *ite = (struct treetreehash_entry *) *entry; + struct treetreehash_entry *ite = *entry; splay_tree decl_map = (splay_tree)x; tree h = java_treetreehash_find @@ -796,9 +793,8 @@ inline_init_test_initialization (void **entry, void *x) void java_inlining_map_static_initializers (tree fn, void *decl_map) { - htab_traverse - (DECL_FUNCTION_INIT_TEST_TABLE (fn), - inline_init_test_initialization, decl_map); + DECL_FUNCTION_INIT_TEST_TABLE (fn) + ->traverse (decl_map); } /* Avoid voluminous output for deep recursion of compound exprs. */ -- cgit v1.1