The dumper method dumps:
1. The container's metadata pointer.
2. A pointer to the container's value.
3. Whether or not said value is stored inline in the container.
This provides a general overview that can be used even when working with SIL
code in the debugger by grabbing a pointer to swift Anys and then calling the
c++ any method upon them.
The verifier is intended to be used in conjunction with ASAN for maximum
effect to catch use-after-frees of existential boxes.
While implementing this I refactored some code from ExistentialTypeMetadata into
methods on OpaqueExistentialContainer. ExistentialTypeMetadata just calls these
methods now instead of implementing the code inline.
Use the generic type lowering algorithm described in
"docs/CallingConvention.rst#physical-lowering" to map from IRGen's explosion
type to the type expected by the ABI.
Change IRGen to use the swift calling convention (swiftcc) for native swift
functions.
Use the 'swiftself' attribute on self parameters and for closures contexts.
Use the 'swifterror' parameter for swift error parameters.
Change functions in the runtime that are called as native swift functions to use
the swift calling convention.
rdar://19978563
...and explicitly mark symbols we export, either for use by executables or for runtime-stdlib interaction. Until the stdlib supports resilience we have to allow programs to link to these SPI symbols.
armv7k can return 16-byte structs in registers, but the Swift side of
the reflection implementation assumes these structs return in memory.
Adding an intermediating struct for return values with an empty user
destructor guarantees that they come back in memory.
rdar://21215339
Swift SVN r29274
the value buffer comes first.
The motivation for doing this is similar to the
motivation for moving it for class existentials:
it eliminates the need for an offset for the most
common accesses, which is particularly important
for the generic value witnesses.
Also try to hard-code that layout in fewer places,
or at least static_assert the places that have to
do so.
Swift SVN r16279
A useful unsafe optimization for potential implementations of Mirror that have existing heap storage to share from the value, like for Array or Dictionary.
Swift SVN r14186
Define a "Mirror" protocol with methods for querying the number of children a structured value has, getting the name and mirror for each of those children, and a string and "IDE representation" of the value, as needed by playgrounds and by our planned generic printing facility.
In the runtime, define a "reflect" function that can provide a Mirror for any object, either using a "Reflectable" protocol conformance if available, or falling back to a magic implementation in the runtime that grovels the type metadata. Stub out a bare minimum default implementation.
Swift SVN r14139