mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Adds the runtime implementation for copy-on-write existentials. This support is enabled if SWIFT_RUNTIME_ENABLE_COW_EXISTENTIALS is defined. Focus is on correctness -- not performance yet. Don't use allocate/deallocate/projectBuffer witnesses for globals in cow existential mode. Use SWIFT_RUNTIME_ENABLE_COW_EXISTENTIALS configuration to set the default for SILOptions. This includes an IRGen fix to use the right projection in emitMetatypeOfOpaqueExistential if SWIFT_RUNTIME_ENABLE_COW_EXISTENTIALS is set. Use unknownRetain instead of native retain in dynamicCastToExistential.
55 KiB
55 KiB