Erik Eckstein
2e4ecb425e
stdlib: make the destructor of _SwiftNativeNSArrayWithContiguousStorage inlinable on linux
...
... as it is for ObjC runtimes.
This is need for the optimizer to do certain optimizations, like object outlining.
rdar://problem/34758773
2018-01-19 11:32:35 -08:00
eeckstein
b126b62256
Revert "Optimization changes to completely fold OptionSet literals"
2018-01-18 22:05:07 -08:00
Erik Eckstein
228bf53f27
stdlib: make the destructor of _SwiftNativeNSArrayWithContiguousStorage inlinable on linux
...
... as it is for ObjC runtimes.
This is need for the optimizer to do certain optimizations, like object outlining.
rdar://problem/34758773
2018-01-18 18:27:17 -08:00
Slava Pestov
d0d4b61837
stdlib: Fix resilient build on Linux
2017-12-20 23:42:08 -08: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
Slava Pestov
278425a62a
stdlib: Remove unnecessary @_inlineable and @_versioned declarations
2017-10-31 13:37:38 -07:00
Max Moiseev
a24998a5b1
[stdlib] Add missing @_fixed_layout attributes to fix resilience build
2017-10-02 15:19:06 -07:00
Maxim Moiseev
98b875a6e5
Fix compilation errors
2017-09-29 11:26:56 -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
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
Slava Pestov
2141c1515b
stdlib: Remove obsolete FIXME: comment
2017-03-23 22:20:08 -07:00
Roman Levenstein
29ad714bb7
Annotate stdlib functions to get a good performance even in resilient mode, when -sil-serialize-all is disabled
...
This commit mostly improves the performance of arrays and ranges.
It does not cover Strings, Dictionaries and Sets yet.
2017-03-16 19:46:11 -07:00
practicalswift
6d1ae2a39c
[gardening] 2016 → 2017
2017-01-06 16:41:22 +01: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
ben-cohen
d34f3ee96d
Remove dummy Void args working around fixed typechecker bug – ABI FIXME #26
2016-10-11 17:56:42 -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
266a5f90bd
stdlib: Use builtin tail-allocated arrays instead of ManagedBuffer to allocate contiguous array buffers.
...
This reduces the amount of SIL generated for array operations significantly.
The generated code should be mostly the same (modulo different inlining decisions).
2016-09-16 11:02:19 -07:00
Dmitri Gribenko
fbb3cf35a5
Revert "New SIL instructions to support tail-allocated arrays in SIL."
2016-09-15 00:25:25 -07:00
Erik Eckstein
1201d96cb2
stdlib: Use builtin tail-allocated arrays instead of ManagedBuffer to allocate contiguous array buffers.
...
This reduces the amount of SIL generated for array operations significantly.
The generated code should be mostly the same (modulo different inlining decisions).
2016-09-14 14:54:18 -07:00
Nicholas Maccharoli
e8b15ca17d
[stdlib] simplify repeat to while
2016-09-02 12:06:01 +09:00
Michael Ilseman
b7c9eddd11
[noescape by default] drop @noescape from stdlib
2016-08-04 16:09:01 -07:00
Rintaro Ishizaki
091506315b
[SE-0101] Implement: Reconfiguring sizeof and related functions into MemoryLayout struct
...
As of now:
* old APIs are just marked as `deprecated` not `unavaiable`. To make it
easier to co-operate with other toolchain repos.
* Value variant of API is implemented as public @private
`_ofInstance(_:)`.
2016-07-30 03:09:28 +09:00
Andrew Trick
0b75ee975e
Remove "illegal" UnsafePointer casts from the stdlib.
...
Update for SE-0107: UnsafeRawPointer
This adds a "mutating" initialize to UnsafePointer to make
Immutable -> Mutable conversions explicit.
These are quick fixes to stdlib, overlays, and test cases that are necessary
in order to remove arbitrary UnsafePointer conversions.
Many cases can be expressed better up by reworking the surrounding
code, but we first need a working starting point.
2016-07-28 20:42:23 -07:00
Andrew Trick
c125528600
Use a UnsafeMutableRawPointer in SwiftNativeNSArray.getObjects()
...
In order to conform to the memory model.
2016-07-27 08:05:55 -07:00
Luke Larson
74e0498015
Revert "Update master to build with Xcode 8 beta 3, OS X 10.12, iOS 10, tvOS 10, and watchOS 3 SDKs."
...
This reverts commit 62d1fa760c .
2016-07-19 15:18:17 -07:00
Mishal Shah
62d1fa760c
Update master to build with Xcode 8 beta 3, OS X 10.12, iOS 10, tvOS 10, and watchOS 3 SDKs.
2016-07-19 22:31:34 +02:00
Andrew Trick
0230efc614
Rename UnsafePointer assign/initialize and eliminate Backward variants. ( #3585 )
...
Also fixes the comments to clarify that source and self memory
must be disjoint.
2016-07-18 15:15:47 -07:00
Chris Lattner
4fd8418ba7
move the stdlib to put noescape and autoclosure on the type, instead of
...
the parameter. Progress towards SE-0049.
2016-04-14 23:13:43 -07:00
Jordan Rose
bc83940301
Make pointer nullability explicit using Optional.
...
Implements SE-0055: https://github.com/apple/swift-evolution/blob/master/proposals/0055-optional-unsafe-pointers.md
- Add NULL as an extra inhabitant of Builtin.RawPointer (currently
hardcoded to 0 rather than being target-dependent).
- Import non-object pointers as Optional/IUO when nullable/null_unspecified
(like everything else).
- Change the type checker's *-to-pointer conversions to handle a layer of
optional.
- Use 'AutoreleasingUnsafeMutablePointer<NSError?>?' as the type of error
parameters exported to Objective-C.
- Drop NilLiteralConvertible conformance for all pointer types.
- Update the standard library and then all the tests.
I've decided to leave this commit only updating existing tests; any new
tests will come in the following commits. (That may mean some additional
implementation work to follow.)
The other major piece that's missing here is migration. I'm hoping we get
a lot of that with Swift 1.1's work for optional object references, but
I still need to investigate.
2016-04-11 20:06:38 -07: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
Max Moiseev
4da439d406
copy(withZone:) => copy(with:) in ShadowProtocols
2016-03-08 15:50:59 -08:00
Dmitri Gribenko
3c93ccc4f7
stdlib: apply API guidelines and fix coding style in SwiftNativeNSArray.swift
2016-02-24 19:55:57 -08:00
Dave Abrahams
64a5165ecf
stdlib: deinitializePointee(_) => deinitialize()
...
Tacking "Pointee" on just for unary operations (and especially
operations with an optional count) created inconsistency.
2016-02-23 15:34:20 -08:00
Max Moiseev
40b1a0b7e0
[stdlib] all sorts of require renamed back to precondition
2016-02-19 18:21:29 -08:00
Dmitri Gribenko
dd75aed67a
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2016-02-17 14:40:05 -08:00
Dmitri Gribenko
efaa39ea79
stdlib: add first argument labels and some other changes to conform to API guidelines
2016-02-15 23:47:54 -08:00
Max Moiseev
3a3984877a
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2016-02-15 15:43:34 -08:00
Dmitri Gribenko
9bcd5a1056
Collection.length => .count
2016-01-22 18:41:19 -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
Doug Gregor
2091e7f852
Merge remote-tracking branch 'origin/swift-3-api-guidelines' into swift-3-omit-needless-words
2015-12-18 10:54:46 -08: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
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
Maxim Moiseev
e6468a0eca
_precondition => _require
2015-12-16 17:19:01 -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
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
Dmitri Gribenko
3d0ad16094
Unsafe[Mutable]Pointer.memory => .pointee
2015-12-16 15:50:31 -08:00
Doug Gregor
2f5f94a12c
Merge remote-tracking branch 'origin/swift-3-api-guidelines' into swift-3-omit-needless-words
2015-12-15 17:11:37 -08:00