Commit Graph

13 Commits

Author SHA1 Message Date
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Joe Groff
fed7f79147 Runtime: Static-ize swift_unsafeReflectAny.
The _unsafeReflect entry point never ended up getting used on the Swift side, so don't export it, and remove the _silgen_name'd declaration.
2015-12-02 09:39:29 -08:00
Dmitri Hrybenko
7ee84ed6b3 stdlib: rename Reflectable.{getMirror() -> _getMirror()}
Start removing the old mirrors.

rdar://21428474

Swift SVN r29823
2015-07-01 00:31:32 +00:00
Joe Groff
4a3f39761c Runtime: Suppress warnings about extern "C" symbols with C-incompatible types.
These are a necessary evil until we get __attribute__((swiftcall)) or something like it in Clang. (Or rewrite the runtime in Swift.)

Swift SVN r29713
2015-06-25 23:56:52 +00:00
Greg Parker
b9bf94307a [stdlib] Fix some reflection bugs on armv7k.
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
2015-06-03 06:25:37 +00:00
Ted Kremenek
fa1ba12f22 Revert "Revert "[stdlib] Finish Underscoring the legacy Reflectable protocol""
Swift SVN r29084
2015-05-27 21:49:37 +00:00
Ted Kremenek
1c27893a9f Revert "[stdlib] Finish Underscoring the legacy Reflectable protocol"
Revert this to fix the bots.

Swift SVN r29083
2015-05-27 21:48:28 +00:00
Dave Abrahams
a326cae7d6 [stdlib] Finish Underscoring the legacy Reflectable protocol
Somehow I didn't get an adequate local rebuild and broke the bots!
This fixes it.

Swift SVN r29080
2015-05-27 21:28:07 +00:00
Dave Abrahams
21669b3aee [stdlib] Add "Mutable" to [Autoreleasing]UnsafePointer
UnsafePointer becomes UnsafeMutablePointer
AutoreleasingUnsafePointer becomes AutoreleasingUnsafeMutablePointer

Swift SVN r20316
2014-07-22 16:56:23 +00:00
John McCall
8681963bcb A couple of long-overdue renames.
Builtin.ObjectPointer -> Builtin.NativeObject
Builtin.ObjCPointer -> Builtin.UnknownObject

Swift SVN r16634
2014-04-22 00:17:08 +00:00
John McCall
862d50ac1c Change the layout of opaque existentials so that
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
2014-04-13 07:43:08 +00:00
Joe Groff
3c15aff85b Expose unsafeReflect to the stdlib.
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
2014-02-21 00:09:32 +00:00
Joe Groff
73e564428f stdlib/runtime: Stub out a mechanism for introspecting value structure.
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
2014-02-20 08:26:27 +00:00