Commit Graph

50 Commits

Author SHA1 Message Date
Erik Eckstein
e28125b106 stdlib: specialize OptionSet.insert for FixedWidthInteger raw-values
This lets the generated code boil down to a single or-instruction.

rdar://157958188
2025-08-12 08:05:49 +02:00
Mao ZiJun
d5e2533cef improved OptionSet.remove's code style 2019-11-21 14:55:39 +09:00
Mao ZiJun
a8fd973876 fixed OptionSet's remove method 2019-11-21 11:25:41 +09:00
Paul Hudson
06f82a53b5 Replaced the majority of ' : ' with ': '. 2019-07-18 20:46:07 +01:00
Ben Cohen
412a045f71 [stdlib] JAFIA (#19074)
* Lazy/generic types needing specialization

* Move DictionaryLiteral typealias to compatibility shims file

* Static String is mainly transparent so needs no inlining

* UnboundedRange hack doesn't need inlining

* Unmanaged needs unsafe performance

* Onone enum namespace

* Output stream specialize-never and calls to lock/unlock don't need inlining

* no need for @_frozen on internal enum

* DropWhile needs lazy-performance
2018-09-19 19:41:06 -07:00
Nate Cook
653a4d89d2 [stdlib] Revise documentation comments
- Clarify RawValue requirement for OptionSet
- Make Bool counterexample more clearly an error
- Add clarifying note about unsafe arithmetic methods
- Add/refine complexity docs for sequence/collection
- Remove docs from obsoleted symbols
- Standardize on unicode.org for links about Unicode
- More complexity annotations
- Expand dictionary defaulted subscript docs
- Fix error in Dictionary.init(minimumCapacity:) docs
- Improve accuracy of prime number listing
2018-06-14 19:19:19 -05:00
Slava Pestov
e1f50b2d36 SE-0193: Rename @_inlineable to @inlinable, @_versioned to @usableFromInline 2018-03-30 21:55:30 -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
ee5fb33656 [stdlib] Remove the Grand Renaming artifacts of Swift 3 era 2017-08-28 15:54:11 -07:00
Nate Cook
b7af9bfe83 [stdlib] Remove SeeAlso tags 2017-06-13 11:23:51 -05:00
Nate Cook
817a1efa3b [stdlib] Documentation revisions
- remove additional 'characters' references from String docs
- improved language around escaping pointer arguments
- key path type abstracts
- codable type abstract revisions
- a few more NSString API fixes
2017-05-17 11:58:08 -05:00
Nate Cook
f650e0a7da [stdlib] String and range expressions
* finish string documentation revisions
* revise examples throughout to use range expressions instead of e.g.
  prefix(upTo: _)
2017-05-13 10:06:12 -05:00
Dave Abrahams
d3ad565b33 [stdlib] Clean up warnings 2017-04-20 14:08:57 -07:00
Max Moiseev
27889c6376 Merge remote-tracking branch 'origin/master' into new-integer-protocols 2017-01-06 15:54:44 -08:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
Max Moiseev
baf392eda4 Deprecating the BitwiseOperations protocol in favor of FixedWidthInteger 2016-12-02 16:59:32 -08:00
practicalswift
797b80765f [gardening] Use the correct base URL (https://swift.org) in references to the Swift website
Remove all references to the old non-TLS enabled base URL (http://swift.org)
2016-11-20 17:36:03 +01:00
Nate Cook
8b39706c3f [stdlib] Documentation revisions
- Various edits
- Standardized complexity formatting
2016-08-12 12:24:36 -05:00
Nate Cook
559092bbf2 [stdlib] Revise stdlib documentation comments
- Expand pre-example explanations
- Update documentation for SE-0118
- Removing remaining 'iff' usage
- Revise Array discussion
- Fix formIndex(_:offsetBy) parameter formatting
- Improve index/formIndex(_:offsetBy:(limitedBy:)?) discussion
- Update Quick Look discussions
- Fixes grammar inconsistencies
- Adds parameter / return documentation
- Adds and expands on examples
- Revises AnyObject discussion for new `id` bridging rules
- Revise readLine, print, and assertion functions
- Add missing docs to String index-moving methods
2016-08-05 16:07:46 -05:00
Dmitri Gribenko
b254ddd546 Merge pull request #2966 from natecook1000/nc-optionset-insert
[stdlib] Add missing discardableResult attribute
2016-06-09 01:09:24 -07:00
Nate Cook
6e8de4458f [stdlib] Add missing discardableResult attribute
Fixes SR-1695: Option Set insert needs @discardableResult
2016-06-09 01:35:34 -05:00
Nate Cook
8e2ec66bdc [stdlib] Remove 'Returns' fields from initializers
This includes an updated fixture for `SourceKit/DocSupport/
doc_clang_module.swift', which depends on the OptionSet documentation.
2016-05-27 10:10:56 -05:00
Dmitri Gribenko
d591f9cf7a stdlib: remove most uses of @warn_unused_result, which does nothing now
I kept the one on sorted(), because that one requires a less trivial
change.
2016-05-19 18:39:39 -07:00
Nate Cook
982e3d09f8 [stdlib] Revise documentation for new indexing model
This revises and expands on documentation for the new collection methods
for working with indices and the revised Swift 3 set APIs. In addition,
it includes documentation for the new range types.
2016-05-19 10:16:14 -05:00
Trent Nadeau
6e327b4ddb Updated stdlib to use @discardableResult and _ = . 2016-05-11 22:53:37 -04:00
Nate Cook
9f326385d6 [stdlib] Revise documentation for core types and protocols
This adds to and expands upon documentation for some core parts of the
standard library, including Optional, ErrorProtocol, AnyObject, and Bool.
2016-05-09 16:41:20 -05:00
Nate Cook
3fb445410f Update documentation comments for revised Set API 2016-04-27 10:56:35 -05:00
Dave Abrahams
debde16e2c Merge set-api branch into swift-3-indexing-model 2016-04-26 15:56:42 -07:00
Nate Cook
6e274913bf [stdlib] Revise documentation for Array- and Set-related types.
This adds and expands documentation for sequences, collections, and the array
types as well as `Set` and its related protocols.
2016-04-25 12:54:39 -05:00
Trent Nadeau
f96ad263a8 Added @discardableResult attr to mutating functions 2016-04-07 23:27:38 +00:00
Manav Gabhawala
7928140f79 [SE-0046] Implements consistent function parameter labels by discarding extraneous parameter names and adding _ where necessary 2016-04-06 20:21:58 -04:00
Daniel Duan
276370b599 [stdlib] apply SE-0040 to stdlib 2016-03-11 16:01:41 -08:00
Dmitri Gribenko
a6696ef996 stdlib: lowercase option set names in a comment 2016-02-20 00:55:36 -08:00
Doug Gregor
7d70b704e4 Merge commit '5e11e3f7287427d386636a169c4065c0373931a8' into swift-3-api-guidelines 2016-01-19 23:18:20 -08:00
Dmitri Gribenko
74ce1ca79c Add unavailable declarations for Swift 2.2 -> 3 migration 2016-01-19 14:32:59 -08:00
gregomni
e2dee6b9dd [stdlib] Switch keywords from 'typealias' to 'associatedtype' in stdlib
Fixes deprecation warnings arising from addition of new
‘associatedtype’ keyword in sr-511.
2016-01-14 09:39:15 -08:00
Max Moiseev
f51e708a8f Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-01-04 12:25:25 -08:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Maxim Moiseev
0c4c56cd5f BitwiseOperationsType => BitwiseOperations 2015-12-10 14:59:40 -08:00
Maxim Moiseev
3bff3ba106 SetAlgebraType => SetAlgebra 2015-12-10 14:58:51 -08:00
Maxim Moiseev
0e0191380a OptionSetType => OptionSet 2015-12-10 14:58:24 -08:00
Dmitri Gribenko
174d475833 stdlib: Remove unavavailable APIs that were left as migration aids
These APIs are from the Swift 1.2 => Swift 2.0 transition, and are not
relevant anymore.

Removing them reduces the surface area of the library that needs to be
reviewed.
2015-12-02 01:19:50 -08:00
Dmitri Hrybenko
dd3194a18c stdlib: adopt @warn_unused_result
rdar://20957486

Swift SVN r31048
2015-08-06 14:53:18 +00:00
Argyrios Kyrtzidis
310d92ecc1 [stdlib] Add RawOptionSetType as unavailable with a 'renamed' fixit to OptionSetType.
rdar://21800523

Swift SVN r30313
2015-07-17 07:16:10 +00:00
Greg Parker
6c812d0751 [stdlib] Reinstate r29043 "strip final from protocol extensions".
This reverts r29050. This wasn't the change that broke the SourceKit tests.


Swift SVN r29052
2015-05-27 01:52:17 +00:00
Greg Parker
16a3b8ebd7 [stdlib] Revert "strip final from protocol extensions".
SourceKit tests need to be updated.


Swift SVN r29050
2015-05-27 01:34:45 +00:00
Dave Abrahams
1f1643221d [stdlib] strip final from protocol extensions
Now that we've lifted the requirement

Swift SVN r29043
2015-05-26 23:52:36 +00:00
Joe Groff
d1b6fa32c4 Revert "Revert "[stdlib] Land OptionSetType et. al.""
This recommits r28892, r28894, and r28895; the previous commits should have addressed the previous breakage.

Swift SVN r28905
2015-05-22 05:47:29 +00:00
Dave Abrahams
21b9a97e88 Revert "[stdlib] Land OptionSetType et. al."
This reverts commit r28892, r28894, and r28895.

They broke validation tests; JoeG is going to look at what's needed to
make them work again.

Swift SVN r28897
2015-05-22 00:13:53 +00:00
Dave Abrahams
ad7f7c6779 [stdlib] Land OptionSetType et. al.
This has passed review, or at least satisfied Tony Parker, provided we
do something to hide SetAlgebraDispatchType.  I think I can eliminate it
in an imminent commit.

Swift SVN r28892
2015-05-21 22:55:02 +00:00