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
Alexis Beingessner
28656578be
Merge pull request #5850 from Gankro/empty
...
[runtime] statically initialize the empty Dictionary and Set singletons
2016-11-19 16:51:48 -05:00
Alexis Beingessner
ae648c1564
Merge pull request #5840 from Gankro/docit
...
minor cleanup in HashedCollections
2016-11-18 17:53:54 -05:00
Alexis Beingessner
21405f1ac1
[runtime] statically construct the Dictionary and Set singletons
2016-11-18 13:56:57 -05:00
Slava Pestov
9a4c0488ba
stdlib: SetIndex and DictionaryIndex can now be nested types of Set and Dictionary
...
Resolves ABI FIXME #34 and <rdar://problem/17002096>.
2016-11-18 00:39:15 -08:00
Alexis Beingessner
8caa9f4cd1
minor cleanup in HashedCollections
2016-11-17 13:33:15 -05:00
Alexis Beingessner
7536b9420e
Merge pull request #5722 from Gankro/unmanaged
...
Resolve ABI FIXME#158
2016-11-16 16:42:25 -05:00
swift-ci
67f4ae078b
Merge pull request #5723 from natecook1000/nc-fixes-05
2016-11-15 16:47:20 -08:00
Alexis Beingessner
ad0a9daf8f
Resolve ABI FIXME#158
2016-11-15 17:36:21 -05:00
Slava Pestov
ba72188927
stdlib: Fix resilient build
2016-11-14 18:03:11 -08:00
Nate Cook
bd6025f463
[stdlib] Various documentation fixes
...
- Fix incorrect type in Float(_:String) examples
- Expand discussions for ExpressibleBy_Literal protocols
- Add notes about non-escaping unsafe pointers from closures
- Add note about isEmpty to Collection.count discussions
- Describe imported `Bool` types
- Clean up some floating point discussions
- Provide some additional operator documentation
- Revise documentation for CVarArg functions
- Fix incorrect Set method parameter descriptions
- Clarify array bridging behavior
- Add collection subscript complexity notes
2016-11-11 11:23:49 -06:00
Alexis Beingessner
9ad14ea890
WIP fix resilience build
2016-11-08 19:12:26 -05:00
Alexis Beingessner
5fdd0c7b5b
revert _CocoaDictionaryBuffer indexing design
...
The use of a lazy var crashes the swift module (de)serializer.
2016-11-07 21:28:24 -05:00
practicalswift
4552fc8f88
[gardening] Use American English: "behaviour" → "behavior"
2016-11-05 20:33:57 +01:00
practicalswift
debeebaa3a
[gardening] Fix recently introduced typo: "nsenumator" → "nsenumerator"
2016-11-05 20:32:25 +01:00
Alexis Beingessner
e4c5e159c9
remove useless constant redefinition
2016-11-04 03:17:13 -04:00
Alexis Beingessner
3cdc8ec444
remove buffer header to eliminate optional traps
2016-11-04 02:44:29 -04:00
Alexis Beingessner
931f7ba658
actually used the cached keys/values pointer
2016-11-04 01:19:50 -04:00
Alexis Beingessner
5e776e5e39
cleanup initializers in HashedCollections
2016-11-04 01:19:50 -04:00
Alexis Beingessner
428cdac57c
leave FIXME for future dictionary bucaneers
2016-11-04 01:01:35 -04:00
Alexis Beingessner
a62f6c6a89
Fix incorrect bitcasts, refactor code to guard against this error.
2016-11-04 01:01:35 -04:00
Alexis Beingessner
b4d97776d8
more comment cleanups
2016-11-04 01:01:35 -04:00
Alexis Beingessner
731aa1494b
Properly if-def out bridging code.
2016-11-03 19:55:36 -04:00
Alexis Beingessner
bb0b4be7ac
Update comment to clarify why it's interesting, link a relevant impl.
2016-11-03 19:55:36 -04:00
Alexis Beingessner
8eea522e9c
rename storage type to be more useful
2016-11-03 19:52:30 -04:00
Alexis Beingessner
b1425ce78b
remove _'s from some variables that don't need it
2016-11-03 19:52:30 -04:00
Alexis Beingessner
41fb15f042
rename Buffer <---> Storage in HashedCollections to match conventions
2016-11-03 19:52:30 -04:00
Alexis Beingessner
3144870e86
add new toll-free bridge fast-paths to HashedCollections
2016-11-03 19:52:30 -04:00
Alexis Beingessner
a43c1dfba0
Some minor cleanups in HashedCollections:
...
* rename bridgingStorage to bridged
* add a missing fixLifetime
* remove useless temporary
2016-11-03 19:52:30 -04:00
Alexis Beingessner
f12d7914e8
update comments in HashedCollections to reflect new design
2016-11-03 19:52:30 -04:00
Alexis Beingessner
052e94a34a
refactor HashedCollections to support verbatim bridging
2016-11-03 19:52:30 -04:00
Alexis Beingessner
d179655952
refactor Dictionary to support an empty singleton
2016-11-03 19:52:30 -04:00
Alexis Beingessner
953e51a97e
[stdlib] Handle some outstanding Dictionary indexing-model FIXMEs/TODOs
2016-10-29 10:04:35 -04:00
Alexis Beingessner
b08732cbd4
[stdlib] Update Dictionary comments to reflect new design
2016-10-29 10:04:35 -04:00
Alexis Beingessner
76c6281fea
[stdlib] Rewriting native hashed collection indices
...
Changes:
- Native dictionary and set indices no longer hold references to storage
- Cocoa-based dictionary and set indices no longer hold references to storage
- Removed double indirection trick from hashed collections
- Rewrote storage types to reflect simpler model
- Updated unit tests
2016-10-29 10:04:35 -04:00
practicalswift
cc852042c9
[gardening] Fix accidental trailing whitespace.
2016-10-29 10:22:58 +02:00
Dave Abrahams
22f5dfa50a
Merge pull request #5264 from shajrawi/idasany_perf
...
improve set's conditional downcast performance by over 2X
2016-10-19 12:13:02 -07:00
Dave Abrahams
76b5afcc4a
Speed up Set/Dictionary init from Sequence
...
Alternative to #5264
2016-10-19 10:23:22 -07:00
Joe Shajrawi
eeae7e1f8c
improve set's conditional downcast performance by over 2X
2016-10-12 16:27:54 -07:00
Slava Pestov
fab574c3a7
stdlib: Add some @_versioned declarations to fix resilient build
...
A recent change made accessibility checking stricter. This had some
fallout on the half-baked @_versioned attribute, where we could no
longer define @_versioned members on a non-@_versioned type.
This was wrong anyway (and will be diagnosed when we add proper
diagnostics for @_versioned), because type metadata for the
internal type did not get the right linkage, but it used to work
as long as you didn't try to get the type metadata at runtime.
This patch adds @_versioned attributes to the right types now that
this broken behavior is gone.
As a result, _Variant{Set,Dictionary}Storage became resilient
(non-@_versioned internal types are not resilient), which broke
too many tests that assumed you can exhaustively switch over all
the cases. Since eager-bridging is going to eliminate this enum
anyway (or so I've heard), make it @_fixed_layout for now.
2016-09-30 18:28:11 -07:00
Erik Eckstein
5922aa8b14
stdlib: always inline the Set/Dictionary's _bucket function
...
If the Key is a class, then FunctionSignatureOpts cannot convert it to a @guaranteed parameter.
Using the new EpilogueARCAnalysis in FunctionSignatureOpts should fix that.
2016-09-20 16:34:51 -07:00
Erik Eckstein
8b1184708e
stdlib: replace _squeezeHashValue with a specialized version for power-of-2 ranges.
...
This function is only used for Set and Dictionary and there the range (which is the capacity) is always a power of 2.
2016-09-20 16:34:51 -07:00
Erik Eckstein
36ef0e6cd7
stdlib: specify to the optimizer that the capacity value of Dictionary/Set is never negative.
...
This removes some runtime checks.
2016-09-20 16:34:51 -07:00
Erik Eckstein
504361ff66
stdlib: Replace some _preconditions with _sanityChecks.
...
Those conditions should not fail with any user code. They just check the internal implementation of the stdlib.
This removes some runtime checks in the generated code with the optimized library.
2016-09-20 16:34:51 -07:00
airspeedswift
ed5231b47c
Numbered all FIXME(ABI) entries for tracking purposes. ( #4868 )
2016-09-19 16:41:41 -07:00
practicalswift
fa7fbdb8b0
[gardening] Remove redundant nil-initialization of optional variable
...
From the Swift documentation:
"If you define an optional variable without providing a default value,
the variable is automatically set to nil for you."
2016-09-18 07:40:07 +02:00
Erik Eckstein
312b0d8521
fix coding style
2016-09-16 11:14:36 -07:00
Erik Eckstein
b67959a6c1
stdlib: Use builtin tail-allocated arrays instead of ManagedBuffer to allocate Set and Dictionary buffers
...
This reduces the amount of SIL generated for Set/Dictionary operations significantly.
The generated code should be mostly the same (modulo different inlining decisions).
2016-09-16 11:02:19 -07:00
Dmitri Gribenko
30856bf094
stdlib: add complexity docs to Set.removeFirst()
2016-09-15 22:04:46 -07:00
Dmitri Gribenko
fbb3cf35a5
Revert "New SIL instructions to support tail-allocated arrays in SIL."
2016-09-15 00:25:25 -07:00