Lines Matching full:copy

5  * to any person obtaining a copy of this software and associated documentation
7 * including without limitation the rights to use, copy, modify, merge, publish,
281 #pragma mark Copy/Release support
284 /* Copy, or bump refcount, of a block. If really copying, call the copy helper if present. */
312 // Its a stack block. Make a copy. in _Block_copy_internal()
322 … //printf("calling block copy helper %p(%p, %p)...\n", aBlock->descriptor->copy, result, aBlock); in _Block_copy_internal()
323 (*aBlock->descriptor->copy)(result, aBlock); // do fixup in _Block_copy_internal()
329 // This allows the copy helper routines to make non-refcounted block copies under GC in _Block_copy_internal()
336 // if we copy a malloc block to a GC block then we need to clear NEEDS_FREE. in _Block_copy_internal()
344 //printf("calling block copy helper...\n"); in _Block_copy_internal()
345 (*aBlock->descriptor->copy)(result, aBlock); // do fixup in _Block_copy_internal()
364 * Otherwise we need to copy it and update the stack forwarding pointer
378 //printf("making copy\n"); in _Block_byref_assign_copy()
382 struct Block_byref *copy = (struct Block_byref *)_Block_allocator(src->size, false, isWeak); in _Block_byref_assign_copy() local
383copy->flags = src->flags | _Byref_flag_initial_value; // non-GC one for caller, one for stack in _Block_byref_assign_copy()
384 copy->forwarding = copy; // patch heap copy to point to itself (skip write-barrier) in _Block_byref_assign_copy()
385 src->forwarding = copy; // patch stack to point to heap copy in _Block_byref_assign_copy()
386 copy->size = src->size; in _Block_byref_assign_copy()
388 copy->isa = &_NSConcreteWeakBlockVariable; // mark isa field so it gets weak scanning in _Block_byref_assign_copy()
391 // Trust copy helper to copy everything of interest in _Block_byref_assign_copy()
393 copy->byref_keep = src->byref_keep; in _Block_byref_assign_copy()
394 copy->byref_destroy = src->byref_destroy; in _Block_byref_assign_copy()
395 (*src->byref_keep)(copy, src); in _Block_byref_assign_copy()
400 (void *)&copy->byref_keep, in _Block_byref_assign_copy()
534 …ck_copy and Block_release, called the copy and dispose helpers. The copy helper emits a call to t…
542 So the Block copy/dispose helpers should only ever generate the four flag values of 3, 7, 8, and 24.
544copy/dispose helper functions. Similarly to the Block copy helper, the "__block" copy helper (for…
546 So the __block copy/dispose helpers will generate flag values of 3 or 7 for objects and Blocks resp…
557 * When Blocks or Block_byrefs hold objects then their copy routine helpers use this entry point
567 // do *not* retain or *copy* __block variables whatever they are in _Block_object_assign()
679 cp += sprintf(cp, "descriptor->copy helper: %p\n", (void *)(uintptr_t)dp->copy); in _Block_dump()
695 cp += sprintf(cp, " copy helper: %p\n", (void *)(uintptr_t)src->byref_keep); in _Block_byref_dump()