192 |
|
|
193 |
Mark the dependencies of an object. |
Mark the dependencies of an object. |
194 |
|
|
195 |
TODO: |
Prefetching: |
196 |
|
|
197 |
Should prefetch objects before marking, i.e. if marking a cell, we |
Should prefetch objects before marking, i.e. if marking a cell, we |
198 |
should prefetch the car, and then mark the cdr. This will improve CPU |
should prefetch the car, and then mark the cdr. This will improve CPU |
204 |
|
|
205 |
Prefetch is supported on GCC >= 3.1 |
Prefetch is supported on GCC >= 3.1 |
206 |
|
|
207 |
*/ |
(Some time later.) |
208 |
|
|
209 |
|
Tried this with GCC 3.1.1 -- the time differences are barely measurable. |
210 |
|
Perhaps this would work better with an explicit markstack? |
211 |
|
|
212 |
|
|
213 |
|
*/ |
214 |
void |
void |
215 |
scm_gc_mark_dependencies (SCM p) |
scm_gc_mark_dependencies (SCM p) |
216 |
#define FUNC_NAME "scm_gc_mark_dependencies" |
#define FUNC_NAME "scm_gc_mark_dependencies" |
231 |
ptr = SCM_CAR (ptr); |
ptr = SCM_CAR (ptr); |
232 |
goto gc_mark_nimp; |
goto gc_mark_nimp; |
233 |
} |
} |
234 |
|
|
235 |
|
|
236 |
scm_gc_mark (SCM_CAR (ptr)); |
scm_gc_mark (SCM_CAR (ptr)); |
237 |
ptr = SCM_CDR (ptr); |
ptr = SCM_CDR (ptr); |
238 |
goto gc_mark_nimp; |
goto gc_mark_nimp; |
240 |
ptr = SCM_CDR (ptr); |
ptr = SCM_CDR (ptr); |
241 |
goto gc_mark_loop; |
goto gc_mark_loop; |
242 |
case scm_tc7_pws: |
case scm_tc7_pws: |
243 |
|
|
244 |
scm_gc_mark (SCM_SETTER (ptr)); |
scm_gc_mark (SCM_SETTER (ptr)); |
245 |
ptr = SCM_PROCEDURE (ptr); |
ptr = SCM_PROCEDURE (ptr); |
246 |
goto gc_mark_loop; |
goto gc_mark_loop; |
294 |
if (i == 0) |
if (i == 0) |
295 |
break; |
break; |
296 |
while (--i > 0) |
while (--i > 0) |
297 |
if (SCM_NIMP (SCM_VELTS (ptr)[i])) |
{ |
298 |
scm_gc_mark (SCM_VELTS (ptr)[i]); |
if (SCM_NIMP (SCM_VELTS (ptr)[i])) |
299 |
|
scm_gc_mark (SCM_VELTS (ptr)[i]); |
300 |
|
} |
301 |
ptr = SCM_VELTS (ptr)[0]; |
ptr = SCM_VELTS (ptr)[0]; |
302 |
goto gc_mark_loop; |
goto gc_mark_loop; |
303 |
#ifdef CCLO |
#ifdef CCLO |