In this instance, we load the empty array storage into r15. We then retain r15 and then pass it to swift_isUniquelyReferenced_nonNull_native.
This pattern has a statically-known result: the call to isUniquelyReferenced can only return false. In this instance, we have issued a retain call on a strong reference and, without any intervening release, we have then asked if it is uniquely referenced. Of course, it cannot be: we just issued a +1 and the object was already held strongly (at +1).
In principle we could have safely elided the call to isUniquelyReferenced, the jump, and just hit the resize operation in straight-line code. This would be a bit of a code size win.
The text was updated successfully, but these errors were encountered: