simplified GC
This commit is contained in:
parent
9edf849d2a
commit
8f91b7adc3
@ -221,6 +221,17 @@ static stix_uint8_t* scan_new_heap (stix_t* stix, stix_uint8_t* ptr)
|
||||
stix_oop_oop_t xtmp;
|
||||
stix_oow_t size;
|
||||
|
||||
#if defined(STIX_USE_PROCSTK)
|
||||
if (stix->_process && STIX_OBJ_GET_CLASS(oop) == stix->_process)
|
||||
{
|
||||
/* the stack in a process object doesn't need to be
|
||||
* scanned in full. the slots above the stack pointer
|
||||
* are garbages. */
|
||||
size = STIX_PROCESS_NAMED_INSTVARS +
|
||||
STIX_OOP_TO_SMOOI(((stix_oop_process_t)oop)->sp) + 1;
|
||||
STIX_ASSERT (size <= STIX_OBJ_GET_SIZE(oop));
|
||||
}
|
||||
#else
|
||||
if ((stix->_method_context && STIX_OBJ_GET_CLASS(oop) == stix->_method_context) ||
|
||||
(stix->_block_context && STIX_OBJ_GET_CLASS(oop) == stix->_block_context))
|
||||
{
|
||||
@ -231,15 +242,7 @@ static stix_uint8_t* scan_new_heap (stix_t* stix, stix_uint8_t* ptr)
|
||||
STIX_OOP_TO_SMOOI(((stix_oop_context_t)oop)->sp) + 1;
|
||||
STIX_ASSERT (size <= STIX_OBJ_GET_SIZE(oop));
|
||||
}
|
||||
else if (stix->_process && STIX_OBJ_GET_CLASS(oop) == stix->_process)
|
||||
{
|
||||
/* the stack in a process object doesn't need to be
|
||||
* scanned in full. the slots above the stack pointer
|
||||
* are garbages. */
|
||||
size = STIX_PROCESS_NAMED_INSTVARS +
|
||||
STIX_OOP_TO_SMOOI(((stix_oop_process_t)oop)->sp) + 1;
|
||||
STIX_ASSERT (size <= STIX_OBJ_GET_SIZE(oop));
|
||||
}
|
||||
#endif
|
||||
else
|
||||
{
|
||||
size = STIX_OBJ_GET_SIZE(oop);
|
||||
|
@ -54,7 +54,7 @@
|
||||
|
||||
/* this is for gc debugging */
|
||||
/*#define STIX_DEBUG_PROCESSOR*/
|
||||
/*#define STIX_DEBUG_GC_001*/
|
||||
#define STIX_DEBUG_GC_001
|
||||
/*#define STIX_DEBUG_GC_002*/
|
||||
#define STIX_DEBUG_COMP_001
|
||||
/*#define STIX_DEBUG_COMP_002*/
|
||||
|
Loading…
Reference in New Issue
Block a user