eliminated a GC-> dereference in roots.c

svn: r12290
This commit is contained in:
Kevin Tew 2008-11-05 21:08:36 +00:00
parent 4f9e9a9c19
commit 0366385251
3 changed files with 3 additions and 4 deletions

View File

@ -2976,7 +2976,7 @@ static void gcollect(int full)
getrusage(RUSAGE_SELF, &pre);
#endif
sort_and_merge_roots();
sort_and_merge_roots(&GC->roots);
during_gc = 1;

View File

@ -937,7 +937,7 @@ static inline void *get_stack_base() {
unsigned long j; \
Roots *roots = &GC->roots; \
if(roots->roots) { \
sort_and_merge_roots(); \
sort_and_merge_roots(roots); \
for(j = 0; j < roots->count; j += 2) { \
void **start = (void**)roots->roots[j]; \
void **end = (void**)roots->roots[j+1]; \

View File

@ -33,9 +33,8 @@ static int compare_roots(const void *a, const void *b)
return 1;
}
static void sort_and_merge_roots()
static void sort_and_merge_roots(Roots *roots)
{
Roots *roots = &GC->roots;
if (roots->nothing_new)
return;