Use -[NSSet copyWithZone:] instead.
CFSetCreateCopy() is buggy in OSes that ship today: it copies the set
unconditionally, even if it is immutable, resulting in O(n) bridging.
Swift SVN r27733
Use -[NSDictionary copyWithZone:] instead.
CFDictionaryCreateCopy() is buggy in OSes that ship today: it copies the
dictionary unconditionally, even if it is immutable, resulting in O(n)
bridging.
Swift SVN r27732
If you want to make the parameter and argument label the same in
places where you don't get the argument label for free (i.e., the
first parameter of a function or a parameter of a subscript),
double-up the identifier:
func translate(dx dx: Int, dy: Int) { }
Make this a warning with Fix-Its to ease migration. Part of
rdar://problem/17218256.
Swift SVN r27715
Handle substitutions properly when a typealias declared in a protocol
extension is used to satisfy an associated type requirement. Fixes
rdar://problem/20564605.
Swift SVN r27490
Fixes the crash in rdar://problem/20564378. In these cases, we end up
swallowing some diagnostics. That will be addressed in a subsequent
commit.
Swift SVN r27436
Enable checking for uses of potentially unavailable APIs. There is
a frontend option to disable it: -disable-availability-checking.
This commit updates the SDK overlays with @availability() annotations for the
declarations where the overlay refers to potentially unavailable APIs. It also changes
several tests that refer to potentially unavailable APIs to use either #available()
or @availability annotations.
Swift SVN r27272
The only caveat is that:
1. We do not properly recognize when we have a let binding and we
perform a guaranteed dynamic call. In such a case, we add an extra
retain, release pair around the call. In order to get that case I will
need to refactor some code in Callee. I want to make this change, but
not at the expense of getting the rest of this work in.
2. Some of the protocol witness thunks generated have unnecessary
retains or releases in a similar manner.
But this is a good first step.
I am going to send a large follow up email with all of the relevant results, so
I can let the bots chew on this a little bit.
rdar://19933044
Swift SVN r27241
Consistently open all references into existentials into
opened-existential archetypes within the constraint solver. Then,
during constraint application, use OpenExistentialExprs to record in
the AST where an existential is opened into an archetype, then use
that archetype throughout the subexpression. This simplifies the
overall representation, since we don't end up with a mix of operations
on existentials and operations on archetypes; it's all archetypes,
which tend to have better support down the line in SILGen already.
Start simplifying the code in SILGen by taking away the existential
paths that are no longer needed. I suspect there are more
simplifications to be had here.
The rules for placing OpenExistentialExprs are still a bit ad hoc;
this will get cleaned up later so that we can centralize that
information. Indeed, the one regression in the compiler-crasher suite
is because we're not closing out an open existential along an error
path.
Swift SVN r27230
Retire the old components now that the new ones have passed API review.
<rdar://20406937> covers the migration fallout of this change.
Swift SVN r27092
Retire the old components now that the new ones have passed API review.
<rdar://20406937> covers the migration fallout of this change.
Swift SVN r27081
Per discussion on the list. From now on, when you fix a compiler_crashers
test case, move it to compiler_crashers_fixed so that we get no-asserts and
ASan coverage.
Swift SVN r27055
Simplify the observation evaluation in the ErrorType race test by using evaluateObservationsAllEqual, and run the test for real. Apparently round-trip NSString and NSDictionary bridging doesn't produce a stable object, so use valueForKey as a hack to sidestep bridging so we can verify that the identities of the bridged domain and code aren't racy.
Swift SVN r27003
Atomically initialize and load the NSError bridging fields within an ErrorType box so that we do the right thing when two threads concurrently coerce the box to NSError.
Swift SVN r26996