Reimplement the CF stub system using ObjC. The primary effect of this is to break the link-time dependency on the CF symbols, but it also improves performance a bit.

One additional tweak (setting the scalar-aligned bit on foreign indices) had to be made to avoid a performance regression for long non-ASCII foreign strings.
This commit is contained in:
David Smith
2019-07-30 16:21:23 -07:00
parent d9fd3d3ec2
commit c5fc715746
6 changed files with 172 additions and 189 deletions

View File

@@ -801,7 +801,7 @@ extension _StringObject {
_internalInvariant(largeFastIsShared)
#if _runtime(_ObjC)
if largeIsCocoa {
return _cocoaUTF8Pointer(cocoaObject)._unsafelyUnwrappedUnchecked
return _cocoaASCIIPointer(cocoaObject)._unsafelyUnwrappedUnchecked
}
#endif