Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement SE-0065 "A New Model for Collections and Indices" #2108

Merged
merged 402 commits into from
Apr 27, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
402 commits
Select commit Hold shift + click to select a range
9dd485e
New indexing model: WIP on updating StdlibCollectionUnittest
gribozavr Mar 16, 2016
ea51ace
New indexing model: generate three DefaultIndices types
gribozavr Mar 19, 2016
92fe2dc
New indexing model: remove a FIXME that is fixed
gribozavr Mar 19, 2016
37fb51a
New indexing model: generate 12 Slice types
gribozavr Mar 19, 2016
941235c
New indexing model: remove a duplicate API
gribozavr Mar 19, 2016
e7f5727
stdlib: RangeReplaceableCollection: move a requirement to the derivab…
gribozavr Mar 19, 2016
aaa486c
New indexing model: fix most compilation issues in StdlibCollectionUn…
gribozavr Mar 18, 2016
59f0770
stdlib: add a FIXME to remove Indexable
gribozavr Mar 19, 2016
3ad0fa8
New indexing model: remove a TODO that was fixed
gribozavr Mar 19, 2016
95d2e11
New indexing model: add Indexable.IndexDistance
gribozavr Mar 19, 2016
e63374f
stdlib: add more doc comments to MutableIndexable
gribozavr Mar 19, 2016
3f448b3
Move NewArray.swift.gyb to validation-test
gribozavr Mar 20, 2016
8ef59b1
Silence warnings in NewArray.swift.gyb
gribozavr Mar 20, 2016
0cb009c
[stdlib] indexing model: Bugfix
Mar 21, 2016
c8f5047
[stdlib] indexing model: Workaround for compiler bug
Mar 21, 2016
a6cd572
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
gribozavr Mar 21, 2016
c05afc7
stdlib: more _stdlibAssert => _debugPrecondition renaming
gribozavr Mar 21, 2016
d7632a6
[stdlib] making benchmarks compile with new collections
Mar 21, 2016
3b41409
[stdlib] indexing model: Range indexing diagnostics
Mar 22, 2016
cf92a80
[stdlib][swift-3-indexing-model] making Set validation tests pass
Mar 22, 2016
a43a46c
[stdlib][swift-3-indexing-model] making Dictionary validation tests pass
Mar 22, 2016
5713a6b
[stdlib][swift-3-indexing-model] fixing stdlib/Generator tests
Mar 22, 2016
55885fb
New indexing model: tighten requirements on SubSequence types
gribozavr Mar 21, 2016
6e76935
[stdlib][swift-3-indexing-model] fixing more tests
Mar 22, 2016
d3c1e7b
[stdlib][swift-3-indexing-model] making benchmarks compile again
Mar 22, 2016
303ddac
[stdlib][swift-3-indexing-model] fixing ExistentialCollection tests
Mar 22, 2016
d9a2b45
New indexing model: tighten requirements on *Collection.Indices
gribozavr Mar 22, 2016
8d9e62b
[stdlib] indexing model: rename next/previous
Mar 23, 2016
d721a03
[stdlib][swift-3-indexing-model] fixing Index tests
Mar 23, 2016
11259d1
[stdlib] indexing model: rename in-place indexing
Mar 24, 2016
e751162
[stdlib][swift-3-indexing-model] adding a tag to find and fix the ski…
Mar 24, 2016
01127b3
index(n, stepsFrom: i)
Mar 26, 2016
502137e
[stdlib][swift-3-indexing-model] Implement _writeBackMutableSlice
natecook1000 Mar 27, 2016
e8c467f
Merge pull request #1889 from natecook1000/nc-index-mutableslice
gribozavr Mar 27, 2016
4d651f8
limit: => limitedBy:, pt 1
Mar 28, 2016
81d3e8c
limit: => limitedBy:, pt 2
Mar 28, 2016
da5c403
func index(n: IndexDistance, stepsFrom i: Index)
Mar 28, 2016
a95cea9
Merge branch 'swift-3-indexing-model' of github.com:apple/swift into …
Mar 28, 2016
25baede
[stdlib] indexing model: add formIndex
Mar 28, 2016
a5c3c63
[stdlib] Indexing model: nix RangeOfStrideable
Mar 28, 2016
393ca5d
Warning suppression
Mar 28, 2016
cfcc21e
Update successor/predecessor in validation tests
Mar 28, 2016
eda98cd
Spelling error: s/Avance/Advance/
Mar 28, 2016
97baeff
Fix up use of limitedBy: in a test
Mar 28, 2016
8e4f852
Merge remote-tracking branch 'refs/remotes/origin/master' into merge
Mar 29, 2016
b30a550
[stdlib][swift-3-indexing-model] Fixing `checkCollection` functions
Mar 29, 2016
c93fcb9
[stdlib][swift-3-indexing-model] fixing Concatenate tests
Mar 29, 2016
df73cd2
New indexing model: reorder preconditions to make more sense
gribozavr Mar 29, 2016
f065fde
New indexing model: StdlibCollectionUnittest: rename methods for cons…
gribozavr Mar 29, 2016
26961ab
New indexing model: extract a helper function into gyb_stdlib_support.py
gribozavr Mar 29, 2016
79048e0
New indexing model: fix the StdlibUnittest/SequencesCollections.swift…
gribozavr Mar 30, 2016
6942857
New indexing model: re-calculate start and end index after mutating a…
gribozavr Mar 30, 2016
bd9e855
StdlibCollectionUnittest: make it work with new slice types, and add …
gribozavr Mar 30, 2016
3e8ffae
New indexing model: update the test generator for Slice* tests
gribozavr Mar 30, 2016
7e0661b
New indexing model: re-generate Slice* tests
gribozavr Mar 30, 2016
629a941
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
gribozavr Mar 30, 2016
2683f61
New indexing model: fix the BridgeNonVerbatim.swift test
gribozavr Mar 30, 2016
208e342
New indexing model: fix test/1_stdlib/Collection.swift
gribozavr Mar 30, 2016
4750f3b
New indexing model: fix validation-test/stdlib/Index.swift.gyb
gribozavr Mar 30, 2016
dcf919c
New indexing model: fix validation-test/stdlib/Join.swift.gyb
gribozavr Mar 30, 2016
8fbe94f
New indexing model: make validation-test/stdlib/CollectionType.swift.…
gribozavr Mar 30, 2016
981b9c1
[stdlib][swift-3-indexing-model] fixing SequencesCollections tests
Mar 29, 2016
97f06a0
[stdlib][swift-3-indexing-model] removing Strideable requirement for …
Mar 30, 2016
2fd4131
[stdlib][swift-3-indexing-model] fixing SequenceType tests
Mar 30, 2016
5a12349
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
gribozavr Mar 31, 2016
340f464
StdlibCollectionUnittest: rename methods for consistency
gribozavr Mar 31, 2016
5b2527e
stdlib: make _writeBackMutableSlice() callable from StdlibCollectionU…
gribozavr Mar 31, 2016
f4e413f
[stdlib][swift-3-indexing-model] updating index invalidation tests
Mar 31, 2016
171169b
[stdlib][swift-3-indexing-model] fixing Arrays tests
Apr 1, 2016
bad2ff1
StdlibUnittest: add assertions for range checks
gribozavr Apr 1, 2016
764b5bd
New indexing model: implement Slice*._failEarlyRangeCheck
gribozavr Apr 1, 2016
6477740
StdlibCollectionUnittest: share data sets between out-of-bounds and s…
gribozavr Apr 1, 2016
2b9737c
StdlibCollectionUnittest: implement out-of-range tests for slicing su…
gribozavr Apr 1, 2016
067b244
StdlibCollectionUnittest: stricter range checking in minimal collections
gribozavr Apr 1, 2016
4066326
Move GenerateSliceTests.py to utils/split-generated-tests, it will be…
gribozavr Mar 30, 2016
37c4d70
Split collection tests for better parallelism
gribozavr Mar 31, 2016
7d82037
Slice tests: update expectations: creating out of bounds indices trap…
gribozavr Mar 31, 2016
f784fd9
StdlibUnittest: fix infinite recursion in range checking in minimal c…
gribozavr Mar 31, 2016
69e921a
StdlibUnittest: implement slice subscript writeback in minimal collec…
gribozavr Mar 31, 2016
8891f43
StdlibCollectionUnittest: remove some redundant range checks to speed…
gribozavr Apr 1, 2016
a53fb16
StdlibCollectionUnittest: use parameterized tests for out-of-range su…
gribozavr Apr 1, 2016
e43e25e
StdlibUnittest: add optimized overloads for expectEqualsUnordered()
gribozavr Apr 2, 2016
ffc0cab
StdlibCollectionUnittest: remove two slow tests
gribozavr Apr 1, 2016
3a2d7ce
split-generated-tests: filter out line markers
gribozavr Apr 2, 2016
6830edd
New indexing model: fix validation-test/stdlib/Unicode.swift
gribozavr Apr 2, 2016
a5ad2b8
Remove a test that was migrated to StdlibCollectionUnittest
gribozavr Apr 2, 2016
d26b257
stdlib: add a FIXME to the Slice implementation
gribozavr Apr 2, 2016
b34c419
StdlibCollectionUnittest: implement fast index(_:stepsFrom:) entry po…
gribozavr Apr 4, 2016
6985b95
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
gribozavr Apr 4, 2016
8965e53
New indexing model: fix the validation-test/stdlib/UnicodeTrie.swift.…
gribozavr Apr 4, 2016
e52b8d6
stdlib: underscore an internal function
gribozavr Apr 4, 2016
536107c
New indexing model: fix the validation-test/stdlib/StringViews.swift …
gribozavr Apr 4, 2016
eb5c6be
stdlib: indentation and coding style fixes
gribozavr Apr 4, 2016
3e8dd1f
New indexing model: fix the validation-test/stdlib/String.swift test
gribozavr Apr 4, 2016
1fe5f04
New indexing model: fix the validation-test/stdlib/Sort.swift.gyb test
gribozavr Apr 4, 2016
fde9261
Duplicate _Strideable declarations in Strideable
natecook1000 Apr 4, 2016
9c392bf
StdlibCollectionUnittest: generalize MutableCollection.SubSequence.su…
gribozavr Apr 5, 2016
cc417c1
Validation tests: remove tests that are duplicate with validation-tes…
gribozavr Apr 5, 2016
c83c42a
Merge pull request #2059 from natecook1000/nc-index-stride
gribozavr Apr 5, 2016
9e30bcb
Update some generics-focused tests for the new indexing model.
jopamer Apr 5, 2016
ccb7ae0
[stdlib] Drop Type suffixes in comments
Apr 4, 2016
1798fc8
[stdlib] Doc comment update WIP
Apr 5, 2016
173e954
test: update IDE and SourceKit tests due to stdlib changes.
nkcsgexi Apr 5, 2016
d591112
New indexing model: fix validation-test/stdlib/RangeReplaceable.swift…
gribozavr Apr 5, 2016
65044f2
New indexing model: fix validation-test/stdlib/NewArray.swift.gyb
gribozavr Apr 5, 2016
0bab6fc
StdlibUnittest: add a doc comment to LifetimeTracked, and remove a fixme
gribozavr Apr 5, 2016
af92162
Migrate validation-test/stdlib/NewArray.swift.gyb to LifetimeTracked
gribozavr Apr 5, 2016
db03708
[stdlib] De-underscore Range protocols
Apr 5, 2016
d417680
[stdlib] Kill mistakenly committed requirement
Apr 5, 2016
8e5c972
Kill an obsolete FIXME
Apr 5, 2016
5864117
[stdlib] De-underscore Range.init(uncheckedBounds:)
Apr 6, 2016
42732de
[stdlib][swift-3-indexing-model] fixing CollectionDiagnostics test
Apr 1, 2016
8209749
[stdlib][swift-3-indexing-model] fixing CoreAudio tests
Apr 1, 2016
5ad441f
[stdlib][swift-3-indexing-model] introducing new LazyCollections
Apr 6, 2016
94e944b
[stdlib] Update Range comments
Apr 6, 2016
be46928
[stdlib] Make Range == more generic
Apr 6, 2016
fa1538c
[stdlib] Make ClosedRange == more generic
Apr 6, 2016
9bbb01b
[stdlib] WIP updating ClosedRange comments.
Apr 6, 2016
b7a1b1d
Revert "[stdlib][swift-3-indexing-model] introducing new LazyCollecti…
Apr 6, 2016
912ac26
New indexing model: improve a FIXME
gribozavr Apr 6, 2016
9a3c8ef
stdlib: use gyb_stdlib_support in ExistentialCollection.swift.gyb
gribozavr Apr 6, 2016
b118cd3
Merge branch 'swift-3-indexing-model' of github.com:apple/swift into …
Apr 6, 2016
94771b4
[stdlib] Update indexing model doc comments
Apr 6, 2016
80cf117
[stdlib] Remove unreachable precondition failures
Apr 7, 2016
3e4e108
[stdlib] Clean up some diagnostics
Apr 7, 2016
fc5b8c2
[stdlib] Restore mistakenly killed preconditions
Apr 7, 2016
55fa270
StdlibCollectionUnittest: remove dead code
gribozavr Apr 7, 2016
6131df6
stdlib: make _preprocessingPass rethrowing and add tests
gribozavr Apr 7, 2016
79c75f0
StdlibCollectionUnittest: simplify code
gribozavr Apr 7, 2016
cd1bb19
[stdlib] New indexing model: Fix LazyFilterCollection index moving (#…
natecook1000 Apr 7, 2016
2cc9c3f
stdlib: remove incorrect @warn_unused_result attributes
gribozavr Apr 7, 2016
34773e9
[New indexing model] Revise documentation for collections
natecook1000 Apr 7, 2016
d072b23
[New indexing model] Revise documentation for ranges
natecook1000 Apr 7, 2016
d663e7e
[New indexing model] Revise documentation for closed ranges
natecook1000 Apr 7, 2016
afd064a
[New indexing model] Revisions to range documentation
natecook1000 Apr 8, 2016
6b77c6a
[New indexing model] Update documentation comments with new APIs
natecook1000 Apr 8, 2016
dcf23f3
[New indexing model] Clean up existential collection comments
natecook1000 Apr 8, 2016
1c3501f
[emacs support] Add swift-hide-doc-comment-detail
Apr 8, 2016
414030f
[emacs support] Add swift-hide-bodies
Apr 8, 2016
590f62f
[stdlib][swift-3-indexing-model] introducing new LazyCollections
Apr 6, 2016
6c56af5
[stdlib] splitting expressions with lazy to improve compilation time
Apr 7, 2016
1a875cb
[stdlib][swift-3-indexing-model] speeding up the compilation
Apr 8, 2016
3522af5
[New indexing model] Switch old index methods to internal
natecook1000 Apr 8, 2016
f947c7c
[New indexing model] Finish documentation revisions
natecook1000 Apr 8, 2016
b003344
When performing member lookup into a type during type-checking,
rjmccall Apr 8, 2016
97b0481
[New indexing model] Hide Range/CountableRange subscripts
natecook1000 Apr 8, 2016
e6b3643
[stdlib][swift-3-indexing-model] fixing ObjectiveC_without_Foundation…
Apr 8, 2016
2e75c81
[stdlib][swift-3-indexing-model] speeding up compilation of Concatena…
Apr 8, 2016
fee941f
[stdlib][swift-3-indexing-model] fixing usages of successor/predecess…
Apr 9, 2016
81fa3ee
StdlibCollectionUnittest: logging collections: update property names …
gribozavr Apr 9, 2016
d18775e
Make ExistentialCollection.swift test slightly easier for the type ch…
gribozavr Apr 9, 2016
4efc16b
StdlibUnittest: strengthen constraints in check*AssociatedTypes()
gribozavr Apr 9, 2016
9169c37
Use check*AssociatedTypes() on Set and Dictionary
gribozavr Apr 9, 2016
a200c7a
stdlib: new indexing model: implement slicing on AnyCollection
gribozavr Apr 9, 2016
f8f75a2
Make a crash test more self-contained
gribozavr Apr 9, 2016
f4987d0
stdlib: new indexing model: Forward more methods in AnyCollection
gribozavr Apr 6, 2016
d52cbab
Merge commit '0ff3239b962218267d37307e53906b31315a1cfc' into swift-3-…
gribozavr Apr 9, 2016
6e75d97
[stdlib] Clean up redundant protocol conformance
Apr 10, 2016
48fbd6b
[stdlib] Reorder protocol conformances
Apr 10, 2016
8634a57
Only check the minimal set of generic requirements when opening
rjmccall Apr 11, 2016
0124bd2
[stdlib][swift-3-indexing-model] un-commenting and un-spliting .lazy …
Apr 12, 2016
316c1b0
[stdlib][swift-3-indexing-model] implementing missing methods in Reverse
Apr 12, 2016
ed25c81
[stdlib] Keep uncheckedBounds out of examples.
Apr 11, 2016
df81c3e
[stdlib] 80-column fixes
Apr 12, 2016
4bbcf34
[stdlib] Generic conversion between range types
Apr 13, 2016
46e7757
Update test to refer to Comparable rather than BidirectionalIndex.
jopamer Apr 13, 2016
dbac26b
[sil-linker] Improve the implementation of the hasSILFunction API
swiftix Apr 13, 2016
e4f0338
Improve handling of pre-specializations.
swiftix Apr 13, 2016
932108b
[pre-specializations] Update the whitelist to match the recent stdlib…
swiftix Apr 13, 2016
01d0de2
Merge pull request #2174 from swiftix/swift-3-indexing-model
swiftix Apr 13, 2016
37bf02f
[stdlib][swift-3-indexing-model] changes in index(_:stepsFrom:limited…
Apr 14, 2016
10697f9
Merge commit '510f29abf77e202780c11d5f6c7449313c819030' into swift-3-…
gribozavr Apr 14, 2016
735f128
Merge remote-tracking branch 'origin/swift-3-indexing-model' into swi…
gribozavr Apr 14, 2016
5da7859
Fixup bad merge conflict resolution
gribozavr Apr 14, 2016
493e5c3
Update SIL test case for the removed conformance of SignedInteger to …
atrick Apr 14, 2016
3e708a9
Merge commit '8e292daec1bc790c96b5ee39b8d55dadcac6ce1b' into swift-3-…
gribozavr Apr 14, 2016
4c6865f
Merge remote-tracking branch 'origin/swift-3-indexing-model' into swi…
gribozavr Apr 14, 2016
c52787e
Merge commit '9cdbec13eee72feccfc5f8b987882a8c52e8107b' into swift-3-…
gribozavr Apr 14, 2016
cfea1a3
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
gribozavr Apr 15, 2016
2b35fea
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
gribozavr Apr 16, 2016
9596c6d
Adjust mangled names in the failing pre-specialization test. They now…
swiftix Apr 18, 2016
b08094a
Merge pull request #2232 from swiftix/swift-3-indexing-model
swiftix Apr 18, 2016
9f0d94c
CMake: add dependencies on common gyb modules in 'utils/'
gribozavr Apr 18, 2016
3e23907
stdlib: fix warnings about deprecated @noescape and @autoclosure syntax
gribozavr Apr 18, 2016
0c5933c
Regenerate expected output for doc_clang_module.swift and doc_swift_m…
gribozavr Apr 18, 2016
fc8d62d
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
gribozavr Apr 18, 2016
29c4926
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
gribozavr Apr 18, 2016
3d4378c
stdlib: add ABI fixmes
gribozavr Apr 18, 2016
989ec9a
stdlib: coding style (consistency with DictionaryIndex)
gribozavr Apr 18, 2016
a914414
Improve tests for Range* type inference and protection against subscr…
gribozavr Apr 19, 2016
ac9049c
Manually rebasing string diagnostic tests from @shawnce PR 1688
austinzheng Apr 18, 2016
3cb1e6d
Merge pull request #2235 from austinzheng/swift-3-indexing-model
gribozavr Apr 19, 2016
3dec7c1
[stdlib] Improve a doc comment
Apr 19, 2016
9a3d51d
[stdlib] Copy doc comments onto RangeReplaceableIndexable
Apr 19, 2016
859cf94
[emacs-support] Fix a bug in function body hiding
Apr 19, 2016
808d4af
[stdlib] Spell "subrange" consistently
Apr 20, 2016
ed91182
[stdlib] fix RangeReplaceable dispatch insanity
Apr 20, 2016
60c2fe0
[stdlib] fix 80-column violation
Apr 20, 2016
ab06cb0
[stdlib] Clean up some doc comments
Apr 20, 2016
1aeccae
stdlib: ranges: add the cheapest possible implementations of isEmpty
gribozavr Apr 20, 2016
94964ec
stdlib: ranges: remove duplicate code
gribozavr Apr 20, 2016
14bb1eb
stdlib: ranges: move common printing and reflection code to protocols…
gribozavr Apr 20, 2016
26b24d0
stdlib: ranges: add @warn_unused_result and propagate documentation f…
gribozavr Apr 20, 2016
6bd5a97
stdlib: ranges: remove requirements from RangeProtocol that only have…
gribozavr Apr 20, 2016
63d3d1a
[stdlib][swift-3-indexing-model] extensions for Collection and Bidire…
Apr 21, 2016
5b6e950
[stdlib] Accept generic ranges in String methods
Apr 20, 2016
adb8ade
[stdlib] Fix some test names.
Apr 20, 2016
41e94ac
stdlib: fix a bug in CountableClosedRange._customContainsEquatableEle…
gribozavr Apr 21, 2016
47a870c
[stdlib] Use location/formLocation for all index movement
Apr 21, 2016
13ed1a5
[emacs support] Fix bugs in function body hiding
Apr 21, 2016
54d81b6
Rewrite tests for _copyToNativeArrayBuffer() default implementations …
gribozavr Apr 22, 2016
520d4cc
stdlib: add ABI fixmes in String
gribozavr Apr 22, 2016
e1104af
[stdlib][swift-3-indexing-model] rephrasing doc comments
Apr 22, 2016
f0e605b
[stdlib][swift-3-indexing-model] added MutableCollection conformance …
Apr 22, 2016
ba8483a
[stdlib][swift-3-indexing-model] fixing sample code in Mirror to refl…
Apr 22, 2016
66472fa
[stdlib] Reindent / fix 80-column violations
Apr 22, 2016
f9c8f3b
[stdlib] Add test sanity
Apr 22, 2016
4e4480a
[stdlib] More 80-column cleanups
Apr 22, 2016
c099c1a
[stdlib] More precise testing for traps
Apr 22, 2016
fc39950
Remove an empty test
gribozavr Apr 22, 2016
99ac452
[stdlib] Test additional limited index movement cases
Apr 23, 2016
17cb21e
[stdlib] Move some test resources to StdlibCollectionUnittest
Apr 23, 2016
73647ef
[stdlib] Start gybbing CollectionUnitTest.swift
Apr 23, 2016
8e886a3
stdlib: ranges: remove range protocols
gribozavr Apr 21, 2016
0984f81
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
gribozavr Apr 23, 2016
77b4931
Fix compiler tests where the error text is different now
gribozavr Apr 23, 2016
5fcb003
Merge branch 'swift-3-indexing-model' of github.com:apple/swift into …
Apr 25, 2016
6e27491
[stdlib] Revise documentation for Array- and Set-related types.
natecook1000 Feb 22, 2016
099c395
Fix test expectation for SourceKit test that depends on stdlib docs
natecook1000 Apr 25, 2016
87de4ea
Merge pull request #2302 from natecook1000/nc-doc-revisions
amartini51 Apr 25, 2016
aa5aeb6
stdlib: reduce code duplication
gribozavr Apr 25, 2016
0375976
Update expected diagnostics in test/Constraints/diagnostics.swift
gribozavr Apr 25, 2016
2a07df4
XFAIL compiler tests that depend on stdlib implementation details
gribozavr Apr 25, 2016
e733a9b
[stdlib][swift-3-indexing-model] removing successor/predecessor from …
Apr 22, 2016
b75d2b9
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
gribozavr Apr 25, 2016
9f67e34
Fix a bad merge in test/ClangModules/attr-swift_name_renaming.swift
gribozavr Apr 25, 2016
1fd86e3
Remove the prototype for SE-0065 "A New Model for Collections and Ind…
gribozavr Apr 25, 2016
28060f0
[stdlib][swift-3-indexing-model] fixing tests for Linux
Apr 25, 2016
ae83236
[test] Update reference-dependencies.swift.
jrose-apple Apr 25, 2016
fc9c1f6
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
gribozavr Apr 26, 2016
5ec4252
stdlib: fix warnings and indentation
gribozavr Apr 26, 2016
d252217
Fix the Range test in optimized mode
gribozavr Apr 26, 2016
4f68420
stdlib: add LazyFilterBidirectionalCollection to preserve traversal kind
gribozavr Apr 26, 2016
5329749
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
gribozavr Apr 26, 2016
debde16
Merge set-api branch into swift-3-indexing-model
Apr 26, 2016
9bee5d1
[stdlib] location/formLocation => index/formIndex
Apr 27, 2016
263d6a4
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
gribozavr Apr 27, 2016
3fb4454
Update documentation comments for revised Set API
natecook1000 Apr 27, 2016
21df5f2
[stdlib] Fix errant tests
natecook1000 Apr 27, 2016
4f8fcb4
[stdlib][swift-3-indexing-model] __errno_index => __errno_location
Apr 27, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion apinotes/CoreGraphics.apinotes
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Functions:
- Name: CGRectUnion
SwiftName: "CGRect.union(self:_:)"
- Name: CGRectIntersection
SwiftName: "CGRect.intersect(self:_:)"
SwiftName: "CGRect.intersection(self:_:)"
- Name: CGRectContainsRect
SwiftName: "CGRect.contains(self:_:)"
- Name: CGRectContainsPoint
Expand Down
5 changes: 4 additions & 1 deletion benchmark/single-source/Hash.swift
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,10 @@ class SHA1 : Hash {

// Init the rest of the "W" buffer.
for t in 16..<80 {
w[t] = rol((w[t-3] ^ w[t-8] ^ w[t-14] ^ w[t-16]) ,1)
// splitting into 2 subexpressions to help typechecker
let lhs = w[t-3] ^ w[t-8]
let rhs = w[t-14] ^ w[t-16]
w[t] = rol(lhs ^ rhs, 1)
}

dataLength = 0
Expand Down
4 changes: 2 additions & 2 deletions benchmark/single-source/PopFrontGeneric.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ func _arrayReplace<B: _ArrayBufferProtocol, C: Collection
_ target: inout B, _ subRange: Range<Int>, _ newValues: C
) {
_precondition(
subRange.startIndex >= 0,
subRange.lowerBound >= 0,
"Array replace: subRange start is negative")

_precondition(
subRange.endIndex <= target.endIndex,
subRange.upperBound <= target.endIndex,
"Array replace: subRange extends past the end")

let oldCount = target.count
Expand Down
2 changes: 1 addition & 1 deletion benchmark/single-source/RangeAssignment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import TestsUtils

@inline(never)
public func run_RangeAssignment(_ scale: Int) {
let range = 100..<200
let range: Range = 100..<200
var vector = [Double](repeating: 0.0 , count: 5000)
let alfa = 1.0
let N = 500*scale
Expand Down
12 changes: 6 additions & 6 deletions benchmark/single-source/SetTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public func run_SetIsSubsetOf(_ N: Int) {

var isSubset = false;
for _ in 0 ..< N * 5000 {
isSubset = set.isSubsetOf(otherSet)
isSubset = set.isSubset(of: otherSet)
if isSubset {
break
}
Expand Down Expand Up @@ -57,7 +57,7 @@ public func run_SetExclusiveOr(_ N: Int) {

var xor = Set<Int>()
for _ in 0 ..< N * 100 {
xor = set.exclusiveOr(otherSet)
xor = set.symmetricDifference(otherSet)
}
sink(&xor)
}
Expand Down Expand Up @@ -99,7 +99,7 @@ public func run_SetIntersect(_ N: Int) {

var and = Set<Int>()
for _ in 0 ..< N * 100 {
and = set.intersect(otherSet)
and = set.intersection(otherSet)
}
sink(&and)
}
Expand Down Expand Up @@ -139,7 +139,7 @@ public func run_SetIsSubsetOf_OfObjects(_ N: Int) {

var isSubset = false;
for _ in 0 ..< N * 5000 {
isSubset = set.isSubsetOf(otherSet)
isSubset = set.isSubset(of: otherSet)
if isSubset {
break
}
Expand Down Expand Up @@ -168,7 +168,7 @@ public func run_SetExclusiveOr_OfObjects(_ N: Int) {

var xor = Set<Box<Int>>()
for _ in 0 ..< N * 100 {
xor = set.exclusiveOr(otherSet)
xor = set.symmetricDifference(otherSet)
}
sink(&xor)
}
Expand Down Expand Up @@ -210,7 +210,7 @@ public func run_SetIntersect_OfObjects(_ N: Int) {

var and = Set<Box<Int>>()
for _ in 0 ..< N * 100 {
and = set.intersect(otherSet)
and = set.intersection(otherSet)
}
sink(&and)
}
10 changes: 9 additions & 1 deletion benchmark/single-source/StaticArray.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,17 @@ struct A2X<T : StaticArrayProtocol> : StaticArrayProtocol {
func count() -> Int { return upper.count() + lower.count() }
}

struct StaticArray<T : StaticArrayProtocol> : StaticArrayProtocol, MutableCollection {
struct StaticArray<
T : StaticArrayProtocol
> : StaticArrayProtocol, RandomAccessCollection, MutableCollection {
init(_ defaultValue : T.ElemTy) { values = T(defaultValue) }
var values : T
func get(_ idx: Int) -> T.ElemTy { return values.get(idx) }
mutating func set(_ idx: Int,_ val : T.ElemTy) { return values.set(idx, val) }
func count() -> Int { return values.count() }

typealias Index = Int
typealias IndexDistance = Int
let startIndex: Int = 0
var endIndex: Int { return count()}

Expand All @@ -62,6 +65,11 @@ struct StaticArray<T : StaticArrayProtocol> : StaticArrayProtocol, MutableCollec
}

typealias Iterator = IndexingIterator<StaticArray>

subscript(bounds: Range<Index>) -> StaticArray<T> {
get { fatalError() }
set { fatalError() }
}
}

typealias SA2Int = StaticArray<A0<Int>>
Expand Down
3 changes: 2 additions & 1 deletion benchmark/single-source/StringInterpolation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@ public func run_StringInterpolation(_ N: Int) {
var result = 0
for _ in 1...reps {
let s = "\(anInt) abcdefdhijklmn \(aRefCountedObject) abcdefdhijklmn \u{01}"
let utf16 = s.utf16

// FIXME: if String is not stored as UTF-16 on this platform, then the
// following operation has a non-trivial cost and needs to be replaced
// with an operation on the native storage type.
result = result &+ Int(s.utf16[s.utf16.endIndex.predecessor()])
result = result &+ Int(utf16[utf16.index(before: utf16.endIndex)])
}
CheckResults(result == refResult, "IncorrectResults in StringInterpolation: \(result) != \(refResult)")
}
Expand Down
5 changes: 4 additions & 1 deletion cmake/modules/SwiftHandleGybSources.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ function(handle_gyb_sources dependency_out_var_name sources_var_name arch)
"${SWIFT_SOURCE_DIR}/utils/GYBUnicodeDataUtils.py"
"${SWIFT_SOURCE_DIR}/utils/SwiftIntTypes.py"
"${SWIFT_SOURCE_DIR}/utils/UnicodeData/GraphemeBreakProperty.txt"
"${SWIFT_SOURCE_DIR}/utils/UnicodeData/GraphemeBreakTest.txt")
"${SWIFT_SOURCE_DIR}/utils/UnicodeData/GraphemeBreakTest.txt"
"${SWIFT_SOURCE_DIR}/utils/gyb_stdlib_support.py"
"${SWIFT_SOURCE_DIR}/utils/gyb_stdlib_unittest_support.py"
)
foreach (src ${${sources_var_name}})
string(REGEX REPLACE "[.]gyb$" "" src_sans_gyb "${src}")
if(src STREQUAL src_sans_gyb)
Expand Down
12 changes: 12 additions & 0 deletions lib/SILOptimizer/Utils/Generics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,18 @@ bool swift::isWhitelistedSpecialization(StringRef SpecName) {
"_ContiguousArrayBuffer",
"Range",
"RangeIterator",
"CountableRange",
"CountableRangeIterator",
"ClosedRange",
"ClosedRangeIterator",
"CountableClosedRange",
"CountableClosedRangeIterator",
"IndexingIterator",
"Collection",
"MutableCollection",
"BidirectionalCollection",
"RandomAccessCollection",
"RangeReplaceableCollection",
"_allocateUninitializedArray",
"UTF8",
"UTF16",
Expand Down
30 changes: 15 additions & 15 deletions stdlib/internal/SwiftExperimental/SwiftExperimental.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ infix operator ⊉ { associativity left precedence 130 }
public func ∖ <
T, S: Sequence where S.Iterator.Element == T
>(lhs: Set<T>, rhs: S) -> Set<T> {
return lhs.subtract(rhs)
return lhs.subtracting(rhs)
}

/// Assigns the relative complement between `lhs` and `rhs` to `lhs`.
public func ∖= <
T, S: Sequence where S.Iterator.Element == T
>(lhs: inout Set<T>, rhs: S) {
lhs.subtractInPlace(rhs)
lhs.subtract(rhs)
}

/// - Returns: The union of `lhs` and `rhs`.
Expand All @@ -87,35 +87,35 @@ public func ∪ <
public func ∪= <
T, S: Sequence where S.Iterator.Element == T
>(lhs: inout Set<T>, rhs: S) {
lhs.unionInPlace(rhs)
lhs.formUnion(rhs)
}

/// - Returns: The intersection of `lhs` and `rhs`.
public func ∩ <
T, S: Sequence where S.Iterator.Element == T
>(lhs: Set<T>, rhs: S) -> Set<T> {
return lhs.intersect(rhs)
return lhs.intersection(rhs)
}

/// Assigns the intersection of `lhs` and `rhs` to `lhs`.
public func ∩= <
T, S: Sequence where S.Iterator.Element == T
>(lhs: inout Set<T>, rhs: S) {
lhs.intersectInPlace(rhs)
lhs.formIntersection(rhs)
}

/// - Returns: A set with elements in `lhs` or `rhs` but not in both.
public func ⨁ <
T, S: Sequence where S.Iterator.Element == T
>(lhs: Set<T>, rhs: S) -> Set<T> {
return lhs.exclusiveOr(rhs)
return lhs.symmetricDifference(rhs)
}

/// Assigns to `lhs` the set with elements in `lhs` or `rhs` but not in both.
public func ⨁= <
T, S: Sequence where S.Iterator.Element == T
>(lhs: inout Set<T>, rhs: S) {
lhs.exclusiveOrInPlace(rhs)
lhs.formSymmetricDifference(rhs)
}

/// - Returns: True if `x` is in the set.
Expand All @@ -132,54 +132,54 @@ public func ∉ <T>(x: T, rhs: Set<T>) -> Bool {
public func ⊂ <
T, S: Sequence where S.Iterator.Element == T
>(lhs: Set<T>, rhs: S) -> Bool {
return lhs.isStrictSubsetOf(rhs)
return lhs.isStrictSubset(of: rhs)
}

/// - Returns: True if `lhs` is not a strict subset of `rhs`.
public func ⊄ <
T, S: Sequence where S.Iterator.Element == T
>(lhs: Set<T>, rhs: S) -> Bool {
return !lhs.isStrictSubsetOf(rhs)
return !lhs.isStrictSubset(of: rhs)
}

/// - Returns: True if `lhs` is a subset of `rhs`.
public func ⊆ <
T, S: Sequence where S.Iterator.Element == T
>(lhs: Set<T>, rhs: S) -> Bool {
return lhs.isSubsetOf(rhs)
return lhs.isSubset(of: rhs)
}

/// - Returns: True if `lhs` is not a subset of `rhs`.
public func ⊈ <
T, S: Sequence where S.Iterator.Element == T
>(lhs: Set<T>, rhs: S) -> Bool {
return !lhs.isSubsetOf(rhs)
return !lhs.isSubset(of: rhs)
}

/// - Returns: True if `lhs` is a strict superset of `rhs`.
public func ⊃ <
T, S: Sequence where S.Iterator.Element == T
>(lhs: Set<T>, rhs: S) -> Bool {
return lhs.isStrictSupersetOf(rhs)
return lhs.isStrictSuperset(of: rhs)
}

/// - Returns: True if `lhs` is not a strict superset of `rhs`.
public func ⊅ <
T, S: Sequence where S.Iterator.Element == T
>(lhs: Set<T>, rhs: S) -> Bool {
return !lhs.isStrictSupersetOf(rhs)
return !lhs.isStrictSuperset(of: rhs)
}

/// - Returns: True if `lhs` is a superset of `rhs`.
public func ⊇ <
T, S: Sequence where S.Iterator.Element == T
>(lhs: Set<T>, rhs: S) -> Bool {
return lhs.isSupersetOf(rhs)
return lhs.isSuperset(of: rhs)
}

/// - Returns: True if `lhs` is not a superset of `rhs`.
public func ⊉ <
T, S: Sequence where S.Iterator.Element == T
>(lhs: Set<T>, rhs: S) -> Bool {
return !lhs.isSupersetOf(rhs)
return !lhs.isSuperset(of: rhs)
}
5 changes: 4 additions & 1 deletion stdlib/private/StdlibCollectionUnittest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@ add_swift_library(swiftStdlibCollectionUnittest SHARED IS_STDLIB
# filename.
StdlibCollectionUnittest.swift

CheckCollectionType.swift
CheckCollectionInstance.swift.gyb
CheckCollectionType.swift.gyb
CheckMutableCollectionType.swift.gyb
CheckRangeReplaceableCollectionType.swift
CheckRangeReplaceableSliceType.swift
CheckSequenceInstance.swift.gyb
CheckSequenceType.swift
LoggingWrappers.swift.gyb
MinimalCollections.swift.gyb
../../public/core/WriteBackMutableSlice.swift

PRIVATE_LINK_LIBRARIES ${swift_stdlib_unittest_private_link_libraries}
SWIFT_MODULE_DEPENDS StdlibUnittest
Expand Down
Loading