summaryrefslogtreecommitdiff
path: root/libguile/gc-mark.c
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@lilypond.org>2002-08-05 17:46:34 +0000
committerHan-Wen Nienhuys <hanwen@lilypond.org>2002-08-05 17:46:34 +0000
commit33138b05678b86e382c4b71c4181ea48793a8b0c (patch)
tree3fc37eba94a769700a7a2c7dd78be7d6f568970e /libguile/gc-mark.c
parent39e8f371e20c99381b9270307539121c76358294 (diff)
downloadguile-33138b05678b86e382c4b71c4181ea48793a8b0c.tar.gz
remove GC bits documentation from the tags table.
Diffstat (limited to 'libguile/gc-mark.c')
-rw-r--r--libguile/gc-mark.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/libguile/gc-mark.c b/libguile/gc-mark.c
index 49cb77e29..466874ad2 100644
--- a/libguile/gc-mark.c
+++ b/libguile/gc-mark.c
@@ -192,7 +192,7 @@ scm_gc_mark (SCM ptr)
Mark the dependencies of an object.
-TODO:
+Prefetching:
Should prefetch objects before marking, i.e. if marking a cell, we
should prefetch the car, and then mark the cdr. This will improve CPU
@@ -204,7 +204,13 @@ garbage collector cache misses.
Prefetch is supported on GCC >= 3.1
- */
+(Some time later.)
+
+Tried this with GCC 3.1.1 -- the time differences are barely measurable.
+Perhaps this would work better with an explicit markstack?
+
+
+*/
void
scm_gc_mark_dependencies (SCM p)
#define FUNC_NAME "scm_gc_mark_dependencies"
@@ -225,6 +231,8 @@ scm_gc_mark_dependencies (SCM p)
ptr = SCM_CAR (ptr);
goto gc_mark_nimp;
}
+
+
scm_gc_mark (SCM_CAR (ptr));
ptr = SCM_CDR (ptr);
goto gc_mark_nimp;
@@ -232,6 +240,7 @@ scm_gc_mark_dependencies (SCM p)
ptr = SCM_CDR (ptr);
goto gc_mark_loop;
case scm_tc7_pws:
+
scm_gc_mark (SCM_SETTER (ptr));
ptr = SCM_PROCEDURE (ptr);
goto gc_mark_loop;
@@ -285,8 +294,10 @@ scm_gc_mark_dependencies (SCM p)
if (i == 0)
break;
while (--i > 0)
- if (SCM_NIMP (SCM_VELTS (ptr)[i]))
- scm_gc_mark (SCM_VELTS (ptr)[i]);
+ {
+ if (SCM_NIMP (SCM_VELTS (ptr)[i]))
+ scm_gc_mark (SCM_VELTS (ptr)[i]);
+ }
ptr = SCM_VELTS (ptr)[0];
goto gc_mark_loop;
#ifdef CCLO