Andrew Trick
7ed7be9c14
Put cocoa on the slow path of String.subscript.
...
Swift SVN r19700
2014-07-08 21:43:16 +00:00
Doug Gregor
8fb9a19542
Replace the "string" property of String.UnicodeScalarView with a String initializer.
...
Swift SVN r19695
2014-07-08 20:25:30 +00:00
Doug Gregor
973caddc24
Replace String.UnicodeScalarView's user conversion to String with a "string" property
...
Swift SVN r19691
2014-07-08 20:01:50 +00:00
Dmitri Hrybenko
95ac813af3
stdlib/Dictionary: coding style, comments, renamed type generic parameters
...
Swift SVN r19687
2014-07-08 16:48:11 +00:00
Dmitri Hrybenko
12aaf7543b
stdlib: remove 'public' from private functions
...
Swift SVN r19686
2014-07-08 16:47:10 +00:00
Dmitri Hrybenko
4556f92949
stdlib/Dictionary: comments, coding style, more semantic _sanityChecks
...
Swift SVN r19684
2014-07-08 14:49:39 +00:00
Dmitri Hrybenko
977d901643
stdlib: hide quickSort and insertionSort
...
Finishes rdar://17315534
Swift SVN r19682
2014-07-08 10:33:23 +00:00
Dmitri Hrybenko
8fb09ef13a
stdlib: update comments and parameter names for startsWith() algorithm to
...
clearly reflect semantics
rdar://17567069
Swift SVN r19681
2014-07-08 09:54:10 +00:00
Nadav Rotem
bdecfe75a6
Mark the string builder as @readonly to allow us to remove unused strings.
...
Swift SVN r19679
2014-07-08 04:52:48 +00:00
Nadav Rotem
a227fcab6c
Mark the Array and Dictionary builders with the readonly marker to allow removal of dead code.
...
Swift SVN r19678
2014-07-08 04:18:46 +00:00
Jordan Rose
5427102268
Remove stray @ from 'public' and 'internal' missed in r19672.
...
Swift SVN r19675
2014-07-08 03:00:42 +00:00
Enrico Granata
93b3d5fe7b
Add Mirror conformance for UnicodeScalar. This doesn't need anything special, a _LeafMirror should suffice
...
Swift SVN r19674
2014-07-08 02:28:45 +00:00
Jordan Rose
da29f099f0
Update stdlib for accessibility modifiers becoming context-sensitive keywords.
...
Swift SVN r19672
2014-07-08 02:17:46 +00:00
Enrico Granata
b6ca5f3a77
Add Mirror support for String.Index
...
The chosen display mode is using the integer UTF16-based position as the thing to display
This is what would also be displayed by default, except it would show up as {{_position 0},{...}}
Now we avoid exposing the internals, and just essentially coalesce the Index with its numeric value
Swift SVN r19670
2014-07-08 02:13:38 +00:00
Enrico Granata
e73b3120c0
EmptyCollection and CollectionOfOne are similar enough that they can be reflected together. I am a little unhappy with having the summary be a string argument instead of inlined, but I couldn't come up with a quick solution to do otherwise, and it didn't seem worth spending a lot of time dwelling upon that
...
Swift SVN r19668
2014-07-08 01:30:31 +00:00
Enrico Granata
342202d2d5
Generators don't need Mirrors
...
Swift SVN r19665
2014-07-08 01:01:27 +00:00
Jordan Rose
f0fc440785
One last cleanup for access control.
...
Swift SVN r19662
2014-07-08 00:59:07 +00:00
Enrico Granata
64bb537f55
Implement Mirrors for the UTF8/16 view on Swift Strings
...
Swift SVN r19651
2014-07-07 23:36:00 +00:00
Dave Abrahams
953f740949
[stdlib] Trivial comment fixups
...
Swift SVN r19649
2014-07-07 23:17:49 +00:00
Dave Abrahams
94e04be86d
[stdlib] Make RandomAccessIndex Comparable
...
Swift SVN r19647
2014-07-07 23:01:02 +00:00
Jordan Rose
faa4004b42
[Accessibility] Public types/functions cannot have private generic parameters.
...
Or rather, they cannot have constraints on their generic parameters that use
private types.
Swift SVN r19644
2014-07-07 22:52:29 +00:00
Enrico Granata
d611059b70
Refactor the UnsafePointers Mirrors to use the all-powerful Mirror Generator
...
Reduces some boilerplate
Swift SVN r19640
2014-07-07 22:11:32 +00:00
Enrico Granata
36f035e25e
Per Dave, generators don't really need to be reflected
...
Swift SVN r19639
2014-07-07 21:42:07 +00:00
Enrico Granata
86ebdaffc1
The Mirrors Generator II
...
Feedback from Dave and Dmitri - the Mirrors.gyb file is now split in three parts:
- Boilerplate, the value, valueType, objectIdentifier and disposition properties
- Decl, the type declaration proper, with no opening brace
- Conformance, the extension that provides Reflectable conformance on the original type
This is substantially no feature change, but it should make for easier editing, and a generally more readable experience
Swift SVN r19637
2014-07-07 21:27:20 +00:00
Doug Gregor
e9439ff7da
Remove implicit conversion from _DictionaryElement.
...
Swift SVN r19626
2014-07-07 19:51:58 +00:00
Doug Gregor
d8de1a9ef9
Remove two more implicit conversions used only within the standard library.
...
Swift SVN r19624
2014-07-07 18:57:36 +00:00
Doug Gregor
2bddbc7711
Replace OnHeap<T>'s implicit conversion with a computed property.
...
No user-visible change.
Swift SVN r19623
2014-07-07 18:57:35 +00:00
Doug Gregor
d62d98de18
Replace an implicit conversion with a computed property (library implementation detail).
...
Swift SVN r19622
2014-07-07 18:57:35 +00:00
Jordan Rose
2836c474ec
[Accessibility] Public enum cases cannot have private payloads.
...
...because you can't match them properly in switches.
In the future, we could consider allowing private enum cases in a
resilient public enum, which essentially forces the user to consider the
default case.
Swift SVN r19620
2014-07-07 18:39:35 +00:00
Jordan Rose
2ebcd5d831
Hide the representations of DictionaryIndex and DictionaryGenerator.
...
Enum cases can't be less public than the enum type in 1.0, so add a trivial
layer of indirection to these types so the "enum-ness" is internal while the
type itself remains public.
Swift SVN r19619
2014-07-07 18:39:33 +00:00
Dmitri Hrybenko
b20abdfcbe
stdlib: fix grammar in Array comments (they used to say 'a Array')
...
rdar://17075487
Swift SVN r19612
2014-07-07 15:31:11 +00:00
Dmitri Hrybenko
09bbec7464
stdlib: fix a crash in String.rangeOfString when the result is NSNotFound
...
rdar://17550857
Swift SVN r19611
2014-07-07 15:25:10 +00:00
Dmitri Hrybenko
a9ee1f88ac
stdlib: remove withUnsafePointerToObject
...
It is completely unused, and I am not even convinced it is safe. It
assumes that size of ImplicitlyUnwrappedOptional<T> is equal to pointer
size (while this is true for Objective-C pointer types, there was no
precondition that enforced this).
Swift SVN r19604
2014-07-07 10:53:34 +00:00
Dmitri Hrybenko
6f5a2e5d87
stdlib: remove LifetimeManager, it is completely unused,
...
withUnsafePointer-like functions provide safer idioms
Swift SVN r19603
2014-07-07 10:32:19 +00:00
Dmitri Hrybenko
f61bf5d8ba
stdlib: remove withObjectAtPlusZero(), now we have built-in CF bridging
...
support
Swift SVN r19601
2014-07-07 10:13:44 +00:00
Dmitri Hrybenko
1911aaed9f
stdlib: hide isUniquelyReferenced
...
Swift SVN r19598
2014-07-07 10:01:48 +00:00
Dmitri Hrybenko
62c772ad6a
stdlib: hide Objective-C bridging implementation details
...
Swift SVN r19595
2014-07-07 09:46:07 +00:00
Dmitri Hrybenko
00fe3bcda3
stdlib: hide swift_keepAlive
...
Swift SVN r19594
2014-07-07 09:46:02 +00:00
Dmitri Hrybenko
735bf5e785
stdlib: hide swift_bufferAllocate
...
Swift SVN r19593
2014-07-07 09:45:59 +00:00
Dmitri Hrybenko
8a3c73e08a
stdlib: hide countLeadingZeros
...
Swift SVN r19592
2014-07-07 09:45:56 +00:00
Jordan Rose
56ec3c901c
[Accessibility] Properly treat typealiases as distinct types.
...
getAnyNominal() looks through sugar, so it was matching typealiases to
nominal types before the specific check for typealiases.
Swift SVN r19586
2014-07-06 22:07:28 +00:00
Dmitri Hrybenko
1b589e15ca
stdlib: Remove a redundant _precondition from _asUTF16CodeUnit
...
Swift SVN r19583
2014-07-06 12:58:45 +00:00
Dmitri Hrybenko
e95a9e9b72
stdlib: rename private API _asUnicodeCodePoint to _asUnicodeScalar
...
Swift SVN r19582
2014-07-06 12:50:07 +00:00
Chris Lattner
190d4901ae
improve the doc comment on toInt to be more specific about what it does.
...
Swift SVN r19577
2014-07-04 21:18:47 +00:00
Chris Lattner
0ad1c248c8
fix <rdar://problem/17493994> String.toInt() returns 0 (not nil) for some non-numeric characters
...
Swift SVN r19575
2014-07-04 21:02:49 +00:00
Dmitri Hrybenko
81f1e660a0
stdlib: hide encodeBitsAsWords
...
rdar://17315534
Swift SVN r19569
2014-07-04 17:04:48 +00:00
Dmitri Hrybenko
594dfe5e2d
stdlib: hide swift_MagicMirrorData_summaryImpl
...
rdar://17315534
Swift SVN r19568
2014-07-04 16:08:29 +00:00
Dmitri Hrybenko
7f351643d9
stdlib: hide roundUpToAlignment
...
rdar://17315534
Swift SVN r19566
2014-07-04 15:57:47 +00:00
Dmitri Hrybenko
29ab26ca39
stdlib/UnicodeScalar: hide UnicodeScalar.isPrint(), it is not
...
Unicode-aware
rdar://17550187
Swift SVN r19564
2014-07-04 13:13:42 +00:00
Dmitri Hrybenko
6e5060d471
stdlib/UnicodeScalar: remove arithmetic operations, they interact in
...
non-obvious ways with double-quoted literal sytax; "1" - "1" used to compile
rdar://17225816
Swift SVN r19563
2014-07-04 13:11:52 +00:00