mirror of
https://github.com/apple/swift.git
synced 2025-12-25 12:15:36 +01:00
Reduces the number of _ContiguousArrayStorage metadata. In order to support constant time bridging we do need to set the correct metadata when we bridge to Objective-C. This is so that the type check succeeds when bridging back from Objective-C to reuse the storage instance rather than bridging the elements. To support dynamically setting the `_ContiguousArrayStorage` element type i needed to add support for optimizing `alloc_ref_dynamic` throughout the optimizer. Possible future improvements: * Use different metadata such that we can disambiguate native Swift classes during destruction -- allowing native release rather then unknown release usage. * Optimize the newly added semantic function getContiguousArrayStorageType rdar://86171143
5.6 KiB
5.6 KiB