From: John McCall
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.
Precondition: value is null or a pointer to a