summaryrefslogtreecommitdiff
path: root/libguile/guardians.h
Commit message (Expand)AuthorAgeFilesLines
* Change Guile license to LGPLv3+...(Not quite finished, the following will be done tomorrow. module/srfi/*.scm module/rnrs/*.scm module/scripts/*.scm testsuite/*.scm guile-readline/* ) Neil Jerram2009-06-171-6/+7
* Add `SCM_INTERNAL' macro, use it.Ludovic Courtès2008-05-311-5/+5
* merge from 1.8 branchKevin Ryde2006-04-171-1/+1
* * gc-mark.c (scm_mark_all): Do not rely on hooks to run the weak...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. Marius Vollmer2005-07-311-8/+4
* The FSF has a new address.Marius Vollmer2005-05-231-1/+1
* Changed license terms to the plain LGPL thru-out.Marius Vollmer2003-04-051-35/+11
* Prefixed each each exported symbol with SCM_API.Marius Vollmer2001-11-021-7/+7
* * Renamed header macros to the SCM_<filename>_H format.Dirk Herrmann2001-08-311-7/+9
* * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c,... 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. Martin Grabmüller2001-07-191-1/+1
* * guardians.c (F_GREEDY, F_LISTED, F_DESTROYED, GREEDY_P,... SET_GREEDY, LISTED_P, SET_LISTED, CLR_LISTED, DESTROYED_P, SET_DESTROYED): new defines/macros. (GUARDIAN_LIVE, GUARDIAN_ZOMBIES, GUARDIAN_NEXT): deleted. (add_to_live_list): takes a `guardian_t *' now, not SCM. (guardian_print): print more info. (guardian_apply): check if the guardian is destroyed, and throw an error if so. take one more optional argument `throw_p'. (scm_guard): depending on the value of `throw_p', return a boolean result. (scm_get_one_zombie): remove redundant property test. (guardian_t): represent the various (currently 3, I hope nothing more gets added) boolean fields as bit flags. (scm_guardian_destroyed_p, scm_guardian_greedy_p): new predicates. (scm_destroy_guardian_x): new procedure. * guardians.h: added prototypes for `scm_guardian_greedy_p' and `scm_guardian_destroyed_p'. changed prototype for `scm_guard'. Michael Livshin2001-01-041-1/+5
* *** empty log message ***Michael Livshin2000-12-241-1/+1
* * gc.c: (scm_gc_mark_dependencies): new function. like...`scm_gc_mark', but doesn't mark the argument itself. defined using an arrangement similar to that in eval.c: `scm_gc_mark' and `scm_gc_mark_dependencies' are derived from the same "template" by ugly preprocessor magic. * gc.h: added prototype for `scm_gc_mark_dependencies'. * init.c (scm_init_guile_1): call the renamed `scm_init_guardians'. * guardians.h: changed prototypes for `scm_make_guardian' and `scm_init_guardians'. * guardians.c (guardian_t): added new fields `greedy_p' and `listed_p'. (GUARDIAN_P): predicate that says whether its argument is a guardian. (GUARDIAN_GREEDY_P, GUARDIAN_LISTED_P): new predicates. (greedy_guardians, sharing_guardians): new variables. hold the greedy and sharing live guardian lists, respectively. (first_live_guardian, current_link_field): removed. (greedily_guarded_prop): new variable. holds the "is greedily guarded" object property. (self_centered_zombies): new variable. stores guarded objects that are parts of cycles. (add_to_live_list): new function, introduced to decouple marking a guardian and adding it to the live list. (guardian_mark): call `add_to_live_list'. (guardian_print): print whether the guardian is greedy or not. also change "live" and "zombie" to "reachable" and "unreachable" respectively, to be less confusing. (scm_guard): if the guardian is greedy, test whether the object is already greedily marked. throw an error if so. (scm_get_one_zombie): if the guardian is greedy, remove the "greedily guarded" property from the object. (scm_make_guardian): add a new optional boolean argument which says whether the guardian is greedy or sharing. (guardian_gc_init): init the new live lists. (mark_dependencies): new function. (mark_and_zombify): new function. (guardian_zombify): reworked to support the new guardian semantics. move some logic to `mark_dependencies' and `mark_and_zombify'. (whine_about_self_centered_zombies): new function. installed in the `after-gc-hook' to complain about guarded objects which are parts of cycles. (scm_init_guardians): init the new stuff. renamed from `scm_init_guardian'. Michael Livshin2000-12-231-2/+2
* * guardians.h (scm_guardian_gc_init, scm_guardian_zombify): Are...now static. Mikael Djurfeldt2000-04-211-5/+1
* * *.[hc]: add Emacs magic at the end of file, to ensure GNU... indentation style. Michael Livshin2000-03-191-0/+6
* * guardians.c, guardians.h (scm_make_guardian,...scm_guardian_gc_init, scm_guardian_zombify, scm_guard, scm_get_one_zombie, scm_init_guardian): This is an implementation of guardians as described in R. Kent Dybvig, Carl Bruggeman, and David Eby (1993) "Guardians in a Generation-Based Garbage Collector" ACM SIGPLAN Conference on Programming Language Design and Implementation, June 1993 ftp://ftp.cs.indiana.edu /pub/scheme-repository/doc/pubs/guardians.ps.gz Author: Michael N. Livshin. Mikael Djurfeldt1998-12-231-0/+61