From fb414bc66db6f4dba995f27fc628e1d52cdb90eb Mon Sep 17 00:00:00 2001 From: John McCall Date: Sun, 19 Jun 2011 09:59:33 +0000 Subject: Improve the intro to the runtime-functions section. llvm-svn: 133386 --- clang/docs/AutomaticReferenceCounting.html | 31 ++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) (limited to 'clang/docs') diff --git a/clang/docs/AutomaticReferenceCounting.html b/clang/docs/AutomaticReferenceCounting.html index 6b0e1bb9ba8..cbc509f44a7 100644 --- a/clang/docs/AutomaticReferenceCounting.html +++ b/clang/docs/AutomaticReferenceCounting.html @@ -1502,12 +1502,35 @@ an object, except that __weak objects must always be appropriately aligned for an object of type id.

The runtime tracks __weak objects which holds non-null -values. It is undefined behavior to modify a __weak object -which is being tracked by the runtime except through an -objc_storeWeak or -objc_destroyWeak +values. It is undefined behavior to direct modify a __weak +object which is being tracked by the runtime except through an +objc_storeWeak, +objc_destroyWeak, +or objc_moveWeak call.

+

The runtime must provide a number of new entrypoints which the +compiler may emit, which are described in the remainder of this +section.

+ +

Rationale: Several of these functions are +semantically equivalent to a message send; we emit calls to C +functions instead because:

+ + +

Several other of these functions are fused operations which +can be described entirely in terms of other operations. We use the +fused operations primarily as a code-size optimization, although in +some cases there is also a real potential for avoiding redundant +operations in the runtime.

+ +
+

id objc_autorelease(id value);

Precondition: value is null or a pointer to a -- cgit v1.2.3