Dmitri Gribenko
9d4d9e8d41
Fix coding style in Stride.swift
2015-12-17 17:06:41 -08:00
Maxim Moiseev
9e50505970
internal or public // @testable initializers
2015-12-17 17:02:49 -08:00
Dmitri Gribenko
b580d55dfb
ObjectIdentifier.uintValue => {Int,UInt}.init(_: ObjectIdentifier)
2015-12-17 16:32:11 -08:00
Dmitri Gribenko
6eedc99016
UnicodeDecodingResult: case Result(...) => case ScalarValue(...)
2015-12-17 16:31:49 -08:00
Dmitri Gribenko
a97a0ddf2a
StaticString.stringValue => String.init(_:T)
2015-12-17 16:30:55 -08:00
Dmitri Gribenko
4cd48e0f56
public class VaListBuilder => internal class _VaListBuilder
2015-12-17 16:28:39 -08:00
Dmitri Gribenko
fef2d5db60
Remove IOU(Wrapped?) initializer, we prefer to use the implicit conversion instead
2015-12-17 16:28:20 -08:00
Dmitri Gribenko
6b2ad53f80
Remove no-arg initializers from Optional and IOU
...
We prefer 'nil' to be used instead.
2015-12-17 16:28:08 -08:00
Dmitri Gribenko
11855e40b2
Remove ImplicitlyUnwrappedOptional.{map,flatMap}
...
It is not possible to call these functions by usual means.
2015-12-17 16:27:23 -08:00
Maxim Moiseev
e7d516e597
String.lowercaseString and .uppercaseString => lowercased and uppercased
2015-12-17 16:26:32 -08:00
Dmitri Gribenko
9096a960ff
countStrings() => digits() in docs and tests
2015-12-17 16:25:07 -08:00
Dmitri Gribenko
15a9649062
Repeated(repeating:length:) => repeatElement(_:count:)
2015-12-17 16:24:47 -08:00
Dmitri Gribenko
33bda61fa7
var Repeated.length => let
2015-12-17 16:24:21 -08:00
Dmitri Gribenko
86f1258810
Repeat => Repeated
2015-12-17 16:24:11 -08:00
Patrick Pijnappel
7e96565c1a
[stdlib] Remove explicit Equatable implementation for FloatingPointClassification
2015-12-18 11:04:12 +11:00
Dmitri Gribenko
73ce9ae7e9
Collection.count => .length
...
And other API changes that naturally fall out from this, like
Array(repeating:count:) => Array(repeating:length:).
2015-12-17 15:55:29 -08:00
Patrick Pijnappel
a61839d696
[stdlib] Add ordering guarantee to min() and max() docs
2015-12-18 09:51:34 +11:00
Doug Gregor
f245f18a09
Merge remote-tracking branch 'origin/swift-3-api-guidelines' into swift-3-omit-needless-words
2015-12-17 11:35:58 -08:00
Max Moiseev
3fe0c60d7f
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2015-12-17 11:00:02 -08:00
Max Moiseev
a28a510407
Fixing tests
2015-12-17 10:24:40 -08:00
Chris Lattner
99fcb2dfe1
Change all uses of x = x.successor() to use x._successorInPlace()
...
...because it is apparently more efficient in some cases. Technically
we don't do this in ALL places, because it would be unfortunate if
the implementation of _successorInPlace() were self recursive :-)
2015-12-16 22:38:37 -08:00
Daniel Duan
b177c69d6b
skip copying old values during removeAll()
...
As noted in FIXME(performance), calling `.removeAll(keepCapacity: true)` on a
containter of type Dictionay or Set causes a copy of its storage being made.
Only then, it would proceed to delete each element.
This patch makes these hashed collections skip the wasteful copying step.
2015-12-16 22:28:38 -08:00
zerotypos-found
0c1df3577e
Fix typo: a --> an, an --> a.
2015-12-17 15:10:25 +09:00
Patrick Pijnappel
fe478b7633
[stdlib] Add sort stability comment to min()/max()
2015-12-17 14:17:50 +11:00
Patrick Pijnappel
75a6609c61
[stdlib] Unabbreviate local variable names
2015-12-17 14:07:58 +11:00
Patrick Pijnappel
370f4f0de4
[stdlib] Refactor min(_:_:_:_:)
2015-12-17 14:00:03 +11:00
Patrick Pijnappel
220f2d1c89
[stdlib] Refactor min(_:_:)
2015-12-17 13:59:48 +11:00
Maxim Moiseev
ee7d55f74b
moving unsafeUnwrap into Optional
2015-12-16 17:24:12 -08:00
Maxim Moiseev
c4763ae686
_debugPrecondition => _debugRequire
2015-12-16 17:20:40 -08:00
Maxim Moiseev
e6468a0eca
_precondition => _require
2015-12-16 17:19:01 -08:00
Maxim Moiseev
f2f50d6a9d
precondition => require
2015-12-16 17:16:08 -08:00
Maxim Moiseev
9d0c912c70
Merging UnsafePointer.deinitializePointee
...
An optimization should be added in order for the new one to be
efficient, i.e. if the `count` value is equal to `1`, the underlying
`Builtin.destroy` should be called, instead of
`Builtin.destroyArray`.
2015-12-16 17:15:00 -08:00
Maxim Moiseev
38323513ea
UnsafePointer.move() => .take()
2015-12-16 17:13:39 -08:00
Maxim Moiseev
e1f304f758
Adding count to initializeMemory
...
The corresponding test started to fail because of the `_debugPrecodition`
in the implementation of `initializeMemory`.
2015-12-16 17:12:43 -08:00
Maxim Moiseev
6c50752aed
UnsafePointer: initializeMemory and deinitializePointee
2015-12-16 17:11:57 -08:00
Maxim Moiseev
0e54467bfa
Final bulk removal of Type suffix
2015-12-16 17:06:19 -08:00
Maxim Moiseev
2a161bdd62
_ArrayBufferType => _ArrayBufferProtocol
2015-12-16 15:53:40 -08:00
Maxim Moiseev
db84df9eab
_ArrayType => _ArrayProtocol
2015-12-16 15:53:27 -08:00
Maxim Moiseev
ca932fca5a
CVarArgType => CVarArg
2015-12-16 15:52:01 -08:00
Dmitri Gribenko
3d0ad16094
Unsafe[Mutable]Pointer.memory => .pointee
2015-12-16 15:50:31 -08:00
Dmitri Gribenko
f1dbe205a3
UnsafeMutablePointer.dealloc(_:) => .deallocateCapacity(_:)
2015-12-16 15:47:58 -08:00
Dmitri Gribenko
1f70e25899
UnsafeMutablePointer.alloc(_:) => UnsafeMutablePointer(allocatingCapacity:)
2015-12-16 15:45:48 -08:00
Dmitri Gribenko
4e8291fcfb
Coding style fixes
2015-12-16 15:30:56 -08:00
Max Moiseev
fca25fbeb9
Comment improvements and test fixes
2015-12-16 15:29:52 -08:00
Patrick Pijnappel
58bc25bed6
[stdlib] Add comment
2015-12-17 10:15:45 +11:00
Patrick Pijnappel
8d1261ed22
[stdlib] Fix Int(_:radix:) accepting unintentional cases (SR-187)
2015-12-17 10:12:36 +11:00
Dmitri Gribenko
339c7a99dc
Remove no-argument initializers from unsafe pointer types
...
The preferred way to create a nil pointer is to use the 'nil' literal.
Affected types:
AutoreleasingUnsafeMutablePointer
OpaquePointer
UnsafeMutablePointer
UnsafePointer
2015-12-16 14:59:50 -08:00
Patrick Pijnappel
0998e38ef4
[stdlib] Fix internal doc comment
2015-12-17 09:57:53 +11:00
Dmitri Gribenko
8e5686d563
Fix coding style
2015-12-16 14:55:09 -08:00
Dmitri Gribenko
152ef15f83
Improve comments on unsafe pointers
2015-12-16 14:54:57 -08:00