includes a number of QoI things to help people write the correct code. I will commit
the testcase for it as the next patch.
The bulk of this patch is moving the stdlib, testsuite and validation testsuite to
the new syntax. I moved a few uses of "as" patterns back to as? expressions in the
stdlib as well.
Swift SVN r27959
The rule changes are as follows:
* All functions (introduced with the 'func' keyword) have argument
labels for arguments beyond the first, by default. Methods are no
longer special in this regard.
* The presence of a default argument no longer implies an argument
label.
The actual changes to the parser and printer are fairly simple; the
rest of the noise is updating the standard library, overlays, tests,
etc.
With the standard library, this change is intended to be API neutral:
I've added/removed #'s and _'s as appropriate to keep the user
interface the same. If we want to separately consider using argument
labels for more free functions now that the defaults in the language
have shifted, we can tackle that separately.
Fixes rdar://problem/17218256.
Swift SVN r27704
Change all uses of "do { ... } while <cond>" to use "repeat" instead.
Rename DoWhileStmt to RepeatWhileStmt. Add diagnostic suggesting change
of 'do' to 'repeat' if a condition is found afterwards.
<rdar://problem/20336424> rename do/while loops to repeat/while & introduce "repeat <count> {}" loops
Swift SVN r27650
Update tests to match, and rewrite SwiftPrivatePthreadExtras to take advantage of native C function pointer support instead of hacking it up through a stub C++ library.
Swift SVN r27604
Update tests to match, and rewrite SwiftPrivatePthreadExtras to take advantage of native C function pointer support instead of hacking it up through a stub C++ library.
Swift SVN r27598
and cleanup.
I changes cases that had a non-trivial "then" body but a trivial else. Most of the cases in
the stdlib have a trivial "then" clause, so I didn't change them.
Swift SVN r27567
Now we initialize the array buffer from sequences using unsafe pointer
arithmetic, which avoids extra retain/release traffic. But since the
size of the sequence is not known in advance, we only initialize as much
as underestimateCount() promises, and fall back to the slow approach for
the tail. Nevertheless, for collections, where the size is known
precisely, this technique is suboptimal only by one branch.
rdar://20530390
Swift SVN r27380
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