summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libguile/ChangeLog2
-rw-r--r--libguile/gc-card.c1
-rw-r--r--libguile/gc-mark.c19
-rw-r--r--libguile/tags.h10
4 files changed, 22 insertions, 10 deletions
diff --git a/libguile/ChangeLog b/libguile/ChangeLog
index ccef7d069..62b6a1e4b 100644
--- a/libguile/ChangeLog
+++ b/libguile/ChangeLog
@@ -1,5 +1,7 @@
2002-08-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ * tags.h: remove GC bits documentation from the tags table.
+
* read.c (INPUT_ERROR): Prepare for file:line:column error
messages for errors in scm_lreadr() and friends.
diff --git a/libguile/gc-card.c b/libguile/gc-card.c
index 7daa6df4c..6f82488ba 100644
--- a/libguile/gc-card.c
+++ b/libguile/gc-card.c
@@ -91,6 +91,7 @@ scm_i_sweep_card (scm_t_cell * p, SCM *free_list, int span)
the bitvec in turn, but it wasn't any faster, but quite bit
hairier.
*/
+
for (p += offset; p < end; p += span, offset += span)
{
SCM scmptr = PTR2SCM(p);
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
diff --git a/libguile/tags.h b/libguile/tags.h
index 26d4e890e..3235b7705 100644
--- a/libguile/tags.h
+++ b/libguile/tags.h
@@ -229,12 +229,10 @@ typedef signed long scm_t_signed_bits;
*
* Here is a summary of tags in the CAR of a non-immediate:
*
- * HEAP CELL: G=gc_mark; 1 during mark, 0 other times.
- *
- * cons ..........SCM car..............0 ...........SCM cdr.............G
- * struct ..........void * type........001 ...........void * data.........G
- * closure ..........SCM code...........011 ...........SCM env.............G
- * tc7 ......24.bits of data...Gxxxx1S1 ..........void *data............
+ * cons ..........SCM car..............0 ...........SCM cdr.............0
+ * struct ..........void * type........001 ...........void * data.........0
+ * closure ..........SCM code...........011 ...........SCM env.............0
+ * tc7 ......24.bits of data...0xxxx1S1 ..........void *data............
*
*
*