Changeset 142 for trunk/orca/gc.c

Show
Ignore:
Timestamp:
05/09/06 22:54:53 (3 years ago)
Author:
krobillard
Message:

Fixed GC issues created by the changes to function argument handling [140].
Also fixed mold and form so they hold their argument from the GC.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/orca/gc.c

    r99 r142  
    169169#endif 
    170170 
    171     // Function argument blocks will have blk->used set but no blk->values. 
    172171    if( ! it ) 
    173172        return; 
     
    255254                    orSetBit( bsBlk.byteArray, idx ); 
    256255 
    257                 idx = it->func.context - orEnv->freeBlocks.sweepStart; 
    258                 if( idx >= 0 ) 
    259                     orSetBit( bsBlk.byteArray, idx ); 
     256                // Must check contents of argument block even if below 
     257                // sweepStart. 
     258                idx = it->func.context; 
     259                if( idx > 0 ) 
     260                { 
     261                    // During recursion this will waste some time 
     262                    // rechecking stack values. 
     263                    checkBlock( orBLOCKS + idx ); 
     264                } 
    260265                break; 
    261266