• Home
  • Raw
  • Download

Lines Matching refs:flags

285 static void *_Block_copy_internal(const void *arg, const int flags) {  in _Block_copy_internal()  argument
287 const bool wantsOne = (WANTS_ONE & flags) == WANTS_ONE; 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()
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()
308 else if (aBlock->flags & BLOCK_IS_GLOBAL) { in _Block_copy_internal()
318 result->flags &= ~(BLOCK_REFCOUNT_MASK); // XXX not needed in _Block_copy_internal()
319 result->flags |= BLOCK_NEEDS_FREE | 1; in _Block_copy_internal()
321 if (result->flags & BLOCK_HAS_COPY_DISPOSE) { in _Block_copy_internal()
330 unsigned long int flags = aBlock->flags; in _Block_copy_internal() local
331 bool hasCTOR = (flags & BLOCK_HAS_CTOR) != 0; in _Block_copy_internal()
337 flags &= ~(BLOCK_NEEDS_FREE|BLOCK_REFCOUNT_MASK); // XXX not needed in _Block_copy_internal()
339 flags |= BLOCK_IS_GC | 1; in _Block_copy_internal()
341 flags |= BLOCK_IS_GC; in _Block_copy_internal()
342 result->flags = flags; in _Block_copy_internal()
343 if (flags & BLOCK_HAS_COPY_DISPOSE) { in _Block_copy_internal()
368 static void _Block_byref_assign_copy(void *dest, const void *arg, const int flags) { in _Block_byref_assign_copy() argument
374 if (src->forwarding->flags & BLOCK_IS_GC) { in _Block_byref_assign_copy()
377 else if ((src->forwarding->flags & BLOCK_REFCOUNT_MASK) == 0) { in _Block_byref_assign_copy()
380 …bool isWeak = ((flags & (BLOCK_FIELD_IS_BYREF|BLOCK_FIELD_IS_WEAK)) == (BLOCK_FIELD_IS_BYREF|BLOCK… in _Block_byref_assign_copy()
383 … copy->flags = src->flags | _Byref_flag_initial_value; // non-GC one for caller, one for stack in _Block_byref_assign_copy()
390 if (src->flags & BLOCK_HAS_COPY_DISPOSE) { in _Block_byref_assign_copy()
406 else if ((src->forwarding->flags & BLOCK_NEEDS_FREE) == BLOCK_NEEDS_FREE) { in _Block_byref_assign_copy()
407 latching_incr_int(&src->forwarding->flags); in _Block_byref_assign_copy()
424 if ((shared_struct->flags & BLOCK_NEEDS_FREE) == 0) { in _Block_byref_release()
427 refcount = shared_struct->flags & BLOCK_REFCOUNT_MASK; in _Block_byref_release()
431 else if ((latching_decr_int(&shared_struct->flags) & BLOCK_REFCOUNT_MASK) == 0) { in _Block_byref_release()
433 if (shared_struct->flags & BLOCK_HAS_COPY_DISPOSE) { in _Block_byref_release()
463 newCount = latching_decr_int(&aBlock->flags) & BLOCK_REFCOUNT_MASK; in _Block_release()
466 if (aBlock->flags & BLOCK_IS_GC) { 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()
476 else if (aBlock->flags & BLOCK_IS_GLOBAL) { in _Block_release()
491 if (aBlock->flags & BLOCK_IS_GC) { in _Block_destroy()
560 void _Block_object_assign(void *destAddr, const void *object, const int flags) { in _Block_object_assign() argument
562 if ((flags & BLOCK_BYREF_CALLER) == BLOCK_BYREF_CALLER) { in _Block_object_assign()
563 if ((flags & BLOCK_FIELD_IS_WEAK) == BLOCK_FIELD_IS_WEAK) { in _Block_object_assign()
571 else if ((flags & BLOCK_FIELD_IS_BYREF) == BLOCK_FIELD_IS_BYREF) { in _Block_object_assign()
574 _Block_byref_assign_copy(destAddr, object, flags); in _Block_object_assign()
577 else if ((flags & BLOCK_FIELD_IS_BLOCK) == BLOCK_FIELD_IS_BLOCK) { in _Block_object_assign()
579 _Block_assign(_Block_copy_internal(object, flags), destAddr); in _Block_object_assign()
582 else if ((flags & BLOCK_FIELD_IS_OBJECT) == BLOCK_FIELD_IS_OBJECT) { in _Block_object_assign()
593 void _Block_object_dispose(const void *object, const int flags) { in _Block_object_dispose() argument
595 if (flags & BLOCK_FIELD_IS_BYREF) { in _Block_object_dispose()
599 else if ((flags & (BLOCK_FIELD_IS_BLOCK|BLOCK_BYREF_CALLER)) == BLOCK_FIELD_IS_BLOCK) { in _Block_object_dispose()
604 …else if ((flags & (BLOCK_FIELD_IS_WEAK|BLOCK_FIELD_IS_BLOCK|BLOCK_BYREF_CALLER)) == BLOCK_FIELD_IS… in _Block_object_dispose()
628 if (! (closure->flags & BLOCK_HAS_DESCRIPTOR)) { in _Block_dump()
655 if (closure->flags & BLOCK_HAS_DESCRIPTOR) { in _Block_dump()
658 if (closure->flags & BLOCK_NEEDS_FREE) { in _Block_dump()
661 if (closure->flags & BLOCK_IS_GC) { in _Block_dump()
664 if (closure->flags & BLOCK_HAS_COPY_DISPOSE) { in _Block_dump()
667 if (closure->flags & BLOCK_HAS_CTOR) { in _Block_dump()
670 cp += sprintf(cp, "\nrefcount: %u\n", closure->flags & BLOCK_REFCOUNT_MASK); in _Block_dump()
678 if (closure->flags & BLOCK_HAS_COPY_DISPOSE) { in _Block_dump()
692 cp += sprintf(cp, " flags: 0x%x\n", src->flags); in _Block_byref_dump()
694 if (src->flags & BLOCK_HAS_COPY_DISPOSE) { in _Block_byref_dump()