summaryrefslogtreecommitdiff
path: root/libguile/hashtab.h
Commit message (Collapse)AuthorAgeFilesLines
* Update license notices in all C filesAndy Wingo2018-06-201-17/+17
| | | | | Update to newest recommended license notices from the FSF. Everything stays LGPLv3+ except guile-readline which is GPLv3+.
* Remove (C) from copyright statementsAndy Wingo2018-06-201-1/+1
| | | | | | As the FSF advises, 'There is no legal significance to using the three-character sequence “(C)”, but it does no harm.' It does take up space though! For that reason, we remove it here from our C files.
* Rename __scm.h to scm.hAndy Wingo2018-06-201-1/+0
| | | | * libguile/scm.h: Rename. Update all includers.
* Remove Emacs local variables comments in Guile sourceAndy Wingo2018-06-201-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The .dir-locals.el file in the repository is sufficient for Emacs users. * libguile/__scm.h: * libguile/alist.c: * libguile/alist.h: * libguile/array-handle.c: * libguile/array-handle.h: * libguile/array-map.c: * libguile/array-map.h: * libguile/arrays.c: * libguile/arrays.h: * libguile/async.c: * libguile/async.h: * libguile/backtrace.c: * libguile/backtrace.h: * libguile/bitvectors.c: * libguile/bitvectors.h: * libguile/boolean.c: * libguile/boolean.h: * libguile/chars.c: * libguile/chars.h: * libguile/chooks.c: * libguile/chooks.h: * libguile/continuations.c: * libguile/continuations.h: * libguile/control.c: * libguile/conv-integer.i.c: * libguile/debug-malloc.h: * libguile/debug.c: * libguile/debug.h: * libguile/deprecation.c: * libguile/deprecation.h: * libguile/dynl.c: * libguile/dynl.h: * libguile/dynstack.c: * libguile/dynstack.h: * libguile/dynwind.c: * libguile/dynwind.h: * libguile/eq.c: * libguile/eq.h: * libguile/error.c: * libguile/error.h: * libguile/eval.c: * libguile/eval.h: * libguile/evalext.c: * libguile/evalext.h: * libguile/expand.c: * libguile/expand.h: * libguile/extensions.c: * libguile/extensions.h: * libguile/feature.c: * libguile/feature.h: * libguile/filesys.c: * libguile/filesys.h: * libguile/fluids.c: * libguile/fluids.h: * libguile/foreign.c: * libguile/fports.c: * libguile/fports.h: * libguile/frames.c: * libguile/frames.h: * libguile/gc-inline.h: * libguile/gc.c: * libguile/gc.h: * libguile/generalized-arrays.c: * libguile/generalized-arrays.h: * libguile/generalized-vectors.c: * libguile/generalized-vectors.h: * libguile/gettext.c: * libguile/gettext.h: * libguile/goops.c: * libguile/goops.h: * libguile/gsubr.c: * libguile/gsubr.h: * libguile/guardians.c: * libguile/guardians.h: * libguile/guile.c: * libguile/hash.c: * libguile/hash.h: * libguile/hashtab.c: * libguile/hashtab.h: * libguile/hooks.c: * libguile/hooks.h: * libguile/i18n.c: * libguile/i18n.h: * libguile/init.c: * libguile/init.h: * libguile/instructions.c: * libguile/instructions.h: * libguile/intrinsics.c: * libguile/intrinsics.h: * libguile/ioext.c: * libguile/ioext.h: * libguile/iselect.h: * libguile/keywords.c: * libguile/keywords.h: * libguile/list.c: * libguile/list.h: * libguile/load.c: * libguile/load.h: * libguile/loader.c: * libguile/loader.h: * libguile/macros.c: * libguile/macros.h: * libguile/mallocs.c: * libguile/mallocs.h: * libguile/memmove.c: * libguile/memoize.c: * libguile/memoize.h: * libguile/modules.c: * libguile/modules.h: * libguile/net_db.c: * libguile/net_db.h: * libguile/null-threads.c: * libguile/null-threads.h: * libguile/numbers.c: * libguile/numbers.h: * libguile/objprop.c: * libguile/objprop.h: * libguile/options.c: * libguile/options.h: * libguile/pairs.c: * libguile/pairs.h: * libguile/poll.c: * libguile/poll.h: * libguile/ports.c: * libguile/ports.h: * libguile/posix.c: * libguile/posix.h: * libguile/print.c: * libguile/print.h: * libguile/procprop.c: * libguile/procprop.h: * libguile/procs.c: * libguile/procs.h: * libguile/programs.c: * libguile/programs.h: * libguile/promises.c: * libguile/promises.h: * libguile/pthread-threads.h: * libguile/random.c: * libguile/random.h: * libguile/rdelim.c: * libguile/rdelim.h: * libguile/read.c: * libguile/read.h: * libguile/regex-posix.c: * libguile/regex-posix.h: * libguile/rw.c: * libguile/rw.h: * libguile/scmsigs.c: * libguile/scmsigs.h: * libguile/script.c: * libguile/script.h: * libguile/simpos.c: * libguile/simpos.h: * libguile/smob.c: * libguile/smob.h: * libguile/snarf.h: * libguile/socket.c: * libguile/socket.h: * libguile/sort.c: * libguile/sort.h: * libguile/srcprop.c: * libguile/srcprop.h: * libguile/stackchk.c: * libguile/stackchk.h: * libguile/stacks.c: * libguile/stacks.h: * libguile/stime.c: * libguile/stime.h: * libguile/strerror.c: * libguile/strings.c: * libguile/strings.h: * libguile/strorder.c: * libguile/strorder.h: * libguile/strports.c: * libguile/strports.h: * libguile/struct.c: * libguile/struct.h: * libguile/symbols.c: * libguile/symbols.h: * libguile/syntax.c: * libguile/syscalls.h: * libguile/tags.h: * libguile/threads.c: * libguile/threads.h: * libguile/throw.c: * libguile/throw.h: * libguile/trees.h: * libguile/unicode.c: * libguile/unicode.h: * libguile/uniform.c: * libguile/uniform.h: * libguile/values.c: * libguile/values.h: * libguile/variable.c: * libguile/variable.h: * libguile/vectors.c: * libguile/vectors.h: * libguile/version.c: * libguile/vm-engine.c: * libguile/vm-expand.h: * libguile/vm.c: * libguile/vm.h: * libguile/vports.c: * libguile/vports.h: * libguile/weak-list.h: * libguile/weak-set.c: * libguile/weak-set.h: * libguile/weak-table.c: * libguile/weak-table.h: * libguile/weak-vector.c: * libguile/weak-vector.h: Remove needless trailing comments.
* Remove useless "classes: h_files" from Guile headers.Andy Wingo2018-06-201-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libguile/__scm.h: * libguile/alist.h: * libguile/array-handle.h: * libguile/array-map.h: * libguile/arrays.h: * libguile/async.h: * libguile/backtrace.h: * libguile/bitvectors.h: * libguile/boolean.h: * libguile/chars.h: * libguile/chooks.h: * libguile/continuations.h: * libguile/debug-malloc.h: * libguile/debug.h: * libguile/deprecation.h: * libguile/dynl.h: * libguile/dynstack.h: * libguile/dynwind.h: * libguile/eq.h: * libguile/error.h: * libguile/eval.h: * libguile/evalext.h: * libguile/expand.h: * libguile/extensions.h: * libguile/feature.h: * libguile/filesys.h: * libguile/fluids.h: * libguile/fports.h: * libguile/gc-inline.h: * libguile/gc.h: * libguile/generalized-arrays.h: * libguile/generalized-vectors.h: * libguile/gettext.h: * libguile/goops.h: * libguile/gsubr.h: * libguile/guardians.h: * libguile/hash.h: * libguile/hashtab.h: * libguile/hooks.h: * libguile/i18n.h: * libguile/init.h: * libguile/inline.h: * libguile/ioext.h: * libguile/iselect.h: * libguile/keywords.h: * libguile/list.h: * libguile/load.h: * libguile/macros.h: * libguile/mallocs.c: * libguile/mallocs.h: * libguile/memoize.h: * libguile/modules.h: * libguile/net_db.h: * libguile/null-threads.h: * libguile/numbers.h: * libguile/objprop.h: * libguile/options.h: * libguile/pairs.h: * libguile/poll.h: * libguile/ports.h: * libguile/posix-w32.h: * libguile/posix.h: * libguile/print.h: * libguile/procprop.h: * libguile/procs.h: * libguile/promises.h: * libguile/pthread-threads.h: * libguile/random.h: * libguile/rdelim.h: * libguile/read.h: * libguile/regex-posix.h: * libguile/rw.h: * libguile/scmsigs.h: * libguile/script.h: * libguile/simpos.h: * libguile/smob.h: * libguile/snarf.h: * libguile/socket.h: * libguile/sort.h: * libguile/srcprop.h: * libguile/stackchk.h: * libguile/stacks.h: * libguile/stime.h: * libguile/strings.h: * libguile/strorder.h: * libguile/strports.h: * libguile/struct.h: * libguile/symbols.h: * libguile/syscalls.h: * libguile/tags.h: * libguile/threads.h: * libguile/throw.h: * libguile/trees.h: * libguile/unicode.h: * libguile/uniform.h: * libguile/values.h: * libguile/variable.h: * libguile/vectors.h: * libguile/vports.h: * libguile/weak-list.h: * libguile/weak-set.h: * libguile/weak-table.h: * libguile/weak-vector.h: Remove "classes: h_files". Reformat copyrights if needed.
* Devolve gc.hAndy Wingo2018-06-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | * libguile/_scm.h: Remove gc.h. * libguile/arrays.h: * libguile/bytevectors.h: * libguile/foreign.h: * libguile/fports.h: * libguile/frames.h: * libguile/hashtab.h: * libguile/modules.h: * libguile/numbers.h: * libguile/print.h: * libguile/programs.h: * libguile/smob.h: * libguile/snarf.h: * libguile/strports.h: * libguile/struct.h: * libguile/symbols.h: * libguile/variable.h: * libguile/vectors.h: * libguile/vm.h: Add gc.h to users of scm_cell_* interfaces. Not really visible right now given that e.g. numbers.h is already included in _scm.h.
* Remove includes of validate.h.Andy Wingo2018-06-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guile-readline/readline.c: * libguile/alist.c: * libguile/array-map.c: * libguile/arrays.c: * libguile/async.c: * libguile/atomic.c: * libguile/backtrace.c: * libguile/boolean.c: * libguile/bytevectors.c: * libguile/chars.c: * libguile/continuations.c: * libguile/debug.c: * libguile/dynl.c: * libguile/eq.c: * libguile/error.c: * libguile/eval.c: * libguile/evalext.c: * libguile/expand.c: * libguile/feature.c: * libguile/filesys.c: * libguile/fluids.c: * libguile/fports.c: * libguile/gc-malloc.c: * libguile/gc.c: * libguile/goops.c: * libguile/goops.h: * libguile/guardians.c: * libguile/hash.c: * libguile/hashtab.c: * libguile/hashtab.h: * libguile/hooks.c: * libguile/i18n.c: * libguile/ioext.c: * libguile/keywords.c: * libguile/list.c: * libguile/load.c: * libguile/macros.c: * libguile/memoize.c: * libguile/modules.h: * libguile/net_db.c: * libguile/numbers.c: * libguile/pairs.c: * libguile/poll.c: * libguile/ports.c: * libguile/posix.c: * libguile/print.c: * libguile/procprop.c: * libguile/procs.c: * libguile/promises.c: * libguile/r6rs-ports.c: * libguile/random.c: * libguile/rdelim.c: * libguile/read.c: * libguile/regex-posix.c: * libguile/rw.c: * libguile/scmsigs.c: * libguile/script.c: * libguile/simpos.c: * libguile/socket.c: * libguile/sort.c: * libguile/srcprop.c: * libguile/srfi-1.c: * libguile/srfi-4.c: * libguile/srfi-60.c: * libguile/stacks.c: * libguile/stime.c: * libguile/strings.c: * libguile/strorder.c: * libguile/strports.c: * libguile/struct.c: * libguile/symbols.c: * libguile/syntax.c: * libguile/threads.c: * libguile/throw.c: * libguile/trees.c: * libguile/unicode.c: * libguile/values.c: * libguile/variable.c: * libguile/vectors.c: * libguile/vports.c: * libguile/weak-set.c: * libguile/weak-table.c: * libguile/weak-vector.c: * libguile.h: Remove validate.h include.
* Merge remote-tracking branch 'origin/stable-2.0'Andy Wingo2013-02-181-0/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: libguile/array-handle.c libguile/deprecated.h libguile/inline.c libguile/inline.h module/ice-9/deprecated.scm module/language/tree-il/peval.scm
| * add hash-count for native tablesDaniel Hartwig2013-02-181-0/+1
| | | | | | | | | | | | | | | | | | | | * libguile/hashtab.c (scm_hash_count): New function. Count the number of elements in a hash table. * doc/ref/api-compound.texi (Hash Tables): Update examples and reference. * test-suite/tests/hash.test (hash-count): New test.
* | refactor tc7 and tc16 checksAndy Wingo2011-10-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libguile/tags.h (SCM_HAS_TYP7, SCM_HAS_TYP7S, SCM_HAS_TYP16): New macros. * libguile/bytevectors.h (SCM_BYTEVECTOR_P): * libguile/control.h (SCM_PROMPT_P): * libguile/filesys.h (SCM_DIRP): * libguile/fluids.h (SCM_WITH_FLUIDS_P, SCM_FLUID_P) (SCM_I_DYNAMIC_STATE_P): * libguile/foreign.h (SCM_POINTER_P): * libguile/fports.h (SCM_FPORTP): * libguile/frames.h (SCM_VM_FRAME_P): * libguile/hashtab.h (SCM_HASHTABLE_P): * libguile/inline.h (scm_get_byte_or_eof): * libguile/numbers.h (SCM_REALP, SCM_BIGP, SCM_COMPLEXP, SCM_FRACTIONP): * libguile/objcodes.h (SCM_OBJCODE_P): * libguile/ports.h (SCM_OUTPUT_PORT_P): * libguile/programs.h (SCM_PROGRAM_P): * libguile/smob.h (SCM_SMOB_PREDICATE): * libguile/srfi-14.h (SCM_CHARSETP): * libguile/strings.c (IS_STRING): * libguile/strports.h (SCM_STRPORTP): * libguile/symbols.h (scm_is_symbol): * libguile/variable.h (SCM_VARIABLEP): * libguile/vectors.h (SCM_I_IS_VECTOR, SCM_I_IS_NONWEAK_VECTOR): * libguile/vm-i-system.c (call, tail-call, mv-call) * libguile/vm.h (SCM_VM_P, SCM_VM_CONT_P): * libguile/weak-set.c (SCM_WEAK_SET_P): * libguile/weak-table.c (SCM_WEAK_TABLE_P): * libguile/weak-vector.h (SCM_I_WVECTP): Use them.
* | reimplement hashtab.c's weak hash tables in terms of weak-table.cAndy Wingo2011-10-241-31/+1
|/ | | | | | | | | | | | | * libguile/hashtab.c: * libguile/hashtab.h: Reimplement the weak hash table implementation in terms of weak tables. All is well except for the horrific hack for hashx tables. * libguile/weak-table.h: * libguile/weak-table.c (scm_make_weak_key_hash_table) (scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table) (scm_weak_key_hash_table_p, scm_weak_value_hash_table_p) (scm_doubly_weak_hash_table_p): Move these definitions here.
* add scm_hash_fn_get_handle_by_hashAndy Wingo2011-01-071-0/+8
| | | | | | * libguile/hashtab.h: * libguile/hashtab.c (scm_hash_fn_get_handle_by_hash): New internal procedure, which should make symbol table lookup faster.
* fluids are tc7 objectsAndy Wingo2009-12-051-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you're wondering what I'm doing, I'm trying to eventually reimplement smobs in terms of structs, so that applicable smobs can just follow the applicable struct dispatch path. But to do that I have to get structs initialized before things that use smobs, which means transforming a bunch of smobby things to tc7 things. But this transformation is good for performance anyway, and we currently have a glut of unused tc7s, so here we go... * libguile/tags.h (scm_tc7_fluid, scm_tc7_dynamic_state): Fluids (and dynamic states) now have tc7s. * libguile/fluids.h: Remove scm_fluids_prehistory, and add internal scm_i_fluid_print. Update a comment. * libguile/fluids.c: Update for tc7 representation. Also remove the next pointers while we're at it, as they aren't used in the new BDW GC. * libguile/eq.c (scm_equal_p): Remove the hashtable case. Hashtables could never be equal? before, I don't see why to add stubs doing the same thing now. * libguile/print.c (iprin1): * libguile/gc.c (scm_i_tag_name): * libguile/evalext.c (scm_self_evaluating_p): Add fluid and dynamic_state cases. * libguile/goops.h: Remove scm_class_hashtable; it will be static. * libguile/goops.c: Make <hashtable> static, and add <fluid> and <dynamic-state> classes. * libguile/hashtab.h: * libguile/hashtab.c: Remove scm_i_hashtable_equal_p. * libguile/init.c (scm_i_init_guile): Remove call to fluids_prehistory.
* hash tables have a tc7Andy Wingo2009-12-051-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | * libguile/tags.h (scm_tc7_hashtable): Allocate a tc7 for hashtables. * libguile/hashtab.h: Adjust macros accordingly. (scm_i_hashtable_print, scm_i_hashtable_equal_p): New internal functions. (scm_hashtab_prehistory): Remove, no more need for this. * libguile/hashtab.c (scm_hash_fn_remove_x): Fix a longstanding bug. (make_hash_table): Adapt to the new hash table representation. * libguile/eq.c (scm_equal_p) * libguile/evalext.c (scm_self_evaluating_p) * libguile/print.c (iprin1) * libguile/gc.c (scm_i_tag_name): Add some tc7_hashtab cases. * libguile/init.c: Remove unused environments init functions. Remove call to hashtab_prehistory. * libguile/goops.h (scm_class_hashtable) * libguile/goops.c (scm_class_of, create_standard_classes): Have to make a class for hash tables manually, because they aren't smobs any more.
* Use proper fold/for-each function types in `hashtab.h'.Ludovic Courtès2009-10-271-8/+12
| | | | | | | | | | | * libguile/hashtab.h (scm_t_hash_fold_fn, scm_t_hash_handle_fn): New types. (scm_internal_hash_fold, scm_internal_hash_for_each_handle): Use them. * libguile/hashtab.c (scm_internal_hash_fold): Take an `scm_t_hash_fold_fn'. Update callers. (scm_internal_hash_for_each_handle): Take an `scm_t_hash_handle_fn'. Update callers.
* Use proper types for hash/assoc functions in `hashtab.h'.Ludovic Courtès2009-10-201-8/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Partly fixes bug #23681 ("Function declarators with empty parentheses should not be used"). * libguile/goops.c (scm_wrap_component): Cast `scm_sloppy_assq'. * libguile/hashtab.c (scm_hash_fn_get_handle): Update to take functions of type `scm_t_hash_fn' and `scm_t_assoc_fn'. Update callers. (scm_ihashx): Change to match `scm_t_hash_fn'. (scm_sloppy_assx): Change to match `scm_t_assoc_fn'. * libguile/hashtab.h (scm_t_hash_fn, scm_t_assoc_fn): New types. (scm_t_hashtable)[hash_fn]: Change to `scm_t_hash_fn'. (scm_i_rehash, scm_hash_fn_get_handle, scm_hash_fn_create_handle_x, scm_hash_fn_ref, scm_hash_fn_set_x, scm_hash_fn_remove_x): Change to take `scm_t_hash_fn' and `scm_t_assoc_fn' parameters. * libguile/srcprop.h (scm_whash_get_handle, scm_whash_create_handle, scm_whash_lookup): Implement in terms of `scm_hashq_*' instead of `scm_hash_fn_*'. * libguile/struct.c (scm_struct_ihashq): Change to match `scm_t_hash_fn'. (scm_struct_create_handle): Cast `scm_sloppy_assq'. * libguile/struct.h (scm_struct_ihashq): Update, make internal.
* Merge branch 'master' into boehm-demers-weiser-gcLudovic Courtès2009-08-181-6/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: lib/Makefile.am libguile/Makefile.am libguile/frames.c libguile/gc-card.c libguile/gc-freelist.c libguile/gc-mark.c libguile/gc-segment.c libguile/gc_os_dep.c libguile/load.c libguile/macros.c libguile/objcodes.c libguile/programs.c libguile/strings.c libguile/vm.c m4/gnulib-cache.m4 m4/gnulib-comp.m4 m4/inline.m4
| * Change Guile license to LGPLv3+Neil Jerram2009-06-171-6/+7
| | | | | | | | | | | | | | | | | | | | (Not quite finished, the following will be done tomorrow. module/srfi/*.scm module/rnrs/*.scm module/scripts/*.scm testsuite/*.scm guile-readline/* )
* | Merge branch 'master' into boehm-demers-weiser-gcLudovic Courtès2008-09-101-4/+5
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: libguile/Makefile.am libguile/coop-defs.h libguile/gc-card.c libguile/gc-freelist.c libguile/gc-malloc.c libguile/gc-mark.c libguile/gc-segment.c libguile/gc.c libguile/gc.h libguile/gc_os_dep.c libguile/hashtab.c libguile/hashtab.h libguile/inline.h libguile/private-gc.h libguile/struct.c libguile/struct.h libguile/threads.c libguile/threads.h libguile/vectors.h libguile/weaks.h test-suite/tests/gc.test
| * Add `SCM_INTERNAL' macro, use it.Ludovic Courtès2008-05-311-5/+6
| |
* | Implemented rehashing of weak hash tables.Ludovic Courtes2008-09-101-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libguile/hashtab.c (weak_hashtables): Removed. (SCM_WEAK_CELL_DELETED_P): New macro. (START_WEAK_BUCKET_FIXUP): Added the HASHFN argument. Invoke `scm_i_rehash ()' when pairs have been removed. (END_WEAK_BUCKET_FIXUP): Added the HASHFN argument. (make_hash_table): Use `SCM_NEWSMOB2 ()' instead of `SCM_NEWSMOB3 ()' -- last argument used to be WEAK_HASHTABLES. (scm_i_rehash): Handle weak hash tables. (to_rehash): Removed. (scm_internal_hash_fold): Use `SCM_WEAK_CELL_DELETED_P ()' rather than hand-written equivalent code. (rehash_after_gc): Removed. (scm_hashtab_prehistory): Don't add it as an after-gc hook. * libguile/hashtab.h (SCM_HASHTABLE_NEXT): Removed. (SCM_HASHTABLE_NEXTLOC): Removed. (SCM_SET_HASHTABLE_NEXT): Removed. git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-38
* | procs/weaks/hashtab: Removed a bit of useless mark/free code.Ludovic Courtes2008-09-051-1/+0
|/ | | | | | | | | | | | | | | | | * libguile/hashtab.c (UNMARKED_CELL_P): Removed. (scm_i_scan_weak_hashtables): Removed. * libguile/hashtab.h (scm_i_scan_weak_hashtables): Removed. * libguile/procs.c (scm_mark_subr_table): Removed. * libguile/procs.h (scm_mark_subr_table): Removed. * libguile/weaks.c (UNMARKED_CELL_P): Removed. (scm_i_remove_weaks): Removed. (scm_i_remove_weaks_from_weak_vectors): Removed. git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-18
* merge from 1.8 branchKevin Ryde2006-04-171-1/+1
|
* * gc-mark.c (scm_mark_all): Do not rely on hooks to run the weakMarius Vollmer2005-07-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hashtable and guardian machinery but call the relevant functions directly. * guardians.h, guardians.c, deprecated.h, deprecated.c (scm_destroy_guardian_x, scm_guardian_greedy_p, scm_guardian_destroyed_p, scm_guard, scm_get_one_zombie): Deprecated and moved into deprecated.[ch]. * guardians.h, guardians.c: Mostly rewritten. (scm_i_init_guardians_for_gc, scm_i_identify_inaccessible_guardeds, scm_i_mark_inaccessible_guardeds): New. * weaks.h, weaks.c (SCM_I_WVECT_TYPE, SCM_I_SET_WVECT_TYPE): New. (SCM_I_WVECT_N_ITEMS, SCM_I_SET_WVECT_N_ITEMS): New. (SCM_WVECTF_NOSCAN, SCM_WVECT_NOSCAN_P): Removed. (scm_weaks_prehistory): Removed. (scm_i_init_weak_vectors_for_gc, scm_i_mark_weak_vector, scm_i_mark_weak_vectors_non_weaks, scm_i_remove_weaks_from_weak_vectors, scm_i_remove_weaks): New. (scm_weak_vector_gc_init, scm_mark_weak_vector_spines, scm_scan_weak_vectors): Removed. * hashtab.h (scm_i_scan_weak_hashtables): New. * hashtab.c (make_hash_table, scm_i_rehash): Do not use SCM_WVECTF_NOSCAN. (hashtable_print): Use SCM_HASHTABLE_N_ITEMS instead of t->n_items. (scan_weak_hashtables, scm_i_scan_weak_hashtables): Renamed former to latter. Do not scan the alists themselves, this is done by the weak vector code now. Just update the element count. * vectors.h (SCM_I_WVECT_TYPE, SCM_I_WVECT_EXTRA): Renamed former to latter. The type is now only part of the cell word. (SCM_I_SET_WVECT_TYPE, SCM_I_SET_WVECT_EXTRA): Likewise. * init.c (scm_i_init_guile): Do not call scm_weaks_prehistory.
* * hashtab.h: Bugfix: use SCM_API (WAS: extern).Marius Vollmer2005-06-051-1/+1
| | | | | | | | | | | | | | | | * socket.c: Remove obsolete comment about socklen_t. (s_scm_setsockopt)[!HAVE_IP_MREQ]: Do not use ip_mreq code. * numbers.h (isnan)[__MINGW32__]: Remove. * Makefile.am (gen_scmconfig_SOURCES): Bugfix: Add DEFAULT_INCLUDES when cross compiling. * threads.c (ETIMEDOUT, pipe)[__MINGW32__]: Add defines. * stime.c (s_scm_strftime)[!HAVE_TM_ZONE]: Use SCM_SIMPLE_VECTOR_REF instead of SCM_VELTS. (Changed slightly from Jan's patch.)
* The FSF has a new address.Marius Vollmer2005-05-231-1/+1
|
* (scm_t_hashtable): Removed 'closure' field. TheMarius Vollmer2005-04-041-2/+1
| | | | | | | | | | | closure can not be stored since it is no longer valid at GC time. (make_hash_table): Initialize 'hash_fn' field. (scm_i_rehash): Only store hash_fn in hash table when closre is NULL. (rehash_after_gc): Only call scm_i_rehash when 'hash_fn' is non-NULL. Always use a NULL closure. (scm_hash_fn_create_handle_x): Also rehash when table contains too few entries.
* (scm_hash_fx_remove_x): Removed delete_fnMarius Vollmer2005-03-291-2/+2
| | | | | | | | | argument; always use scm_delq_x. The delete_fn function works on the handle, not the key, and it therefore makes no sense to make it configurable. Changed all callers. (scm_hashx_remove_x): Likewise. Also, exported to Scheme. (scm_hash_clear): Accept plain vectors as hashtables. (scm_delx_x): Removed.
* Reverted changed from 2005/01/24 19:14:54, which was a commit to theMarius Vollmer2005-01-241-5/+0
| | | | wrong branch. Sorry.
* Threading changes.Marius Vollmer2005-01-241-0/+5
|
* (SCM_HASHTAB_BUCKET_LOC): Removed.Marius Vollmer2005-01-071-2/+0
| | | | | (scan_weak_hashtables): Rewrote its use with SCM_HASHTAB_BUCKET and SCM_SET_HASHTAB_BUCKET.
* (SCM_HASHTABLE_BUCKETS): Removed.Marius Vollmer2005-01-021-3/+6
| | | | | (SCM_HASHTABLE_BUCKET, SCM_HASHTABLE_BUCKET_LOC): New. Replaced all uses of SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
* Use SCM_SMOB_* instead of SCM_CELL_* as appropriate. UseMarius Vollmer2004-05-061-7/+7
| | | | | SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS instead of accessing the zeroth word directly. Use SCM_SMOB_PREDICATE as appropriate.
* * unif.c (scm_make_uve): Removed local variable and simplifiedMikael Djurfeldt2004-02-131-2/+4
| | | | | | | | | | | | | | code in order to avoid compiler used uninitialized warnings. * hashtab.c, hashtab.h (scm_hash_map_to_list): Renamed from scm_hash_map. (scm_hash_fold): Use scm_call_3 directly in the call to scm_internal_hash_fold instead of going via fold_proc (which is now removed). (scm_hash_for_each): Use a trampoline + scm_internal_hash_for_each_handle. (scm_internal_hash_for_each_handle, scm_hash_for_each_handle): New functions.
* (scm_tc16_hashtable): Added "extern" declaration.Marius Vollmer2003-09-121-0/+2
|
* Changed license terms to the plain LGPL thru-out.Marius Vollmer2003-04-051-35/+11
|
* * hooks.c (scm_c_hook_add): Fixed bug in append mode.Mikael Djurfeldt2003-02-191-1/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * environments.c (obarray_enter, obarray_retrieve, obarray_remove, leaf_environment_fold, obarray_remove_all): Use hashtable accessors. * gc.c (scm_init_storage): Moved hook initialization to scm_storage_prehistory. (scm_storage_prehistory): New function. (scm_igc): Added commentary about placement of scm_after_sweep_c_hook. * gc-mark.c (scm_mark_all): Use hashtable accessors. (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and SCM_WVECT_WEAK_VALUE_P. * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New functions. (scm_vector_to_hash_table, scm_c_make_resizing_hash_table): Removed. (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table): Moved here from weaks.c. * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added calls to scm_storage_prehistory and scm_hashtab_prehistory. * modules.c (module-reverse-lookup): Use hashtable accessors. * symbols.c, symbols.h (scm_i_hash_symbol): New function. * weaks.c, weaks.h (scm_make_weak_key_alist_vector, scm_make_weak_value_alist_vector, scm_make_doubly_weak_alist_vector): New functions. * weaks.c (scm_init_weaks_builtins): New function. * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE, SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P, SCM_WVECT_NOSCAN_P): New macros. * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P and SCM_WVECT_WEAK_VALUE_P. * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from allocate_weak_vector and exported. * Makefile.am (ice9_sources): Added weak-vector.scm. * weak-vector.scm: New file. * boot-9.scm (module-clear!): Use hash-clear!. (module-for-each): Use hash-for-each. (module-map): Use hash-map.
* * hashtab.c (scm_vector_to_hash_table,Mikael Djurfeldt2003-02-111-1/+4
| | | | | | | | | | | | | | scm_c_make_resizing_hash_table, scm_make_hash_table): New functions. (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread safe and handle resizing tables. * weaks.c (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table): Size argument made optional. Return resizable table if not specified. * boot-9.scm (make-hash-table): Turned primitive.
* Prefixed each each exported symbol with SCM_API.Marius Vollmer2001-11-021-29/+29
|
* * Renamed header macros to the SCM_<filename>_H format.Dirk Herrmann2001-08-311-7/+10
|
* * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c,Martin Grabmüller2001-07-191-1/+1
| | | | | | | | | | | | | | chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c, feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c, gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c, gh_predicates.c, gsubr.c, gsubr.h, guardians.h, guile-func-name-check.in, guile-snarf-docs-texi.in, guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in, hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h, objprop.c, objprop.h, options.c, options.h, random.h, regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c, strerror.c, strop.h, strports.h, threads.h, values.c, values.h, version.c, version.h: Updated copyright notice.
* replace "scm_*_t" with "scm_t_*".Marius Vollmer2001-06-141-3/+3
|
* revert the ill-considered part of the 2001-05-24 changesMichael Livshin2001-05-261-6/+6
|
* * validate.hMichael Livshin2001-05-241-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]): new macros. * unif.h: type renaming: scm_array -> scm_array_t scm_array_dim -> scm_array_dim_t the old names are deprecated, all in-Guile uses changed. * tags.h (scm_ubits_t): new typedef, representing unsigned scm_bits_t. * stacks.h: type renaming: scm_info_frame -> scm_info_frame_t scm_stack -> scm_stack_t the old names are deprecated, all in-Guile uses changed. * srcprop.h: type renaming: scm_srcprops -> scm_srcprops_t scm_srcprops_chunk -> scm_srcprops_chunk_t the old names are deprecated, all in-Guile uses changed. * gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c, rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c, strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c, vectors.c, vports.c, weaks.c: various int/size_t -> size_t/scm_bits_t changes. * random.h: type renaming: scm_rstate -> scm_rstate_t scm_rng -> scm_rng_t scm_i_rstate -> scm_i_rstate_t the old names are deprecated, all in-Guile uses changed. * procs.h: type renaming: scm_subr_entry -> scm_subr_entry_t the old name is deprecated, all in-Guile uses changed. * options.h (scm_option_t.val): unsigned long -> scm_bits_t. type renaming: scm_option -> scm_option_t the old name is deprecated, all in-Guile uses changed. * objects.c: various long -> scm_bits_t changes. (scm_i_make_class_object): flags: unsigned long -> scm_ubits_t * numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to SCM_I_FIXNUM_BIT. * num2integral.i.c: new file, multiply included by numbers.c, used to "templatize" the various integral <-> num conversion routines. * numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl): deprecated. (scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig, scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big, scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big, scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big, scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num, scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff, scm_num2size): new functions. * modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.x * load.c: change int -> size_t in various places (where the variable is used to store a string length). (search-path): call scm_done_free, not scm_done_malloc. * list.c (scm_ilength): return a scm_bits_t, not long. some other {int,long} -> scm_bits_t changes. * hashtab.c: various [u]int -> scm_bits_t changes. scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef). (scm_ihashx): n: uint -> scm_bits_t use scm_bits2num instead of scm_ulong2num. * gsubr.c: various int -> scm_bits_t changes. * gh_data.c (gh_scm2double): no loss of precision any more. * gh.h (gh_str2scm): len: int -> size_t (gh_{get,set}_substr): start: int -> scm_bits_t, len: int -> size_t (gh_<num>2scm): n: int -> scm_bits_t (gh_*vector_length): return scm_[u]size_t, not unsigned long. (gh_length): return scm_bits_t, not unsigned long. * fports.h: type renaming: scm_fport -> scm_fport_t the old name is deprecated, all in-Guile uses changed. * fports.c (fport_fill_input): count: int -> scm_bits_t (fport_flush): init_size, remaining, count: int -> scm_bits_t * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed those prototypes, as the functions they prototype don't exist. * fports.c (default_buffer_size): int -> size_t (scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t default_size: int -> size_t (scm_setvbuf): csize: int -> scm_bits_t * fluids.c (n_fluids): int -> scm_bits_t (grow_fluids): old_length, i: int -> scm_bits_t (next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int -> scm_bits_t (scm_c_with_fluids): flen, vlen: int -> scm_bits_t * filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to the new and shiny SCM_NUM2INT. * extensions.c: extension -> extension_t (and made a typedef). * eval.h (SCM_IFRAME): cast to scm_bits_t, not int. just so there are no nasty surprises if/when the various deeply magic tag bits move somewhere else. * eval.c: changed the locals used to store results of SCM_IFRAME, scm_ilength and such to be of type scm_bits_t (and not int/long). (iqq): depth, edepth: int -> scm_bits_t (scm_eval_stack): int -> scm_bits_t (SCM_CEVAL): various vars are not scm_bits_t instead of int. (check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t i: int -> scm_bits_t * environments.c: changed the many calls to scm_ulong2num to scm_ubits2num. (import_environment_fold): proc_as_ul: ulong -> scm_ubits_t * dynwind.c (scm_dowinds): delta: long -> scm_bits_t * debug.h: type renaming: scm_debug_info -> scm_debug_info_t scm_debug_frame -> scm_debug_frame_t the old names are deprecated, all in-Guile uses changed. (scm_debug_eframe_size): int -> scm_bits_t * debug.c (scm_init_debug): use scm_c_define instead of the deprecated scm_define. * continuations.h: type renaming: scm_contregs -> scm_contregs_t the old name is deprecated, all in-Guile uses changed. (scm_contregs_t.num_stack_items): size_t -> scm_bits_t (scm_contregs_t.num_stack_items): ulong -> scm_ubits_t * continuations.c (scm_make_continuation): change the type of stack_size form long to scm_bits_t. * ports.h: type renaming: scm_port_rw_active -> scm_port_rw_active_t (and made a typedef) scm_port -> scm_port_t scm_ptob_descriptor -> scm_ptob_descriptor_t the old names are deprecated, all in-Guile uses changed. (scm_port_t.entry): int -> scm_bits_t. (scm_port_t.line_number): int -> long. (scm_port_t.putback_buf_size): int -> size_t. * __scm.h (long_long, ulong_long): deprecated (they pollute the global namespace and have little value besides that). (SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an SCM handle). (ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they exist (for size_t & ptrdiff_t) (scm_sizet): deprecated. * Makefile.am (noinst_HEADERS): add num2integral.i.c
* New functions: scm_c_make_vector, scm_c_make_hash_table.Keisuke Nishida2001-02-021-0/+2
|
* Updated copyrightsMikael Djurfeldt2000-06-121-1/+1
|
* * *.[hc]: add Emacs magic at the end of file, to ensure GNUMichael Livshin2000-03-191-0/+6
| | | | indentation style.
* * list.c: Moved append docs to append! Thanks Dirk Hermann. Also,Greg J. Badros2000-03-021-31/+31
| | | | | | | | | | | | | | added append docs from R4RS. * strings.c: Docstring typo fix, + eliminate unneeded IMP tests. Thanks Dirk Hermann! * chars.h: Provide SCM_CHARP, SCM_CHAR, SCM_MAKE_CHAR and deprecate SCM_ICHRP, SCM_ICHR, SCM_MAKICHR. Thanks Dirk Hermann! * *.h, *.c: Use SCM_CHARP, SCM_CHAR, SCM_MAKE_CHAR throughout. Drop use of SCM_P for function prototypes... assume an ANSI C compiler. Thanks Dirk Hermann!
* * __scm.h, backtrace.c, backtrace.h, debug.c, debug.h, dynl-dld.c,Mikael Djurfeldt1999-09-121-1/+1
| | | | | | | dynwind.c, dynwind.h, eval.h, evalext.c, evalext.h, feature.c, feature.h, hashtab.c, hashtab.h, objects.c, objects.h, print.c, procs.c, procs.h, smob.c, smob.h, srcprop.c, strorder.c, struct.c, struct.h: Updated copyrigth notices.
* * hashtab.c, hashtab.h (scm_hash_fold, scm_internal_hash_fold):Mikael Djurfeldt1999-03-211-2/+2
| | | | Place the table argument last.