eliminated a GC-> dereference in roots.c
svn: r12290
This commit is contained in:
parent
4f9e9a9c19
commit
0366385251
|
@ -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;
|
||||
|
||||
|
|
|
@ -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]; \
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user