Karoy Lorentey
9fef06e59c
Merge pull request #12752 from hamishknight/dictionary-subscript-addressor
...
[stdlib] Use addressor for Dictionary's subscript(_:default:)
2017-12-04 15:04:29 +01:00
Hamish
7876391f47
[stdlib] Call nativePointerToValue(at:) from nativePointerToValue(forKey:insertingDefault:)
2017-12-03 17:28:45 +00:00
Ben Cohen
dcab9493ae
Removed some warnings ( #12753 )
2017-11-30 15:12:56 -08:00
Hamish
4b3f0374c8
[stdlib] Don't check for native when known native in ensureNativeBuffer()
2017-11-28 19:34:01 +00:00
Nate Cook
6c66cf3e61
[stdlib] Make stdlib index types Hashable
...
This adds Hashable conformance for the String, Dictionary,
and Set's index types.
2017-11-28 13:29:55 -06:00
Huon Wilson
39e0a951b8
[stdlib] Make Optional, Array and Dictionary conditionally Equatable.
2017-11-27 21:09:49 -08:00
Hamish
12416f94bb
[stdlib] Don't use autoclosure on pointerToValue(forKey:insertingDefault:) methods
...
Previously we used @autoclosure on the _VariantDictionaryBuffer methods and forwarded closures directly.
However, this relied on an unintentional type-checker inconsistency, tracked by SR-5719.
2017-11-21 17:51:00 +00:00
Hamish
76ea3a2ca4
[stdlib] Fix uniqueness check in nativePointerToValue(forKey:insertingDefault:)
...
The reasoning for this change is detailed in PR-13000.
2017-11-19 22:37:05 +00:00
Hamish
79d8209ffa
[stdlib] Use addressor for Dictionary's subscript(_:default:)
2017-11-19 15:45:27 +00:00
swift-ci
53ddcb5079
Merge pull request #13000 from gottesmm/pr-6a0399e1ebd7ccad1979a2af165d0b09595fb2cb
2017-11-18 20:55:27 -08:00
Michael Gottesman
89cefe0a70
[stdlib] Use a different access pattern to check uniqueness to work around more conservative SILGen codegen.
...
Using && here causes us to go down a SILGen path that guarantees that self will
be evaluated over the entire && expression instead of just the LHS. This cause
the uniqueness check to always return false at -Onone. At -O, the optimizer is
smart enough to remove this issue.
rdar://33358110
2017-11-18 20:16:28 -07:00
taylor swift
c85880899d
implement SE 184: add allocation methods to Unsafe buffer pointers, drop all parameters from deallocation, adjust namings, and add repeated-value assignment methods
2017-11-17 21:28:03 -08:00
Greg Parker
1e894cd80b
[runtime] Clean up symbols in error machinery. ( #12853 )
...
* [runtime] Clean up symbols in error machinery.
* [runtime] Clean up symbols in Foundation overlay.
* [runtime] Clean up symbols in collections and hashing.
* [runtime] Remove symbol controls from the Linux definition of swift_allocError.
* [tests] Add more stub functions for tests that link directly to the runtime.
2017-11-15 22:20:11 -08:00
Greg Parker
e8475cc130
Revert "Use conditional conformances to implement Equatable for Optional, Array and Dictionary"
2017-11-15 14:17:22 -08:00
Huon Wilson
8524379352
[stdlib] Make Optional, Array and Dictionary conditionally Equatable.
2017-11-14 16:23:20 -08:00
Roman Levenstein
111499d2bf
Merge pull request #12256 from swiftix/sil-serialize-all-improvments
...
Remove the -sil-serialize-all option
2017-10-05 22:03:41 -07:00
Karoy Lorentey
7dabd3ee1a
Merge pull request #12249 from lorentey/rdar/34672149
...
[stdlib] Dictionary.Keys, .Values: Implement Custom[Debug]StringConvertible
2017-10-05 11:31:14 +01:00
Slava Pestov
c272d41e2f
Re-apply "SIL: Remove special meaning for @_semantics("stdlib_binary_only")"
...
With -sil-serialize-all gone, this no longer means anything; just
don't declare the function as @_inlineable instead.
Fixes <rdar://problem/34564380>.
2017-10-04 14:07:52 -07:00
Jordan Rose
aab5f7aa4f
Revert "SIL: Remove special meaning for @_semantics("stdlib_binary_only")" ( #12270 )
...
It still affects StdlibUnittest, which is still using -sil-serialize-all.
2017-10-04 12:49:21 -07:00
Karoy Lorentey
4ff5a41061
[stdlib] Dictionary.Keys, .Values: Implement Custom[Debug]StringConvertible.
...
This prevents a crash while printing these collections.
Resolves:
https://bugs.swift.org/browse/SR-6003
rdar://problem/34672149
2017-10-04 12:40:00 +01:00
Karoy Lorentey
e4ef5203d2
[stdlib] Extract Array._makeDescription into standalone function
...
This enables its use for collection types unrelated to Arrays.
Use the new function to replace Set’s implementation of
Custom[Debug]StringConvertible.
2017-10-04 12:40:00 +01:00
Slava Pestov
0fad13eeba
SIL: Remove special meaning for @_semantics("stdlib_binary_only")
...
With -sil-serialize-all gone, this no longer means anything; just
don't declare the function as @_inlineable instead.
Fixes <rdar://problem/34564380>.
2017-10-03 13:48:22 -07:00
Max Moiseev
a24998a5b1
[stdlib] Add missing @_fixed_layout attributes to fix resilience build
2017-10-02 15:19:06 -07:00
Max Moiseev
ef6b5c4795
Add missing @_inlineable attributes and deinits
2017-09-29 11:26:56 -07:00
Max Moiseev
53b8419279
[stdlib] Make all the stdlib APIs @_inlineable
...
This change in theory should allow us to remove a special stdlib-only
sil-serialize-all compilation mode.
<rdar://problem/34138683>
2017-09-29 11:26:56 -07:00
Maxim Moiseev
6c7d93491f
Merge pull request #11627 from moiseev/swift-2-artifacts
...
[stdlib] Remove the Grand Renaming artifacts of Swift 3 era
2017-09-05 11:41:18 -07:00
Kuba (Brecka) Mracek
d03a575279
Unify the capitalization across all user-visible error messages ( #11599 )
...
* Unify the capitalization across all user-visible error messages (fatal errors, assertion failures, precondition failures) produced by the runtime, standard library and the compiler.
* Update some more tests to the new expectations.
2017-08-29 12:16:04 -07:00
Maxim Moiseev
ee5fb33656
[stdlib] Remove the Grand Renaming artifacts of Swift 3 era
2017-08-28 15:54:11 -07:00
Nate Cook
781f6326bd
[stdlib] Various documentation revisions and fixes
...
- Revisions to unsafeDowncast and withVaList
- Fix the Int64/UInt64 discussion
- Buffer pointer revisions
- Fix Optional example to use new integer methods
- Revise and correct some UnsafeRawBufferPointer docs
- Fix symmetricDifference examples
- Fix wording in FloatingPoint.nextDown
- Update ImplicitlyUnwrappedOptional
- Clarify elementsEqual
- Minor integer doc fixes
- Comment for _AppendKeyPath
- Clarification re collection indices
- Revise RangeExpression.relative(to:)
- Codable revisions
2017-07-31 10:56:53 -05:00
Rintaro Ishizaki
c36cb57054
[stdlib] Fix warnings in non-ObjC platforms. ( #11200 )
2017-07-26 22:42:55 +09:00
swift-ci
4d5dfdd42c
Merge pull request #10966 from rintaro/stdlib-hashedcollection-switchcase
2017-07-24 00:51:08 -07:00
Dave Abrahams
c497969987
[stdlib] Swift4 Modernizations Compatible with Swift 3.2
2017-07-14 17:54:33 -07:00
Rintaro Ishizaki
d2eab3c342
[stdlib] Use #if guarded switch case
...
_Cocoa{Set,Dictionary}{Buffer,Index,Iterator} can be completely
eliminated from non-ObjC runtime environments.
2017-07-14 18:14:34 +09:00
Dave Abrahams
1da820da74
Merge pull request #10275 from natecook1000/nc-dict-grouping
...
[stdlib] Move Dictionary(grouping:by) down a level
2017-06-19 16:56:04 -07:00
Nate Cook
695a7f975e
[stdlib] Move Dictionary(grouping:by) down a level
2017-06-16 00:51:38 -05:00
Nate Cook
825e9d077d
[stdlib] More documentation revisions / consistency fixes.
2017-06-13 14:08:00 -05:00
Nate Cook
b7af9bfe83
[stdlib] Remove SeeAlso tags
2017-06-13 11:23:51 -05:00
Nate Cook
0a7780c213
[stdlib] Various minor documentation revisions
2017-06-12 16:20:11 -05:00
Nate Cook
b2e9d74d5a
[stdlib] Add dictionary overloads for merge/merging methods
...
This resolves the issue where a dictionary can’t be passed to
the Dictionary.merge and .merging methods. rdar://problem/32352586
2017-06-05 15:54:11 -07:00
Ben Cohen
ea2f64cad2
[stdlib] Add Sequence.Element, change ExpressibleByArrayLiteral.Element to ArrayLiteralElement ( #8990 )
...
* Give Sequence a top-level Element, constrain Iterator to match
* Remove many instances of Iterator.
* Fixed various hard-coded tests
* XFAIL a few tests that need further investigation
* Change assoc type for arrayLiteralConvertible
* Mop up remaining "better expressed as a where clause" warnings
* Fix UnicodeDecoders prototype test
* Fix UIntBuffer
* Fix hard-coded Element identifier in CSDiag
* Fix up more tests
* Account for flatMap changes
2017-05-14 06:33:25 -07:00
Nate Cook
7fa74f590d
[stdlib] Documentation revisions for string + ranges
...
* removing .characters from examples
* beginning new String doc revisions
* improvements to the String Foundation overlay docs
* minor revisions elsewhere
2017-05-13 10:06:05 -05:00
Nate Cook
822fec7b2b
[stdlib] Make new Dict filter closure type match sequence
2017-05-10 11:24:37 -05:00
Nate Cook
44b12db536
[stdlib] Maintain old keys and values types in Swift 3 mode
2017-05-10 10:45:05 -05:00
Nate Cook
3f68f2876a
Fix dictionary merge bug under optimization
2017-05-01 16:06:19 -05:00
Nate Cook
2e2e4d9bda
Revert "Revert "[stdlib] Dictionary/Set enhancements""
...
This reverts commit 328ebe8567 .
2017-05-01 16:06:14 -05:00
Arnold Schwaighofer
328ebe8567
Revert "[stdlib] Dictionary/Set enhancements"
2017-04-29 07:02:57 -07:00
Nate Cook
e2328885c1
[stdlib] Dictionary/Set enhancements
...
A variety of enhancements from SE-154 and SE-165:
- Custom Keys and Values collections for Dictionary
- Two sequence-based Dictionary initializers
- Merging methods for Dictionary
- Capacity checking and reserving for Dictionary and Set
- Type-specific filter(_:) methods for Dictionary and Set
- A mapValues(_:) method for Dictionary
- A grouping Dictionary initializer
2017-04-26 11:21:16 -05:00
practicalswift
ca72b12287
[gardening] Remove accidental \t:s
2017-04-02 16:03:54 +02:00
Doug Gregor
cc225eb9fa
[Stdlib] Silence all warnings about deprecated @objc inference.
...
This eliminates 26 Objective-C entry points that we never intended to expose, but that came “for free” with the @objc inference rules.
2017-03-31 21:53:55 -07:00
Philippe Hausler
bb674fe75a
Merge pull request #6421 from phausler/dictionary_bridge_perf
...
Add a fast-path case for enumeration of keys and objects for bridged Dictionaries
2017-03-28 08:36:55 -07:00