• Home
  • Raw
  • Download

Lines Matching refs:aBlock

180 static void _Block_do_nothing(const void *aBlock) { }  in _Block_do_nothing()  argument
286 struct Block_layout *aBlock; in _Block_copy_internal() local
294 aBlock = (struct Block_layout *)arg; in _Block_copy_internal()
295 if (aBlock->flags & BLOCK_NEEDS_FREE) { in _Block_copy_internal()
297 latching_incr_int(&aBlock->flags); in _Block_copy_internal()
298 return aBlock; in _Block_copy_internal()
300 else if (aBlock->flags & BLOCK_IS_GC) { in _Block_copy_internal()
302 if (wantsOne && ((latching_incr_int(&aBlock->flags) & BLOCK_REFCOUNT_MASK) == 1)) { in _Block_copy_internal()
304 _Block_setHasRefcount(aBlock, true); in _Block_copy_internal()
306 return aBlock; in _Block_copy_internal()
308 else if (aBlock->flags & BLOCK_IS_GLOBAL) { in _Block_copy_internal()
309 return aBlock; in _Block_copy_internal()
314 struct Block_layout *result = malloc(aBlock->descriptor->size); in _Block_copy_internal()
316 memmove(result, aBlock, aBlock->descriptor->size); // bitcopy first in _Block_copy_internal()
323 (*aBlock->descriptor->copy)(result, aBlock); // do fixup in _Block_copy_internal()
330 unsigned long int flags = aBlock->flags; in _Block_copy_internal()
332 struct Block_layout *result = _Block_allocator(aBlock->descriptor->size, wantsOne, hasCTOR); in _Block_copy_internal()
334 memmove(result, aBlock, aBlock->descriptor->size); // bitcopy first in _Block_copy_internal()
345 (*aBlock->descriptor->copy)(result, aBlock); // do fixup in _Block_copy_internal()
460 struct Block_layout *aBlock = (struct Block_layout *)arg; in _Block_release() local
462 if (!aBlock) return; in _Block_release()
463 newCount = latching_decr_int(&aBlock->flags) & BLOCK_REFCOUNT_MASK; in _Block_release()
466 if (aBlock->flags & BLOCK_IS_GC) { in _Block_release()
470 _Block_setHasRefcount(aBlock, false); in _Block_release()
472 else if (aBlock->flags & BLOCK_NEEDS_FREE) { in _Block_release()
473 if (aBlock->flags & BLOCK_HAS_COPY_DISPOSE)(*aBlock->descriptor->dispose)(aBlock); in _Block_release()
474 _Block_deallocator(aBlock); in _Block_release()
476 else if (aBlock->flags & BLOCK_IS_GLOBAL) { in _Block_release()
480 printf("Block_release called upon a stack Block: %p, ignored\n", (void *)aBlock); in _Block_release()
488 struct Block_layout *aBlock; in _Block_destroy() local
490 aBlock = (struct Block_layout *)arg; in _Block_destroy()
491 if (aBlock->flags & BLOCK_IS_GC) { in _Block_destroy()
495 _Block_release(aBlock); in _Block_destroy()
507 void *_Block_copy_collectable(const void *aBlock) { in _Block_copy_collectable() argument
508 return _Block_copy_internal(aBlock, 0); in _Block_copy_collectable()