83 |
#include <unistd.h> |
#include <unistd.h> |
84 |
#endif |
#endif |
85 |
|
|
|
|
|
|
|
|
|
|
|
86 |
#ifdef __ia64__ |
#ifdef __ia64__ |
87 |
# define SCM_MARK_BACKING_STORE() do { \ |
# define SCM_MARK_BACKING_STORE() do { \ |
88 |
ucontext_t ctx; \ |
ucontext_t ctx; \ |
98 |
# define SCM_MARK_BACKING_STORE() |
# define SCM_MARK_BACKING_STORE() |
99 |
#endif |
#endif |
100 |
|
|
101 |
|
|
102 |
/* |
/* |
103 |
Entry point for this file. |
Entry point for this file. |
104 |
*/ |
*/ |
106 |
scm_mark_all (void) |
scm_mark_all (void) |
107 |
{ |
{ |
108 |
long j; |
long j; |
109 |
|
|
110 |
|
|
111 |
scm_i_clear_mark_space (); |
scm_i_clear_mark_space (); |
112 |
|
|
113 |
#ifndef USE_THREADS |
#ifndef USE_THREADS |
114 |
|
|
115 |
/* Mark objects on the C stack. */ |
/* Mark objects on the C stack. */ |
155 |
} |
} |
156 |
} |
} |
157 |
} |
} |
158 |
|
|
159 |
|
|
160 |
/* FIXME: we should have a means to register C functions to be run |
/* FIXME: we should have a means to register C functions to be run |
161 |
* in different phases of GC |
* in different phases of GC |
162 |
*/ |
*/ |
163 |
scm_mark_subr_table (); |
scm_mark_subr_table (); |
164 |
|
|
165 |
|
|
166 |
#ifndef USE_THREADS |
#ifndef USE_THREADS |
167 |
scm_gc_mark (scm_root->handle); |
scm_gc_mark (scm_root->handle); |
168 |
#endif |
#endif |
171 |
/* {Mark/Sweep} |
/* {Mark/Sweep} |
172 |
*/ |
*/ |
173 |
|
|
|
|
|
174 |
/* |
/* |
175 |
Mark an object precisely, then recurse. |
Mark an object precisely, then recurse. |
176 |
*/ |
*/ |
181 |
return ; |
return ; |
182 |
|
|
183 |
if (SCM_GC_MARK_P (ptr)) |
if (SCM_GC_MARK_P (ptr)) |
184 |
return; |
{ |
185 |
|
return; |
186 |
|
} |
187 |
|
|
188 |
SCM_SET_GC_MARK (ptr); |
SCM_SET_GC_MARK (ptr); |
189 |
scm_gc_mark_dependencies (ptr); |
scm_gc_mark_dependencies (ptr); |
476 |
} |
} |
477 |
|
|
478 |
if (SCM_GC_MARK_P (ptr)) |
if (SCM_GC_MARK_P (ptr)) |
479 |
|
{ |
480 |
return; |
return; |
481 |
|
} |
482 |
|
|
483 |
SCM_SET_GC_MARK (ptr); |
SCM_SET_GC_MARK (ptr); |
484 |
|
|
485 |
goto scm_mark_dependencies_again; |
goto scm_mark_dependencies_again; |
486 |
|
|
487 |
} |
} |
489 |
|
|
490 |
|
|
491 |
|
|
492 |
|
|
493 |
/* Mark a region conservatively */ |
/* Mark a region conservatively */ |
494 |
void |
void |
495 |
scm_mark_locations (SCM_STACKITEM x[], unsigned long n) |
scm_mark_locations (SCM_STACKITEM x[], unsigned long n) |
575 |
#endif |
#endif |
576 |
} |
} |
577 |
|
|
|
|
|