aboutsummaryrefslogtreecommitdiff
path: root/libiberty/splay-tree.c
AgeCommit message (Collapse)Author
2003-05-07 * splay-tree.c (splay_tree_predecessor): Fix comment.Josef Zlomek
(splay_tree_successor): Fix comment. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@66569 138bc75d-0d04-0410-961f-82ee72b054a4
2002-09-20 * cp-demangle.c (demangling_new): Cast 0 to enum.John David Anglin
(demangle_char): Cast return of strdup to char *. (is_gnu_v3_mangled_ctor): Cast 0 to enum. (is_gnu_v3_mangled_dtor): Likewise. * cplus-dem.c (grow_vect): Cast return of xrealloc to void *. (work_stuff_copy_to_from): Cast return of xmalloc to char **. * fibheap.c (fibnode_new): Cast return of xcalloc to fibnode_t. * md5.c (md5_process_bytes): Cast results back to const void *. (md5_process_block): Add cast to const md5_uint32 *. * regex.c (re_compile_fastmap): Cast enum to UCHAR_T. * safe-ctype.c (L, XL, U, XU, D, P, _, C, Z, M, V, T, S): Add cast to unsigned short. * splay-tree.c (splay_tree_xmalloc_allocate): Cast return of xmalloc to void *. * vasprintf.c (int_vasprintf): Cast return of malloc to char *. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@57330 138bc75d-0d04-0410-961f-82ee72b054a4
2002-09-12 * splay-tree.c (splay_tree_successor): Fix comments.Mike Stump
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@57044 138bc75d-0d04-0410-961f-82ee72b054a4
2002-03-07* splay-tree.c (splay_tree_xmalloc_allocate,Jim Blandy
splay_tree_xmalloc_deallocate): Use K&R-style definitions, not prototyped definitions. Mark `data' arguments as unused. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@50384 138bc75d-0d04-0410-961f-82ee72b054a4
2002-02-22include:Jim Blandy
Allow the user to specify functions for allocating memory for splay tree roots and nodes. * splay-tree.h (splay_tree_allocate_fn, splay_tree_deallocate_fn): New types. (splay_tree): New fields: `allocate', `deallocate', and `allocate_data'. (splay_tree_new_with_allocator): New function declaration. libiberty: * splay-tree.c (splay_tree_xmalloc_allocate, splay_tree_xmalloc_deallocate): New functions. (splay_tree_new): Call splay_tree_new_with_allocator, passing the above functions and a dummy data pointer. (splay_tree_new_with_allocator): New function. (splay_tree_delete_helper, splay_tree_delete, splay_tree_insert, splay_tree_remove): Use the splay tree's allocation and deallocation functions. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@49968 138bc75d-0d04-0410-961f-82ee72b054a4
2001-05-07 * splay-tree.h (splay_tree_max): New function.Mark Mitchell
(splay_tree_min): Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@41895 138bc75d-0d04-0410-961f-82ee72b054a4
2000-10-01 * c-decl.c (c_expand_body): Don't generate RTL if flag_syntax_only.Mark Mitchell
(lang_mark_false_label_stack): Remove. * c-lex.c (init_c_lex): Add file_info_tree as GC root. Allocate <top level> string in GC area. (mark_splay_tree_node): New function. (mark_splay_tree): Likewise. * except.c (mark_eh_status): Only call lang_mark_false_label_stack if it exists. * ggc-callbacks.c (lang_mark_false_label_stack): Remove. * ggc-common.c (lang_mark_false_label_stack): Change type. * ggc.h (ggc_alloc_string): Add comment. (ggc_strdup): New function. * decl.c (lang_mark_false_label_stack): Remove. * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared. * com.c (lang_mark_false_label_stack): Remove. Convert to GC. * Make-lang.in (s-java): Don't depend on ggc-callbacks.o. * Makefile.in (BACKEND): Don't include ggc-callbacks.o. (typeck.o): Depend on ggc.h. * class.c (add_method_1): Use GC functions for allocation. (init_class_processing): Register roots. * decl.c (ggc_p): Set to 1. (pending_local_decls): Make it static. (push_jvm_slot): Use GC functions for allocation. (init_decl_processing): Register roots. (give_name_to_locals): Use GC functions for allocation. (lang_mark_tree): New function. * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC functions for allocation. * jcf-parse.c (jcf_parse_source): Use ggc_strdup. * lex.c (java_lex): Use build_string, rather than replicating it inline. * parse.y (goal): Add more roots. (mark_parser_ctxt): New function. * typeck.c: Include ggc.h. * splay-tree.c (splay_tree_insert): Fix formatting. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@36687 138bc75d-0d04-0410-961f-82ee72b054a4
2000-09-17 * splay-tree.c (splay_tree_predecessor): Fix typo in comment.Mark Mitchell
Convert the C front-end to use function-at-a-time mode. * c-common.h: Include splay-tree.h. (C_DECLARED_LABEL_FLAG): New macro. (struct language_function): Add x_scope_stmt_stack and x_function_name_declared_p. (RECHAIN_STMTS): Move definition. (lang_statment_code_p): Likewise. (lang_expand_stmt): Likewise. (lang_expand_decl_stmt): New variable. (lang_expand_function_end): Likewise. (current_scope_stmt_stack): New function. (add_decl_stmt): Likewise. (add_scope_stmt): Likewise. (mark_stmt_tree): Likewise. (struct c_lang_decl): New structure. (DECL_SAVED_TREE): Define. (c_mark_lang_decl): New function. (c_expand_start_cond): Change prototype. (c_finish_then): New function. (c_finish_else): Likewise. (current_function_name_declared): Remove. (set_current_function_name_declared): Likewise. (mark_c_language_function): Declare. (case_compare): Likewise. (c_add_case_label): Likewise. (c_expand_expr): Likewise. (c_safe_from_p): Likewise. * c-common.c (lang_expand_function_end): New variable. (struct if_elt): Add if_stmt. (c_expand_start_cond): Add the if-statement to the statement-tree, rather than generating RTL. (c_finish_then): New function. (c_expand_start_else): Don't generate RTL. (c_finish_else): New function. (c_expand_expr_stmt): Don't generate RTL. (statement_code_p): Add SCOPE_STMT. (case_compare): New function. (c_add_case_label): Likewise. (mark_stmt_tree): Likewise. (c_mark_lang_decl): Likewise. (mark_c_language_function): Likewise. (c_expand_expr): Likewise. (c_safe_from_p): Likewise. * c-decl.c (c_stmt_tree): New variable (c_scope_stmt_stack): Likewise. (c_function_name_declared_p): Likewise. (lang_expand_expr_stmt): Remove. (poplevel): Don't call output_inline_function for nested functions. (pushdecl): Don't set DECL_CONTEXT for a local declaration of an `extern' function. (redeclaration_error_message): Change means of computing whether or not a function is nested. (lookup_label): Don't call label_rtx. (init_decl_processing): Add more GC roots. (start_decl): Add DECL_STMTs to the statement-tree, rather than calling rest_of_decl_compilation. (finish_decl): Don't call expand_decl. (store_parm_decls): Begin the statement-tree, but don't generate RTL. (finish_function): Tie off the statement-tree. Call c_expand_body if appropriate. (c_expand_body): New function. (push_c_function_context): Save more information. (pop_c_function_contxt): Likewise. (copy_lang_decl): Now that we use DECL_LANG_SPECIFIC, copy it. (lang_mark_tree): Mark it. (current_stmt_tree): Adjust. (current_scope_stmt_stack): New function. (do_case): Remove. (set_current_name_declared): Likewise. (c_begin_compound_stmt): Define. (c_expand_decl_stmt): Likewise. * c-lang.c: Include rtl.h and expr.h. (lang_init): Set more language-specific hooks. * c-lex.c: Include expr.h. * c-parse.in: Changes throughout to add statements to the statement-tree, rather than generating RTL after every statement. * c-semantics.c (lang_expand_decl_stmt): Define. (add_decl_stmt): New function. (add_scope_stmt): Likewise. (finish_stmt_tree): Tweak. (genrtl_expr_stmt): Likewise. (genrtl_decl_stmt): Handle local labels, and call lang_expand_decl_stmt if required. (genrtl_for_stmt): Fix line-number handling. (genrtl_case_label): Handle cleanups. (genrtl_asm_stmt): Don't call combine_strings. (genrtl_compound_stmt): Simplify. (expand_stmt): Handle SCOPE_STMTs. * c-tree.h (struct lang_decl): New structure. (C_DECLARED_LABEL_FLAG): Remove. (c_begin_compound_stmt): Declare. (c_expand_decl_stmt): Likewise. (c_expand_start_case): Rename to c_start_case. (c_finish_case): New function. * c-typeck.c (start_init): Tweak setting of constructor_incremental. (c_expand_asm_operands): Tweak error-handling. Add to the statement-tree. (c_expand_return): Add to the statement-tree. (c_expand_start_case): Rename to ... (c_start_case): ... this. (struct c_switch): New type. (switch_stack): New variable. (do_case): Simplify. (c_finish_case): New function. * dependence.c: Include expr.h. (enum dependence_type): Change spelling of enumerals. (check_node_dependence): Adjust. * expr.h (lang_safe_from_p): Declare. (safe_from_p): Likewise. * expr.c (lang_safe_from_p): New variable. (safe_from_p): Give it external linkage. Use lang_safe_from_p. * stmt.c (expand_expr_stmt): Avoid clobberring of last_expr_type. * toplev.c (rest_of_decl_compilation): Robustify. * tree.c (contains_placeholder_p): Likewise. * Makefile.in: Update dependencies. * objc/objc-act.h: Adjust calculation of value for dummy_tree_code. * objc/objc-act.c: Include rtl.h, expr.h, and c-common.h. (objc_expand_function_end): New function. (finish_method_def): Use it. (init_objc): Initialize more language-specific hooks. * objc/Make-lang.in: Update dependencies. * cp-tree.h (struct cp_language_function): Remove x_scope_stmt_stack and name_declared. (current_scope_stmt_stack): Remove. (function_name_declared_p): New macro. (struct lang_decl_flags): Use c_lang_decl as a base class. (context): Remove. (struct lang_decl): Replace saved_tree with context. (DECL_FRIEND_CONTEXT): Adjust accordingly. (SET_DECL_FRIEND_CONTEXT): Likewise. (DECL_VIRTUAL_CONTEXT): Likewise. (DECL_SAVED_TREE): Remove. (C_DECLARED_LABEL_FLAG): Likewise. (cplus_expand_expr_stmt): Don't declare. (add_decl_stmt): Likewise. (add_scope_stmt): Likewise. * decl.c (mark_stmt_tree): Remove. (case_compare): Likewise. (finish_case_label): Use c_add_case_label. (init_decl_processing): Set more language-specific hooks. (build_enumerator): Fix typo in comment. (cplus_expand_expr_stmt): Remove. (mark_lang_function): Use mark_c_language_function. (lang_mark_tree): Use c_mark_lang_decl. * decl2.c: Change order of inclusion. * except.c: Likewise. * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall back on c_expand_expr. * friend.c: Include expr.h. * init.c: Change order of inclusion. * Makefile.in: Update dependencies. * lex.h (free_lang_decl_chain): Remove. * optimize.c (maybe_clone_body): Use function_name_declared_p. * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if it doesn't exist. (instantiate_decl): Use function_name_declared_p. * semantics.c (lang_expand_expr_stmt): Remove. (set_current_function_name_declared): Likewise. (current_function_name_declared): Likewise. (begin_compound_stmt): Use function_name_declared_p. (add_decl_stmt): Remove. (setup_vtbl_ptr): Use function_name_declared_p. (add_scope_stmt): Remove. (current_scope_stmt_stack): New function. (cp_expand_stmt): Don't handle SCOPE_STMTs. (expand_body): Use function_name_declared_p. * tree.c (cp_statement_code_p): Don't include SCOPE_STMT. * typeck.c: Change order of includes. (convert_sequence): Remove. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@36464 138bc75d-0d04-0410-961f-82ee72b054a4
2000-09-15* splay-tree.c: #include <stdio.h>.Michael Sokolov
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@36432 138bc75d-0d04-0410-961f-82ee72b054a4
2000-09-10 * splay-tree.h (splay_tree_predecessor): Declare.Mark Mitchell
* splay-tree.c (splay_tree_predecessor): New function. (splay_tree_successor): Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@36304 138bc75d-0d04-0410-961f-82ee72b054a4
2000-04-06 * splay-tree.c (splay_tree_remove): New.Richard Henderson
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@32949 138bc75d-0d04-0410-961f-82ee72b054a4
1999-12-05 * splay-tree.h (struct splay_tree_node): Rename to ...Mark Mitchell
(struct splay_tree_node_s): ... this. (struct splay_tree): Rename to ... (struct splay_tree_s): ... this. * splay-tree.c (splay_tree_new): Use struct splay_tree_node_s rather than struct splay_tree_node. (splay_tree_insert): Use struct splay_tree_s rather than struct splay_tree. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@30790 138bc75d-0d04-0410-961f-82ee72b054a4
1999-08-02 * splay-tree.h (splay_tree_insert): Return the new node.Mark Mitchell
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@28389 138bc75d-0d04-0410-961f-82ee72b054a4
1999-07-26 * splay-tree.c (splay_tree_insert): Add initialization to avoidIan Lance Taylor
warning. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@28269 138bc75d-0d04-0410-961f-82ee72b054a4
1999-04-021999-04-02 Mark Mitchell <mark@codesourcery.com>Mark Mitchell
* splay-tree.h (splay_tree_compare_pointers): Declare. 1999-04-02 Mark Mitchell <mark@codesourcery.com> * splay-tree.h (splay_tree_compare_pointers): Define. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@26132 138bc75d-0d04-0410-961f-82ee72b054a4
1999-03-30 * alias.c (alias_set_compare): Remove.Mark Mitchell
(record_alias_subset): Use splay_tree_compare_ints instaed of alias_set_compare. (init_alias_once): Likewise. * cse.c: Include splay-tree.h. (reg_qty): Remove. (reg_tick): Likewise. (reg_table): Likewise. (cse_reg_info): New structure. (cse_reg_info_free_list): New variable. (cse_reg_info_tree): Likewise. (cached_regno): Likewise. (cached_cse_reg_info): Likewise. (all_minus_one): Remove. (consec_ints): Likewise. (GET_CSE_REG_INFO): New macro. (REG_TICK): Likewise. Use throughout instead of reg_tick. (REG_IN_TABLE): Likewise. Use throughout instead of reg_in_table. (REG_QTY): Likewise. Use throughout instead of reg_qty. (get_cse_reg_info): New function. (free_cse_reg_info): Likewise. (new_basic_block): Reinitialize cse_reg_info_tree instead of reg_tick, all_minus_one, and consec_ints. * Makefile.in (cse.o): Depend on splay-tree.h * splay-tree.h (splay_tree_compare_ints): Declare. * splay-tree.c (splay_tree_compare_ints): Define. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@26069 138bc75d-0d04-0410-961f-82ee72b054a4
1999-01-12More address fixesJeff Law
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@24644 138bc75d-0d04-0410-961f-82ee72b054a4
1999-01-11More address fixes.Jeffrey A Law
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@24618 138bc75d-0d04-0410-961f-82ee72b054a4
1998-12-14 * choose-temp.c: Don't check IN_GCC anymore.Kaveh Ghazi
* floatformat.c (floatformat_from_double): Use `const', not `CONST'. * memchr.c (memchr): Likewise. * memcpy.c (memcpy): Likewise. * memmove.c (memmove): Likewise. * mkstemp.c: Don't check IN_GCC anymore. * pexecute.c: Likewise. * splay-tree.c: Likewise. * strchr.c (strchr): Use `const', not `CONST'. * strrchr.c (strrchr): Likewise. * strtol.c (strtol): Likewise. * strtoul.c (strtoul): Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@24307 138bc75d-0d04-0410-961f-82ee72b054a4
1998-11-27 * choose-temp.c: Always include libiberty.h. Avoid redundancies.Kaveh Ghazi
* cplus-dem.c: Likewise. Conform to libiberty.h. * pexecute.c: Likewise. * splay-tree.c: Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@23935 138bc75d-0d04-0410-961f-82ee72b054a4
1998-10-26 * splay-tree.c: Tweak include directives to make sure declarations ofMark Mitchell
xmalloc and free are available. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@23358 138bc75d-0d04-0410-961f-82ee72b054a4
1998-10-22 * splay-tree.c (splay_tree_foreach_helper): Make definition staticKaveh Ghazi
to match prototype. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@23230 138bc75d-0d04-0410-961f-82ee72b054a4
1998-10-21 * splay-tree.c: New file.Mark Mitchell
* Makefile.in (CFILES): Add it. (REQUIRED_OFILES): Likewise. (splay-tree.o): Add dependencies. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@23210 138bc75d-0d04-0410-961f-82ee72b054a4