Commit the platform definition and build script work necessary to
cross-compile for arm64_32.
arm64_32 is a variant of AARCH64 that supports an ILP32 architecture.
Old Swift and new Swift runtimes and overlays need to coexist in the same process. This means there must not be any classes which have the same ObjC runtime name in old and new, because the ObjC runtime doesn't like name collisions.
When possible without breaking source compatibility, classes were renamed in Swift, which results in a different ObjC name.
Public classes were renamed only on the ObjC side using the @_objcRuntimeName attribute.
This is similar to the work done in pull request #19295. That only renamed @objc classes. This renames all of the others, since even pure Swift classes still get an ObjC name.
rdar://problem/46646438
The first change is to remove some @inline(__always) attributes. Those were added before we had the guaranteed-by-default calling convention. They are not necessary anymore.
The second change is to not specialize some slow-path functions. This results that no specialization code for these functions is generated at the client side. Instead those functions are directly called in the libSwiftCore.
Note that Key-related hash and equality comparisons are still specialized, because otherwise the performance hit for Osize would be too big.
Some Dictionary benchmarks regress a bit with -Osize, but the code size wins are big.
rdar://problem/46534453
_modify mustn’t leave Collection storage in an inconsistent state when the code to which we’re yielding happens to throw. In practice this means that any cleanup code must happen in defer blocks before the yield.
Fix Dictionary to do just that and add tests to cover this functionality (as well as some other aspects of _modify).
- Make internal (but @inlinable)
- Limit API to what is actually supported: a single boolean value.
- Rename members:
init(native:,bits:) ⟹ init(native:,isFlagged:)
func isNativeWithClearedSpareBits() ⟹ isUnflaggedNative
var nativeInstance_noSpareBits ⟹ unflaggedNativeInstance
func isUniquelyReferenced_native_noSpareBits() ⟹ isUniquelyReferencedUnflaggedNative()
Affected operations:
subscript(index:)
keys.subscript(index:)
values.subscript(index:) (setter and _modify)
remove(at:)
swapAt(_:, _:)
Note that index(after:) is intentionally not on this list.
Add __consuming and __owned to Set and Dictionary members where applicable.
Ignore compiler intrinsics for casting for now — their ARC behavior is covered by unit tests that need to be updated.