The _forceBridgeFromObjectiveC and _conditionallyBridgeFromObjectiveC
requirements of the _ObjectiveCBridgeable protocol previously returned
Self and Self?, respectively, where 'Self' is the value type that is
bridged. This use of returns is fairly hostile to the idea of calling
the witnesses for these requirements from the C++ part of the runtime,
leading to "interesting" tricks with OpaqueExistentialContainer that
made it hard to use these witnesses within the dynamic casting
infrastructure.
Replace the returns with inout Self? parameters, which are far easier
to deal with in the C++ part of the runtime. Despite the churn because
we're changing the _ObjectiveCBridgeable protocol, this is NFC.
Swift SVN r20934
The SPI that XCTest exposes to the overlay has Objective-C semantics,
while anything exposed to Swift code via @asmname needs Swift semantics.
Add a bridge to the overlay that handles this adaptation.
Addresses <rdar://problem/17408423>.
Swift SVN r20932
Rather than use a header file and -import-objc-header, use @asmname and
@objc_block to tell the overlay about the Objective-C function used to
capture exceptions.
Further addresses <rdar://problem/16453199>.
Swift SVN r20929
As I was reducing a test case for a typechecker bug, I ended up
commenting out important test code in the regression suite. This
restores it (and makes it work).
Swift SVN r20925
Since Swift itself has no exception support, use an Objective-C helper function
to evaluate a block and return an NSDictionary indicating whether an exception
was thrown out of that block (and if so, which exception).
Addresses <rdar://problem/16453199>.
Swift SVN r20880
On -Ounchecked we are now able to zap this expression (from Richards):
UnicodeScalar(UInt32(2)+"0".value)
However, on -O we still check for overflow and actually need to construct the string.
Swift SVN r20856
This accelerates Richards by 4X because we don't need to construct debug strings such as:
debug("TCB \(tcb!.id) state \(tcb!.state.bits)")
Swift SVN r20853
leak. The release was valid only for some code paths.
Added some comments explaining ownership and parameter passing conventions.
Fixes rdar://17855302, restores half of the leak in rdar://17840810 (only for
objects that inherit from NSObject).
Swift SVN r20820
initializeBufferWithTakeOfBuffer value witness.
Attempt to use initializeBufferWithTakeOfBuffer in
some appropriate places.
There are some changes enabled by this which are
coming in a follow-up patch.
Swift SVN r20802
Now that CGFloat is a peer of Float and Double, we need to add appropriate handling
to it for XCTAssertEqualWithAccuracy.
Addresses <rdar://problem/17762421>.
Swift SVN r20800
The allocator's crimes include:
* It uses OS SPI that must not be used by non-OS apps.
* It does not play well with memory debugging tools like Instruments.
* It does not return memory to the OS in response to memory pressure.
* It is less tested than we would like because many configurations
inadvertently turn it off (such as running from Xcode).
* Its per-thread magazine implementation does not actually work.
* Its "try alloc" flag is incompletely implemented and never used.
* Its "zero fill" flag is unimplemented and inconsistently used.
Swift SVN r20757