globroots.c: adapt to no-naked-pointers mode (#9683)

Global roots management has a special case for out-of-heap pointers.
This is not compatible with a future removal of the page table.
However, this is just an optimization that can safely be turned off.

This PR treats out-of-heap pointers like major-heap pointers in
no-naked-pointers mode.
master
Xavier Leroy 2020-06-15 13:39:35 +02:00 committed by GitHub
parent 24d087325c
commit 5a9c5dd5b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -91,8 +91,10 @@ static enum gc_root_class classify_gc_root(value v)
{
if(!Is_block(v)) return UNTRACKED;
if(Is_young(v)) return YOUNG;
if(Is_in_heap(v)) return OLD;
return UNTRACKED;
#ifndef NO_NAKED_POINTERS
if(!Is_in_heap(v)) return UNTRACKED;
#endif
return OLD;
}
/* Register a global C root of the generational kind */