Changeset 276 for trunk/thune/gc.c

Show
Ignore:
Timestamp:
09/18/06 03:43:03 (2 years ago)
Author:
krobillard
Message:

Thune - Custom datatypes can now be created. Added raster! to GL.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/thune/gc.c

    r268 r276  
    206206    while( it != end ) 
    207207    { 
    208         switch( it->id.type ) 
     208        switch( ur_type(it) ) 
    209209        { 
    210210            case UT_WORD: 
     
    321321                break; 
    322322#endif 
     323            default: 
     324                idx = ur_type(it) - UT_BI_COUNT; 
     325                if( idx >= 0 ) 
     326                    env->customDT[ idx ].gcMark( &_gc, it ); 
     327                break; 
    323328        } 
    324329        ++it; 
     
    537542    ur_pairPoolGCClear(); 
    538543#endif 
     544 
     545    if( env->dtCount > UT_BI_COUNT ) 
     546    { 
     547        // Tell custom types marking will begin. 
     548        ai = 0; 
     549        for( i = UT_BI_COUNT; i < env->dtCount; ++i ) 
     550        { 
     551            env->customDT[ ai ].recycle( env, UR_GC_PHASE_MARK ); 
     552            ++ai; 
     553        } 
     554    } 
    539555 
    540556 
     
    631647 
    632648 
     649    if( env->dtCount > UT_BI_COUNT ) 
     650    { 
     651        // Tell custom types sweep will begin. 
     652        ai = 0; 
     653        for( i = UT_BI_COUNT; i < env->dtCount; ++i ) 
     654        { 
     655            env->customDT[ ai ].recycle( env, UR_GC_PHASE_SWEEP ); 
     656            ++ai; 
     657        } 
     658    } 
     659 
    633660#ifdef PAIRPOOL_H 
    634661    ur_pairPoolGCSweep();