Commit Graph

2015 Commits

Author SHA1 Message Date
Dmitri Hrybenko
945259f704 SDK overlay: add a smoketest for the CoreMedia overlay
Swift SVN r28493
2015-05-12 22:53:12 +00:00
Dmitri Hrybenko
61214ec55b stdlib: remove Sliceable conformance from String
Swift SVN r28442
2015-05-11 20:58:31 +00:00
Dmitri Hrybenko
0d42ed3eb2 StdlibUnittest: provide explanatory output about failing crash tests
Swift SVN r28404
2015-05-10 23:17:44 +00:00
Dmitri Hrybenko
bdd9250f12 stdlib: add tests for ${ArrayType}.init(SequenceType)
Swift SVN r28362
2015-05-09 03:32:37 +00:00
Dmitri Hrybenko
f46f16ae82 stdlib: implement new print() API
rdar://20775683

Swift SVN r28309
2015-05-08 01:37:59 +00:00
Ted Kremenek
9f9bb725cf Rename '_ErrorType' to 'ErrorType'.
Swift SVN r28293
2015-05-07 21:59:29 +00:00
Dmitri Hrybenko
10ab07ade5 Revert "Remove {Dictionary,Set,UnsafeMutableBufferPointer,UnsafeBufferPointer}.count"
This reverts commit r28248 while we discuss the change.

Swift SVN r28291
2015-05-07 21:45:28 +00:00
Dmitri Hrybenko
8ac6c7cf8f Remove {Dictionary,Set,UnsafeMutableBufferPointer,UnsafeBufferPointer}.count
These APIs are redundant with APIs that come from protocol extensions.

