@@ -219,18 +219,6 @@ SWIFT_RUNTIME_EXPORT
219219void (*SWIFT_CC (RegisterPreservingCC) _swift_nonatomic_retain_n)(HeapObject *object,
220220 uint32_t n);
221221
222- static inline void _swift_retain_inlined (HeapObject *object) {
223- if (object) {
224- object->refCount .increment ();
225- }
226- }
227-
228- static inline void _swift_nonatomic_retain_inlined (HeapObject *object) {
229- if (object) {
230- object->refCount .incrementNonAtomic ();
231- }
232- }
233-
234222// / Atomically increments the reference count of an object, unless it has
235223// / already been destroyed. Returns nil if the object is dead.
236224SWIFT_RT_ENTRY_VISIBILITY
@@ -512,22 +500,22 @@ struct UnownedReference {
512500 HeapObject *Value;
513501};
514502
515- // / Increment the weak/ unowned retain count.
503+ // / Increment the unowned retain count.
516504SWIFT_RT_ENTRY_VISIBILITY
517505void swift_unownedRetain (HeapObject *value)
518506 SWIFT_CC(RegisterPreservingCC);
519507
520- // / Decrement the weak/ unowned retain count.
508+ // / Decrement the unowned retain count.
521509SWIFT_RT_ENTRY_VISIBILITY
522510void swift_unownedRelease (HeapObject *value)
523511 SWIFT_CC(RegisterPreservingCC);
524512
525- // / Increment the weak/ unowned retain count by n.
513+ // / Increment the unowned retain count by n.
526514SWIFT_RT_ENTRY_VISIBILITY
527515void swift_unownedRetain_n (HeapObject *value, int n)
528516 SWIFT_CC(RegisterPreservingCC);
529517
530- // / Decrement the weak/ unowned retain count by n.
518+ // / Decrement the unowned retain count by n.
531519SWIFT_RT_ENTRY_VISIBILITY
532520void swift_unownedRelease_n (HeapObject *value, int n)
533521 SWIFT_CC(RegisterPreservingCC);
@@ -540,7 +528,7 @@ void swift_unownedRetainStrong(HeapObject *value)
540528
541529// / Increment the strong retain count of an object which may have been
542530// / deallocated, aborting if it has been deallocated, and decrement its
543- // / weak/ unowned reference count.
531+ // / unowned reference count.
544532SWIFT_RT_ENTRY_VISIBILITY
545533void swift_unownedRetainStrongAndRelease (HeapObject *value)
546534 SWIFT_CC(RegisterPreservingCC);
@@ -614,16 +602,8 @@ static inline void swift_unownedTakeAssign(UnownedReference *dest,
614602/* ***************************** WEAK REFERENCES ******************************/
615603/* ****************************************************************************/
616604
617- // / A weak reference value object. This is ABI.
618- struct WeakReference {
619- uintptr_t Value;
620- };
621-
622- // / Return true if this is a native weak reference
623- // /
624- // / \param ref - never null
625- // / \return true if ref is a native weak reference
626- bool isNativeSwiftWeakReference (WeakReference *ref);
605+ // Defined in Runtime/WeakReference.h
606+ class WeakReference ;
627607
628608// / Initialize a weak reference.
629609// /
0 commit comments