Since protocol descriptors look like ObjC Protocol objects, we want to mangle the type prefix into their names to make them obviously Swift mangled names, but we were only doing this for @objc protocols, not native protocols. For consistency, do the same thing with native descriptors, and update the runtime type display code to match. Fixes rdar://problem/19691574.
Swift SVN r25014
These mirrors are the default mirrors that get used for all objective-C
object, including some that aren't defined in Foundation:
import Dispatch
println(dispatch_get_global_queue(0,0))
This example isn't fixed yet, because we need to pull all the string
bridging goop out of Foundation and into the core standard library.
Swift SVN r25012
We've had a rash of bugs due to inconsistencies between how IRGen and the runtime think types are laid out. Add a '-verify-type-layout' mode to the frontend that causes IRGen to emit a bunch of code that compares its static assumptions against what the runtime value witness does.
Swift SVN r24918
ObjC unowned references are backed by an ObjC weak reference which will eagerly deallocate the object when it's strongly released, so in an unknown-refcount situation, we can't safely dereference the object pointer to determine its Swiftness. We can, however, look at the side table of weak references; if there's an entry for this object, then it's reliably an ObjC object (or it's some other object that got allocated in the reclaimed space for the dead object, but that's a race we fundamentally can't win with this broken design). Fixes rdar://problem/18091547 (modulo the aforementioned reallocation race).
Swift SVN r24825
This allows reflection clients a more detailed perspective on what precision values they are inspecting, and is largely meant to support improvements to the way Xcode represents floating point numbers in the playgrounds UI (rdar://19124310)
Swift SVN r24372
use a thin function type.
We still need thin-function-to-RawPointer conversions
for generic code, but that's fixable with some sort of
partial_apply_thin_recoverable instruction.
Swift SVN r24364
Teach IRGen and the runtime about the extra inhabitants
of function pointers, and take advantage of that in
thin and thick function types.
Also add runtime entrypoints for thin function type
metadata.
Swift SVN r24346
The libc memcpy implementation is not optimized for the case of constant count
values (because of the function's interface) and is not inlineable. Using the local
implementation allows us to eliminate the trampoline in the call and optimize for
small constants.
This gives a 4% boost on Prims.
Swift SVN r24131
dispatch_once calls on every load from it
Performance improvements, as reported by the perf testing buildbot:
Histogram -18.81%
TwoSum -17.42%
RGBHistogram -9.65%
Regressions:
InsertionSort 5.59%
ArrayOfRef 3.99%
SwiftStructuresInsertionSort 5.29%
PrimeNum 6.09%
These regressions are bogus. The tests that "regressed" don't do any
hashing at all.
Swift SVN r23995
We were using std::function that allocated memory. Unfortunately c++ lambdas
don't have a type so I had to make the function findOrAdd templated on the
type of the callback. This is not a big deal since the class is already
templated and there is a single call site.
Swift SVN r23919
Fixes a crash when some programs were run in JIT mode; they instantiated a JITed class before the ObjC subclass was realized. Send a message to super to realize the class before we try to readClassPair it. Fixes rdar://problem/19170232.
Swift SVN r23825
Using the intrinsics is obnoxious because I needed them
to return Builtin.NativeObject?, but there's no reasonable
way to safely generate optional types from Builtins.cpp.
Ugh.
Dave and I also decided that there's no need for
swift_tryPin to allow a null object.
Swift SVN r23824