Swift SVN r28248
2015-05-07 00:30:43 +00:00
Dmitri Hrybenko
c109ec9125 stdlib: protocol extensions: de-underscore count()
Swift SVN r28246
2015-05-07 00:30:38 +00:00
Dmitri Hrybenko
e253881b02 stdlib: protocol extensions: de-underscore indices
Swift SVN r28245
2015-05-07 00:30:35 +00:00
Dmitri Hrybenko
f76ca6243e stdlib: protocol extensions: de-underscore indexOf()
Swift SVN r28244
2015-05-07 00:30:33 +00:00
Dmitri Hrybenko
25e74d21db stdlib: protocol extensions: de-underscore last
Swift SVN r28243
2015-05-07 00:30:32 +00:00
Dmitri Hrybenko
e96ade89a9 stdlib: protocol extensions: de-underscore isEmpty
Swift SVN r28241
2015-05-07 00:30:29 +00:00
Dmitri Hrybenko
97db2def53 stdlib: protocol extensions: de-underscore flatMap()
Swift SVN r28239
2015-05-07 00:30:27 +00:00
Dmitri Hrybenko
a474641f66 stdlib: protocol extensions: de-underscore reverse()
Swift SVN r28238
2015-05-07 00:30:26 +00:00
Dmitri Hrybenko
035d72d5a7 stdlib: protocol extensions: de-underscore contains()
Swift SVN r28236
2015-05-07 00:30:24 +00:00
Dmitri Hrybenko
78d1196f33 stdlib: protocol extensions: de-underscore elementsEqual
Swift SVN r28234
2015-05-07 00:30:22 +00:00
Dmitri Hrybenko
7e9063a4af stdlib: protocol extensions: de-underscore enumerate()
Swift SVN r28231
2015-05-07 00:30:12 +00:00
Joe Pamer
3b57cabae7 Consider default argument patterns, as they relate to actual arguments, when deciding on a specific overload to favor for a function application. Doing so addresses another class of exponential behavior bugs in the type checker (rdar://problem/19779591 and rdar://problem/20772053). There's still some work left to do, though - hence the change to Concatenate.swift, to work around rdar://problem/20789500.
Swift SVN r28221
2015-05-06 22:32:07 +00:00
Dmitri Hrybenko
b08a57f752 stdlib tests: fix coding style
Swift SVN r28071
2015-05-02 03:33:10 +00:00
John McCall
0388c87613 Fix validation tests for error-handling import.
Swift SVN r28070
2015-05-02 02:46:34 +00:00
Dave Abrahams
4ce1891cae [stdlib] String is no longer a SequenceType
<rdar://20494686>

String itsef should only expose Unicode-correct algorithms, like proper
substring/prefix/suffix search, enumerating words/lines/paragraphs, case
folding etc. Promoting sequence-centric algorithms to methods on String
is not acceptable since it invites users to write wrong code. Thus,
String has to lose its SequenceType conformance.

Nevertheless, we recognize that sometimes it is useful to manipulate the
String contents on lower levels (UTF-8, UTF-16, Unicode scalars,
extended grapheme clusters), for example, when implementing high-level
Unicode operations, so we can't remove low-level operations
altogether. For this reason, String provides nested "views" for the
first three low-level representations, but grapheme clusters were in a
privileged position -- String itself is a collection of grapheme
clusters. We propose to add a characters view that will represent the
String as a collection of Character values.

Swift SVN r28065
2015-05-02 01:52:02 +00:00
Ted Kremenek
9f5437e2bc Make 'toInt()' unavailable instead of deprecated.
Swift SVN r28029
2015-05-01 06:25:52 +00:00
Arnold Schwaighofer
e514ef80fd validation-test: Fix test case to use changed let syntax
Swift SVN r27966
2015-04-30 14:39:08 +00:00
Chris Lattner
31c01eab73 Change the meaning of "if let x = foo()" back to Xcode 6.4 semantics. The compiler
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
2015-04-30 04:38:13 +00:00
Dmitri Hrybenko
ea344fc49a tests: use println() instead of print() with a "\n"
Swift SVN r27920
2015-04-29 21:29:59 +00:00
Dmitri Hrybenko
b5d0896828 Un-XFAIL a SceneKit testcase, the blocking issue is fixed
The whole file is still disabled though, because the fix hasn't been
integrated yet.

Swift SVN r27910
2015-04-29 16:55:34 +00:00
Dmitri Hrybenko
dbf1daeb0a Finish the SceneKit overlay for -[SCNSceneSource entryWithIdentifier:withClass:]
rdar://20384835

Swift SVN r27899
2015-04-29 02:22:31 +00:00
Dmitri Hrybenko
4d197dc5b2 Revert "stdlib: change sort() and sorted() into methods"
This reverts commits r27885, r27876.  It looks like they broke iOS on
arm64.

Swift SVN r27893
2015-04-28 23:58:50 +00:00
Dmitri Hrybenko
b05c372c4f stdlib: change sort() and sorted() into methods
Swift SVN r27876
2015-04-28 18:05:37 +00:00
Dmitri Hrybenko
fd14e70e48 stdlib: rename find() to indexOf() per API review
Swift SVN r27849
2015-04-28 00:30:37 +00:00
Chris Lattner
20c74c4d32 update validation tests for improved diagnostics.
Swift SVN r27794
2015-04-27 01:00:40 +00:00
Dmitri Hrybenko
f6090c1c89 stdlib: make CollectionType._prext_isEmpty dynamically dispatched
This change makes isEmpty faster for Dictionary and Set, when invoked
from generic algorithms.

Swift SVN r27736
2015-04-26 00:08:14 +00:00
Dmitri Hrybenko
bc50b2f58d stdlib: stop using CFSetCreateCopy() in set bridging
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
2015-04-26 00:08:13 +00:00
Dmitri Hrybenko
ba6920e69d stdlib: stop using CFDictionaryCreateCopy() in dictionary bridging
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
2015-04-26 00:08:12 +00:00
Dmitri Hrybenko
ce95ac26cd stdlib: adjust _NSDictionaryCoreType to match Foundation nullability audit
Swift SVN r27729
2015-04-26 00:08:10 +00:00
Doug Gregor
0523a09560 Update validation testsuite for the argument label default changes.
Swift SVN r27706
2015-04-24 20:31:43 +00:00
Dmitri Hrybenko
8bf1deedb0 The ErrorType race test requires ObjC runtime
Swift SVN r27577
2015-04-22 08:50:20 +00:00
Dmitri Hrybenko
02d254047b stdlib: add a hook for dynamic dispatch in CollectionType.find()
This hook allows Set.find() to be equally efficient in static and
generic contexts.

This time, with correct tests.

Swift SVN r27404
2015-04-17 05:03:28 +00:00
Dmitri Hrybenko
e94b0f9b40 Revert "stdlib: add a hook for dynamic dispatch in CollectionType.find()"
This reverts commit r27402.  It broke tests.

Swift SVN r27403
2015-04-17 04:59:29 +00:00
Dmitri Hrybenko
fe53f87dfc stdlib: add a hook for dynamic dispatch in CollectionType.find()
This allows Set.find() to be equally efficient in static and generic
contexts.

Swift SVN r27402
2015-04-17 04:19:49 +00:00
Dmitri Hrybenko
0d6374bb58 stdlib/HashedCollections: skip computing the hash for lookups in empty
collections

Swift SVN r27395
2015-04-17 01:56:19 +00:00
Chris Willmore
f121773690 Update preprocessor directive in validation test for AppleTV.
<rdar://problem/20559420> validation-test/stdlib/StdlibUnittestStdin.swift fails on appletvsimulator-x86_64

Swift SVN r27336
2015-04-15 23:01:59 +00:00
Devin Coughlin
d08b98b1ca Sema: Turn on availability checking by default
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
2015-04-14 06:44:01 +00:00
Dmitri Hrybenko
d267b86cb6 stdlib: move the bulk of SequenceType algorithms to protocol extensions
rdar://19895265

Swift SVN r27269
2015-04-14 01:53:19 +00:00
Dmitri Hrybenko
a84793c60b Fix and re-enable StdlibUnittestRunAllTestsCalledTwice.swift on iOS
Swift SVN r27234
2015-04-11 06:13:52 +00:00
Greg Parker
4fd7e8948f [test] XFAIL StdlibUnittestRunAllTestsCalledTwice.swift on iOS.
The test's check doesn't work on iOS device or simulator; perhaps 
`not --crash` isn't doing its thing.


Swift SVN r27231
2015-04-11 03:35:14 +00:00
Dmitri Hrybenko
a5d6aec352 StdlibUnittest: add a diagnostic for calling runAllTests() twice
... and fix this issue in the sort() test.

Swift SVN r27215
2015-04-10 21:54:56 +00:00
Dave Abrahams
0464c3d957 [stdlib] [Generator|Sequence]Of => Any[Generator|Sequence]
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
2015-04-07 20:32:31 +00:00
Dave Abrahams
ac3f047496 [stdlib] Renaming fallout from Mirror API review
toString(x)      => String(x)
toDebugString(x) => String(reflecting: x)
Printable        => CustomStringConvertible
DebugPrintable   => CustomDebugStringConvertible

Also updated comments to clarify these protocols

Swift SVN r27090
2015-04-07 20:32:26 +00:00