49 lines
937 B
C
49 lines
937 B
C
|
|
#if 0
|
|
#include <stddef.h>
|
|
#include <debug.h>
|
|
|
|
#include <value/struct.h>
|
|
|
|
#include "struct.h"
|
|
|
|
#include "linked_list/append.h"
|
|
#include "linked_list/remove.h"
|
|
|
|
#include "flags.h"
|
|
#include "dotout.h"
|
|
#include "mark_as_mortal.h"
|
|
|
|
void gc_mark_as_mortal(
|
|
struct gc* this,
|
|
struct value* value)
|
|
{
|
|
ENTER;
|
|
|
|
if (this->flags->dotout)
|
|
{
|
|
gc_dotout(this, "gc_mark_as_mortal: start");
|
|
}
|
|
|
|
assert(value->immortal.in_set);
|
|
|
|
linked_list_remove(
|
|
/* linked list: */ &this->immortal,
|
|
/* element: */ value,
|
|
/* link offset: */ offsetof(struct value, immortal));
|
|
|
|
linked_list_append(
|
|
/* linked list: */ &this->mortal,
|
|
/* element: */ value,
|
|
/* link offset: */ offsetof(struct value, mortal));
|
|
|
|
assert(value->mortal.in_set);
|
|
|
|
if (this->flags->dotout)
|
|
{
|
|
gc_dotout(this, "gc_mark_as_mortal: end");
|
|
}
|
|
|
|
EXIT;
|
|
}
|
|
#endif
|