Changeset 509 for trunk/thune/gc.c
- Timestamp:
- 02/09/08 02:35:22 (10 months ago)
- Files:
-
- 1 modified
-
trunk/thune/gc.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/thune/gc.c
r508 r509 231 231 232 232 233 static void _checkCells( UThread* ut, UCollector* gc, UCell* it, UCell* end ); 234 233 235 static void _checkBlock( UThread* ut, UCollector* gc, UBlock* blk ) 234 236 { 235 int idx;236 237 UCell* it = blk->ptr.cells; 237 UCell* end = it + blk->used;238 238 239 239 #ifdef GC_VERBOSE … … 241 241 #endif 242 242 243 if( ! it ) 244 return; 245 243 if( it ) 244 _checkCells( ut, gc, it, it + blk->used ); 245 } 246 247 248 static void _checkCells( UThread* ut, UCollector* gc, UCell* it, UCell* end ) 249 { 250 int idx; 246 251 while( it != end ) 247 252 { … … 396 401 case CC_ITER: 397 402 case CC_EACH: 403 { 404 UCell* cell = ((UCell*) it) - 1; 398 405 SET_BIT_BLOCK_L( it->cp.n ) 406 _checkCells( ut, gc, cell, cell + 1 ); 399 407 it -= CC_LEN_ITER; 408 } 400 409 break; 401 410 … … 422 431 static void _checkControlStack( UThread* ut, UCollector* gc ) 423 432 { 424 UBlock blk; 425 426 blk.ptr.cells = UR_BOC; 427 blk.used = UR_TOC - UR_BOC; 428 429 assert( blk.used > -1 ); 430 431 _checkBlock( ut, gc, &blk ); 433 assert( UR_TOC >= UR_BOC ); 434 435 _checkCells( ut, gc, UR_BOC, UR_TOC ); 432 436 } 433 437 #endif … … 436 440 static void _checkDataStack( UThread* ut, UCollector* gc ) 437 441 { 438 UBlock blk;439 440 blk.ptr.cells = UR_BOS + 1;441 blk.used = UR_TOS - UR_BOS;442 443 442 #ifndef LANG_RUNE 444 443 assert( ur_is(UR_BOS, UT_UNSET) ); 445 444 #endif 446 assert( blk.used > -1);447 448 _check Block( ut, gc, &blk);445 assert( UR_TOS >= UR_BOS ); 446 447 _checkCells( ut, gc, UR_BOS + 1, UR_TOS + 1 ); 449 448 } 450 449
