示例#1
0
文件: jugc.c 项目: iitalics/Jupiter
void juGC_store (juc* root, juc value)
{
	*root = value;
	if (gc_began)
		if (ju_is_gc(value))
			make_grey((ju_obj*) value);
}
示例#2
0
文件: jugc.c 项目: iitalics/Jupiter
static void make_black (ju_obj* obj)
{
	if (obj->gc_info.color == GREY)
	{
		obj->gc_info.color = BLACK;
		move_to_set(obj, &gc_sets[BLACK]);

		ju_int i, nmems;
		for (i = 0, nmems = obj->nmems; i < nmems; i++)
			if (ju_is_gc(obj->mems[i]))
				make_grey((ju_obj*) obj->mems[i]);
	}
}
示例#3
0
文件: jugc.c 项目: iitalics/Jupiter
void juGC_begin ()
{
	gc_began = true;

	// each object is colored white at this point
	size_t i;
	juc cell;

	// mark each object in the root set
	for (i = 0; i < gc_roots.size; i++)
	{
		cell = *gc_roots.list[i];

		if (ju_is_gc(cell))
			make_grey((ju_obj*) cell);
	}
}
示例#4
0
文件: gc.hpp 项目: mildred/caribou
		void shade(GCMarker* marker)
		{
			if(marker->colour == kGCColourWhite)
				make_grey(marker);
		}