Ian Partridge
1ee493218b
[stdlib] Add _fixLifetime() to avoid ARC leak
2016-03-01 22:23:39 +00:00
Max Moiseev
859db53d87
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2016-03-01 12:56:26 -08:00
Ian Partridge
fbf11ce054
[stdlib] Fix indentation
2016-03-01 20:49:53 +00:00
Ian Partridge
9412c21345
[stdlib] Use fwrite(3) in ASCII fastpath only
2016-03-01 20:18:32 +00:00
Max Moiseev
a61d9d04f5
[stdlib] availability attributes for UnsafePointer.destroy
2016-03-01 10:38:01 -08:00
Ian Partridge
259d57bbe7
[stdlib] Use fwrite(3) in print()
2016-03-01 15:55:52 +00:00
Dmitri Gribenko
56785e81a6
Merge pull request #1477 from PatrickPijnappel/patch-3
...
[stdlib] Rewrite UTF8._isValidUTF8()
2016-02-29 13:12:24 -08:00
Max Moiseev
e48f452a2e
Merge remote-tracking branch 'origin/swift-3-api-guidelines' into swift-3-api-guidelines
2016-02-29 12:15:33 -08:00
Max Moiseev
a49dab6bf8
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2016-02-29 12:08:52 -08:00
Patrick Pijnappel
7c7be3dc00
[stdlib] Add @testable for _isValidUTF8()
2016-02-29 08:09:46 +11:00
Patrick Pijnappel
3543664088
[stdlib] Replace usage of UTF8._numTrailingBytes()
...
The checks are technically different (previous check only rejected malformed initial code units, not all malformed sequences). Which is more correct is debatable, but since _buffer is only filled by transcoding from UTF-16 it should always be well-formed anyway and the difference is not very relevant.
2016-02-28 21:19:27 +11:00
Patrick Pijnappel
f783558111
[stdlib] Refactor UTF8._isValidUTF() to be useable throughout stdlib
...
This is as a replacement for usages of UTF8._numTrailingBytes().
Note that the sanityCheck was redundant at both call sites.
2016-02-28 18:48:41 +11:00
Xi Ge
f195adba80
Module group: suggested by @gribozavr, move ExistentialCollection.swift to collection/type-erased group.
2016-02-27 21:14:38 -08:00
Patrick Pijnappel
04f760d836
[stdlib] Fix comments
2016-02-28 16:12:11 +11:00
Patrick Pijnappel
95ea76717c
[stdlib] Rewrite UTF8._isValidUTF8()
2016-02-28 15:38:52 +11:00
Chris Lattner
0b2cf15566
Merge pull request #1472 from PatrickPijnappel/patch-3
...
[stdlib] Fix outdated comment
2016-02-27 14:06:49 -08:00
practicalswift
34188788a1
[gardening] Sort file listings in CMakeLists.txt files
2016-02-27 19:50:30 +01:00
Patrick Pijnappel
ff253ecec0
Fix outdated comment
2016-02-27 22:54:23 +11:00
Nadav Rotem
493f4e3747
[CodeSize] Disable the inlining of measureExtendedGraphemeCluster.
...
I am using Erik's inliner analysis tool to identify areas where the inliner is
too aggressive. In this commit I disabled the inlining of the method
measureExtendedGraphemeCluster. This change reduced the size of the swift
standard library by about 45k (2% of the .text size). I did not see any
performance regressions on the performance test suite.
2016-02-26 14:48:39 -08:00
Daniel Duan
2bc78b8c09
[stdlib] update for 'inout' adjustment (SE-0031)
2016-02-26 12:02:29 -08:00
Dmitri Gribenko
836e7785f9
stdlib: UTF16.measure() => .transcodedLength()
2016-02-25 15:06:00 -08:00
Dmitri Gribenko
6bb8045a72
stdlib: add better argument labels to transcode()
2016-02-25 14:53:52 -08:00
Dmitri Gribenko
1f4d8e20ed
stdlib: UnicodeScalar.escape() => .escaped()
2016-02-25 14:39:47 -08:00
Dmitri Gribenko
5f4fec74f8
stdlib: remove UnicodeScalar.init()
2016-02-25 14:39:47 -08:00
Jordan Rose
b319e3da32
stdlib: Adjust to insert(contentsOf:at:) and append(contentsOf:)
...
instead of insertContents(of:at:) and appendContents(of:),
originally insertContentsOf(_:at:) and appendContentsOf(_:)
per internal discussion.
2016-02-25 12:50:39 -08:00
swiftix
17a2106e3a
Merge pull request #1429 from swiftix/wip-prespecializations-module
...
Move pre-specializations of popular types away from the stdlib.
This saves 4%-5% of code size in libswiftCore.dylib.
2016-02-25 12:44:36 -08:00
Xi Ge
95fe01d874
Module groups: Array is a sub-group of collection.
2016-02-25 12:35:27 -08:00
Xi Ge
01f7c5b489
[cmake] Make stdlib depend on the Json group info file.
2016-02-25 12:35:27 -08:00
Roman Levenstein
8dff92ad4d
Move pre-specializations of popular types away from the standard library.
...
Pre-specializations were only used by Onone builds, but were kept inside the standard library dylyb anyways. This commit moves all the pre-specializations into a dedicated Swift module and a dynamic library, which are only used by Onone builds.
This reduces the code size of libswiftCore.dylib by 4%-5%.
2016-02-25 11:23:15 -08:00
Dmitri Gribenko
f6b271913b
stdlib: replace UnicodeDecodingResult.isEmptyInput with Equatable
2016-02-24 21:01:35 -08:00
Dmitri Gribenko
63ec99b186
stdlib: add argument labels to UTF16._copy()
2016-02-24 19:55:57 -08:00
Dmitri Gribenko
3c93ccc4f7
stdlib: apply API guidelines and fix coding style in SwiftNativeNSArray.swift
2016-02-24 19:55:57 -08:00
Dmitri Gribenko
68bf4ae8ce
stdlib: apply API guidelines in Unicode.swift
2016-02-24 19:55:57 -08:00
Dmitri Gribenko
7b3e9c3409
stdlib: fix coding style
2016-02-24 19:55:57 -08:00
Dmitri Gribenko
9a0c50b82f
stdlib: add argument labels in _StringBufferIVars
2016-02-24 19:55:56 -08:00
Dmitri Gribenko
5cffdeedd8
Merge pull request #1440 from cwillmor/swift-3-api-guidelines
...
stdlib: Audit StringUTF16.swift, StringUTF8.swift for Swift 3 naming.
2016-02-24 18:30:54 -08:00
Jordan Rose
f922084180
stdlib: Rename miscellaneous enum cases and static vars.
2016-02-24 17:46:14 -08:00
Jordan Rose
8fdee4ad3c
stdlib: Rename some implementation details of mirrors/reflection.
2016-02-24 17:46:13 -08:00
Jordan Rose
e5ae60aafc
stdlib: Rename some helpers inside UnicodeTrie. NFC.
2016-02-24 17:46:13 -08:00
Jordan Rose
e45dfe09c6
stdlib: Rename 'Native'/'Cocoa' representations inside Dictionary/Set.
...
...and then because of a compiler bug (SR-806), rename the helper
properties to 'asNative' and 'asCocoa'.
None of this is API, so there is no migration information.
2016-02-24 17:46:12 -08:00
Jordan Rose
979e4a8e34
stdlib: Rename {Float,Double.CGFloat}.NaN to 'nan'
...
This follows the API guidelines and is consistent with the printed form.
'quietNaN' does not change, though.
2016-02-24 17:46:12 -08:00
Chris Willmore
c305ea03e4
stdlib: Audit StringUTF16.swift, StringUTF8.swift for Swift 3 naming.
2016-02-24 17:29:24 -08:00
Dmitri Gribenko
f3389273ba
stdlib: String indices: samePositionIn(_:) => samePosition(in:)
2016-02-24 16:29:27 -08:00
Chris Willmore
2ddb6106e4
stdlib: Audit API for Swift 3 preposition, first-arg label rules
...
This commit is the result of auditing the following files:
* StringBuffer.swift
* StringCharacterView.swift
* StringCore.swift
* StringInterpolation.swift.gyb
* StringLegacy.swift
2016-02-24 16:11:20 -08:00
Max Moiseev
bb3eaaf308
Merging in latest master
2016-02-24 15:10:25 -08:00
Dmitri Gribenko
c2c714b039
stdlib: add argument labels in _StringBufferIVars
2016-02-24 14:30:04 -08:00
Dmitri Gribenko
18965b370b
stdlib: add argument labels to _cocoaStringToContiguous()
2016-02-24 14:09:04 -08:00
Dmitri Gribenko
8fa5bb18e4
stdlib: fix coding style
2016-02-24 14:09:04 -08:00
Jordan Rose
12574d0f85
stdlib: Mark old insertContentsOf(_:at:) and unsafeAddressOf(_:) unavailable.
2016-02-24 11:43:02 -08:00
Max Moiseev
0490e86d01
[stdlib] strideTo/strideThrough => stride(to:...)/stride(through:...)
2016-02-24 09:56:10 -08:00