summaryrefslogtreecommitdiff
path: root/libguile/gc.c
diff options
context:
space:
mode:
authorMikael Djurfeldt <djurfeldt@nada.kth.se>1999-08-26 04:24:42 +0000
committerMikael Djurfeldt <djurfeldt@nada.kth.se>1999-08-26 04:24:42 +0000
commit9de33deb2ea07bf6c93651bbd693e7484dd29b33 (patch)
treece3f42882590ee80cfb30221518a120920104a31 /libguile/gc.c
parent52235e71737b47b648b5511396073f023d08a78e (diff)
downloadguile-9de33deb2ea07bf6c93651bbd693e7484dd29b33.tar.gz
* procs.c, procs.h (scm_subr_entry): New type: Stores data
associated with subrs. (SCM_SUBRNUM, SCM_SUBR_ENTRY, SCM_SUBR_GENERIC, SCM_SUBR_PROPS, SCM_SUBR_DOC): New macros. (scm_subr_table): New variable. (scm_mark_subr_table): New function. * init.c (scm_boot_guile_1): Call scm_init_subr_table. * gc.c (scm_gc_mark): Don't mark subr names here. (scm_igc): Call scm_mark_subr_table. * snarf.h (SCM_GPROC, SCM_GPROC1): New macros. * procs.c, procs.h (scm_subr_p): New function (used internally). * gsubr.c, gsubr.h (scm_make_gsubr_with_generic): New function. * objects.c, objects.h (scm_primitive_generic): New class. * objects.h (SCM_CMETHOD_CODE, SCM_CMETHOD_ENV): New macros. * print.c (scm_iprin1): Print primitive-generics. * __scm.h (SCM_WTA_DISPATCH_1, SCM_GASSERT1, SCM_WTA_DISPATCH_2, SCM_GASSERT2): New macros. * eval.c (SCM_CEVAL, SCM_APPLY): Replace scm_wta --> SCM_WTA_DISPATCH_1 for scm_cxr's (unary floating point primitives). NOTE: This means that it is now *required* to use SCM_GPROC1 when creating float scm_cxr's (float scm_cxr's is an obscured representation that will be removed in the future anyway, so backward compatibility is no problem here). * numbers.c: Converted most numeric primitives (all but bit comparison operations and bit operations) to dispatch on generic if args don't match. * eval.c, eval.h (scm_eval_body): New function. * objects.c (scm_call_generic_0, scm_call_generic_1, scm_call_generic_2, scm_call_generic_3, scm_apply_generic): New functions. * eval.c (SCM_CEVAL): Apply the cmethod directly after having called scm_memoize_method instead of doing a second lookup. * objects.h (scm_memoize_method): Now returns the memoized cmethod. * procs.c (scm_make_subr_opt): Use scm_sysintern0 instead of scm_sysintern so that the binding connected with the subr name isn't cleared when we give set = 0.
Diffstat (limited to 'libguile/gc.c')
-rw-r--r--libguile/gc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libguile/gc.c b/libguile/gc.c
index c8ac03193..0c4a0f931 100644
--- a/libguile/gc.c
+++ b/libguile/gc.c
@@ -563,6 +563,11 @@ scm_igc (what)
while (j--)
scm_gc_mark (scm_sys_protects[j]);
+ /* FIXME: we should have a means to register C functions to be run
+ * in different phases of GC
+ */
+ scm_mark_subr_table ();
+
#ifndef USE_THREADS
scm_gc_mark (scm_root->handle);
#endif
@@ -830,8 +835,7 @@ gc_mark_nimp:
SCM_SETGC8MARK (ptr);
break;
case scm_tcs_subrs:
- ptr = (SCM)(scm_heap_org + (((unsigned long)SCM_CAR (ptr)) >> 8));
- goto gc_mark_loop;
+ break;
case scm_tc7_port:
i = SCM_PTOBNUM (ptr);
if (!(i < scm_numptob))