Age | Commit message (Collapse) | Author | Files | Lines |
|
From-SVN: r66577
|
|
libiberty/
* hashtab.c (burtle_hash): New fn.
* configure.in: Add AC_C_BIGENDIAN_CROSS.
* aclocal.m4: Include accross.m4.
* configure, config.in: Regenerate.
include/
* hashtab.h (burtle_hash): Prototype.
(burtle_hash_object): New macro.
From-SVN: r66565
|
|
* argv.c: Fix comments.
* calloc.c: Don't unnecessarily include "libiberty.h".
(bzero): Add prototype.
* floatformat.c: Include "ansidecl.h", rely on ANSI_PROTOTYPES.
* getcwd.c (getcwd): Use standard definition to avoid conflicts
with system headers.
* hashtab.c (htab_traverse): Delete unused variables.
* rename.c: Include "ansidecl.h".
(rename): Use standard definition to avoid conflicts with system
headers.
* strsignal.c: Rely on ANSI_PROTOTYPES.
* strstr.c: Check GNUC >= 2, not GNUC == 2.
* vfprintf.c: Include "ansidecl.h", rely on ANSI_PROTOTYPES.
* vprintf.c: Include "ansidecl.h" earlier, rely on
ANSI_PROTOTYPES.
* vsprintf.c: Include "ansidecl.h" earlier, rely on
ANSI_PROTOTYPES and possibly include <stdarg.h>.
* Makefile.in: Regenerate dependencies.
From-SVN: r65659
|
|
* ggc-common.c (ggc_mark_roots): Use htab_traverse_noresize.
* hashtab.h (htab_traverse_noresize): Declare.
* hashtab.c (htab_traverse_noresize): Break out from ...
* hashtab.c (htab_traverse): ... here.
From-SVN: r64496
|
|
From-SVN: r64249
|
|
of elements actually used.
* hashtab.c (htab_expand): Compute the size of hashtable based
on the number of elements actually used.
(htab_traverse): Call htab_expand when table is too empty.
From-SVN: r64246
|
|
include/
* hashtab.h (htab_alloc_with_arg, htab_free_with_arg): Add new types.
(struct htab): Add alloc_arg, alloc_with_arg_f, free_with_arg_f.
(htab_create_alloc_ex): New prototype.
(htab_set_functions_ex): New prototype.
libiberty/
* hashtab.c (htab_create_alloc_ex): New function.
(hatab_set_functions_ex): New function.
(htab_delete, htab_expand): Support alternate allocation functions.
From-SVN: r61820
|
|
From-SVN: r61507
|
|
Index: include/ChangeLog
* hashtab.h (htab_create): Restore prototype for backward
compatibility.
(htab_try_create): Likewise.
Index: libiberty/ChangeLog
* hashtab.c (htab_create): New stub function for backward
compatibility.
(htab_try_create): Likewise.
From-SVN: r54300
|
|
From-SVN: r54232
|
|
* hashtab.c (higher_prime_number): Use 7 as minimum.
(find_empty_slot_for_expand): Don't compute hash2 unless needed.
(htab_find_slot_with_hash): Likewise.
From-SVN: r52099
|
|
include:
* demangle.h (demangler_engine): Const-ify.
* libiberty.h (buildargv): Likewise.
libiberty:
* argv.c (buildargv, tests, main): Const-ify.
* cp-demangle.c (operator_code): Likewise.
* cplus-dem.c (optable, libiberty_demanglers,
cplus_demangle_set_style, cplus_demangle_name_to_style,
print_demangler_list): Likewise.
* hashtab.c (higher_prime_number): Likewise.
* strcasecmp.c (charmap): Likewise.
* strerror.c (error_info, strerror, main): Likewise.
* strncasecmp.c (charmap): Likewise.
* strsignal.c (signal_info): Likewise.
From-SVN: r46060
|
|
From-SVN: r44978
|
|
From-SVN: r44950
|
|
From-SVN: r40517
|
|
From-SVN: r40512
|
|
From-SVN: r40511
|
|
the next prime.
* hashtab.c (higher_prime_number): Use a table, rather than a
seive, to find the next prime.
From-SVN: r37775
|
|
* hashtab.c (htab_expand): Change to return int. Use calloc or
xcalloc depending on htab->return_allocation_failure. Return zero
if calloc fails.
(htab_create): Update comment to cover memory allocation.
(htab_try_create): New.
(htab_find_slot_with_hash): Return NULL if htab_expand fails.
Update comment to cover this.
From-SVN: r37247
|
|
function.
From-SVN: r37231
|
|
* hashtab.c, partition.c, sort.c, xmemdup.c: Include string.h
if HAVE_STRING_H.
* pexecute.c, xexit.c: Include stdlib.h if HAVE_STDLIB_H.
* objalloc.c: Include config.h. Include stdlib.h and don't
declare malloc or free if HAVE_STDLIB_H.
* strerror.c, strsignal.c: Include stdlib.h if HAVE_STDLIB_H,
else declare malloc without prototype. Include string.h if
HAVE_STRING_H, else declare memset without prototype. Don't
include stddef.h.
From-SVN: r34254
|
|
also eliminate a warning on alpha.
* hashtab.c (hash_pointer): Delete low-order bits which are
probably zero, also eliminate a warning on alpha.
From-SVN: r33934
|
|
* hashtab.c (htab_expand): Add prototype.
(find_empty_slot_for_expand): Likewise.
From-SVN: r33487
|
|
* hashtab.c (hash_pointer, eq_pointer): Make definition static to
match prototype.
(htab_expand): Cast the return value of xcalloc.
From-SVN: r33391
|
|
* hashtab.h (hash_pointer): Declare.
(eq_pointer): Likewise.
* hashtab.c (hash_pointer): New function.
(eq_pointer): Likewise.
(htab_hash_pointer): New variable.
(htab_eq_pointer): Likewise.
From-SVN: r33372
|
|
* gcc/conflict.c (conflict_graph_add): Pass enum type to
htab_find_slot.
* gcc/cpperror.c (hashtab.h): Now include.
* gcc/cppexp.c (hashtab.h): Likewise.
* gcc/cpplex.c (hashtab.h): Likewise.
* gcc/cppfiles.c (hashtab.h): Likewise.
(find_include_file, _cpp_calc_hash, cpp_read_file): Pass enum type
to htab_find_slot_with_hash.
* gcc/cpphash.c (hashtab.h): Now include.
(_cpp_lookup_slot): INSERT is now enum insert_option.
* gcc/cpphash.h (_cpp_lookup_slot): Likewise.
* gcc/cppinit.c (hashtab.h): Include earlier.
(initialize_builtins): Pass enum to htab_find_slot.
* gcc/cpplib.c (hashtab.h): Now include.
(do_define, do_undef): Pass enum type to _cpp_lookup_slot.
(do_pragma_poison, do_assert): Likewise.
* gcc/emit-rtl.c (gen_rtx_CONST_INT): Pass enum to
htab_find_slot_with_hash.
* gcc/simplify-rtx.c (cselib_lookup_mem, cselib_lookup): Likewise.
* gcc/tree.c (type_hash_add): Likewise.
(build1): Minor cleanup.
* include/hashtab.h (enum insert_option): New type.
(htab_find_slot, htab_find_slot_with_hash): Use it.
* libiberty/hashtab.c: Various minor cleanups.
(htab_find_slot_with_hash): INSERT is now enum insert_option.
(htab_find_slot): Likewise.
From-SVN: r33236
|
|
* hashtab.h (hashval_t): New type.
(htab_find_with_hash): Use it as an argument.
(htab_find_slot_with_hash): Likewise.
* hashtab.c (find_empty_slot_for_expand): Use hashval_t for hash
codes.
(htab_find_with_hash): Likewise.
(htab_find_slot_with_hash): Likewise.
From-SVN: r32842
|
|
* hashtab.c (htab_find_with_hash): Avoid calculating hash2
unless it will be used. Rearrange loop for better
optimization.
(higher_prime_number): Add static prototype.
From-SVN: r32809
|
|
From-SVN: r32536
|
|
* hashtab.h (struct htab): Add del_f.
(htab_del): New type.
(htab_create): Add fourth argument.
* hashtab.c (htab_create): Set del_f.
(htab_delete, htab_empty, htab_remove_elt, htab_clear_slot):
Use it.
From-SVN: r32459
|
|
all_expansions).
* hashtab.c: Remove debugging variables (all_searches,
all_collisions, all_expansions). Delete
all_hash_table_collisions.
(create_hash_table, delete_hash_table, empty_hash_table,
find_hash_table_entry, remove_element_from_hash_table_entry,
clear_hash_table_slot, traverse_hash_table, hash_table_size,
hash_table_elements_number, hash_table_collisions): Rename to:
htab_create, htab_delete, htab_empty, htab_find_slot,
htab_remove_elt, htab_clear_slot, htab_traverse, htab_size,
htab_elements, htab_collisions.
(htab_find): New function, handles common case where you don't
plan to add or delete an entry.
(htab_expand): Don't create a whole new table, just a new
entry vector.
(htab_find_slot): Simplify logic.
* hashtab.h (hash_table_t): Rename to htab_t.
(struct hash_table): Rename to struct htab. Shorten element
names. Reorder elements by size.
(htab_hash, htab_eq, htab_trav): New typedefs for the callback
function pointers.
(hash_table_entry_t): Discard; just use void * for element
type.
From-SVN: r32437
|
|
From-SVN: r30683
|
|
From-SVN: r30475
|
|
From-SVN: r30453
|
|
change it to EMPTY_ENTRY first.
1999-10-23 08:51 -0700 Zack Weinberg <zack@bitmover.com>
* hashtab.c (find_hash_table_entry): When returning a
DELETED_ENTRY slot, change it to EMPTY_ENTRY first.
(clear_hash_table_slot): New function which deletes an entry
by its position in the table, not its value.
(traverse_hash_table): New function which calls a hook
function for every live entry in the table.
* hashtab.h: Give hash_table_t a struct tag. Add prototypes
for clear_hash_table_slot and traverse_hash_table. Correct
prototype of all_hash_table_collisions.
From-SVN: r30138
|
|
* Makefile.in (CFILES): Add hashtab.c
(REQUIRED_OFILES): Add hashtab.o
(hashtab.o): Add dependencies.
* hashtab.c: New file
From-SVN: r30012
|