Graham Batty
98586b32e5
stdlib: Move withUnsafePointer(s) to LifetimeManager.swift.
...
Swift SVN r23210
2014-11-10 20:05:48 +00:00
Graham Batty
9524ca20b3
stdlib: Move _nilRawPointer to Builtin.swift
...
Swift SVN r23209
2014-11-10 20:05:26 +00:00
Graham Batty
373414864d
Revert "Use config directives to carve out a 'portable' kernel stdlib."
...
This reverts commit r23202 pending further discussion.
Swift SVN r23205
2014-11-10 18:46:42 +00:00
Graham Batty
dfa260fab1
Use config directives to carve out a 'portable' kernel stdlib.
...
Swift SVN r23202
2014-11-10 18:03:09 +00:00
Dave Abrahams
2cf30d2661
[stdlib] Nix stale comment
...
Swift SVN r23198
2014-11-09 07:44:29 +00:00
Dave Abrahams
2942359d81
[stdlib] Kill unused enum
...
Swift SVN r23196
2014-11-09 06:23:23 +00:00
Dave Abrahams
3475aa6dd6
[stdlib] use sanity-checked downcasts
...
Avoid type punning except where absolutely necessary
Swift SVN r23195
2014-11-09 06:20:46 +00:00
Dave Abrahams
cb27b7d821
[stdlib] Excise unsafeBitCasts from SliceBuffer
...
Swift SVN r23192
2014-11-09 04:53:35 +00:00
Dave Abrahams
c20389583c
[stdlib] Drop needless unsafeBitCast
...
Swift SVN r23191
2014-11-09 04:53:34 +00:00
Dave Abrahams
2c48f57c30
[stdlib] Sanity checks for empty array buffer
...
Swift SVN r23190
2014-11-09 04:53:33 +00:00
Dave Abrahams
057d680726
[stdlib] Kill off some needless downcasting
...
We're still casting down, but only to the common base of all native
array buffers. Given that native buffers might turn out to be the empty
array buffer, this eliminates some evil type punning.
Swift SVN r23187
2014-11-09 03:46:27 +00:00
Dave Abrahams
2794fe3a13
[stdlib] Restore a combination of 11 commits
...
...but remove all new uses of closures, to make things easier on the
optimizer.
Swift SVN r23183
2014-11-08 20:04:29 +00:00
Dave Abrahams
cb80bb3057
[stdlib] ManagedBuffer: closure-free internal APIs
...
We want to see if this will be easier for the the optimizer to handle.
Swift SVN r23182
2014-11-08 20:04:27 +00:00
Maxwell Swadling
10464d0478
Added Comparable to ObjectIdentifier
...
Swift SVN r23172
2014-11-08 02:06:24 +00:00
Arnold Schwaighofer
26b50b8115
stdlib: Don't inline _uninitializeCopy
...
Again there is a loop that blocks retain/release matching.
The ARC optimizer is conservative and currently stops at loops.
This will get exposed by Dave's array patches.
rdar://18777237
Swift SVN r23134
2014-11-06 21:17:40 +00:00
Arnold Schwaighofer
8644e9c93c
stdlib: Don't inline copyBuffer
...
copyBuffer contains a copy loop which will prevent retain/release matching
across it.
This fixes a 50% regression in MatMul after applying Dave's array patches.
rdar://18777237
Swift SVN r23133
2014-11-06 21:17:39 +00:00
Arnold Schwaighofer
63623ed6bf
stdlib: only build a sub-range if we need to type check
...
Creating a range creates overflow checks, since we don't do anything with the
range in the case of value types these checks were truly superflous, and not
always cleaned up by llvm.
rdar://18777237
Swift SVN r23132
2014-11-06 21:17:39 +00:00
Joe Groff
af0121f8e6
IRGen: Don't nonlazily realize classes (unless they ask).
...
We lazily realize classes when we access their metadata now, so there's no need to force the ObjC runtime to do this greedily anymore, except for classes that the runtime statically references. For those cases, add an @objc_non_lazy_realization class attribute that will put that class reference in the nlclslist section.
Swift SVN r23105
2014-11-05 00:19:37 +00:00
Chris Willmore
22f2452909
Only allow labeled parameters with function type to claim trailing closures, as opposed to any unlabeled argument.
...
For real this time. Added some additional tests.
rdar://problem/18778670
Swift SVN r23094
2014-11-04 03:40:08 +00:00
Chris Willmore
da2e3c4c73
Revert "Only allow labeled parameters with function type to claim trailing closures, as opposed to any unlabeled argument."
...
The commit broke the PerfTestSuite build:
/Users/buildslave/jenkins/sharedspace/swift-release-asserts/swift/src/tools/swift/benchmark/PerfTestSuite/SingleSource/DollarChain.swift:30:14:
error: missing argument label 'function:' in call
$.tap(beatle, {$0.name = "Beatle"}).color = "Blue"
This reverts commit r23090.
Swift SVN r23093
2014-11-04 02:19:10 +00:00
Chris Willmore
f64bdb3021
Only allow labeled parameters with function type to claim trailing closures, as opposed to any unlabeled argument.
...
rdar://problem/18778670
Swift SVN r23090
2014-11-03 22:22:48 +00:00
Dmitri Hrybenko
e0c7bb7cec
CMake: mark essential stdlib as target library
...
Swift SVN r23084
2014-11-03 16:58:15 +00:00
Dmitri Hrybenko
e954ac9534
CMake: normalize checks for Apple operating systems
...
Swift SVN r23056
2014-11-01 04:14:36 +00:00
Dave Abrahams
d2a7b58f03
[stdlib] Remove all FIXMEs from doc comments
...
Fixes <rdar://problem/18457701>
Swift SVN r23007
2014-10-29 19:35:25 +00:00
Dave Abrahams
73956eb509
[stdlib] Better predicate docs/name for lexicographicalCompare
...
Swift SVN r23006
2014-10-29 19:00:08 +00:00
Dave Abrahams
05abe4d996
[stdlib] public init for EmptyGenerator
...
Fixes <rdar://problem/17758868>
Swift SVN r23005
2014-10-29 17:43:49 +00:00
Dave Abrahams
c77d7e353c
Revert a combination of 11 commits
...
These commits are suspected of causing performance regressions:
r22995, "[stdlib] Array nil state elimination, part trois"
r22994, "[stdlib] Array nil-state elimination II"
r22993, "[stdlib] Array nil-state elimination I"
r22992, "[stdlib] Still more nil buffer elimination"
r22991, "[stdlib] Nix an unneeded typealias"
r22988, "[stdlib] Nix _ContiguousArrayBuffer._base, part deux"
r22986, "[stdlib] Kill _ContiguousArrayBuffer._base, part I"
r22985, "[stdlib] destroy redundant property"
r22975, "[stdlib] More array nil-state destruction"
r22974, "[stdlib] Construct HeapBuffer without AnyObject"
r22959, "[stdlib] non-nil ContiguousArray"
Swift SVN r23001
2014-10-29 02:57:45 +00:00
Dave Abrahams
5957b8bc3e
[stdlib] Array nil state elimination, part trois
...
Array<T> now has no nil state. It still has an indirection when T is a
class type.
Swift SVN r22995
2014-10-28 21:32:27 +00:00
Dave Abrahams
e7fb0ea3dd
[stdlib] Array nil-state elimination II
...
Had to XFAIL one test: <rdar://problem/18800316>
SILPasses/array_mutable.swift test is fragile
Swift SVN r22994
2014-10-28 19:53:32 +00:00
Dave Abrahams
c9622352c6
[stdlib] Array nil-state elimination I
...
Swift SVN r22993
2014-10-28 19:53:31 +00:00
Dave Abrahams
f7bf9bf16d
[stdlib] Still more nil buffer elimination
...
Swift SVN r22992
2014-10-28 18:00:55 +00:00
Dave Abrahams
8ced867315
[stdlib] Nix an unneeded typealias
...
Swift SVN r22991
2014-10-28 18:00:51 +00:00
Dave Abrahams
7a1463e4ec
[stdlib] Nix _ContiguousArrayBuffer._base, part deux
...
This commit eliminates (finally) the nil state from
_ContiguousArrayBuffer.
Swift SVN r22988
2014-10-28 03:58:41 +00:00
Dave Abrahams
838fc13011
[stdlib] Drop unused operators
...
Swift SVN r22987
2014-10-28 03:58:40 +00:00
Dave Abrahams
c06e89960b
[stdlib] Kill _ContiguousArrayBuffer._base, part I
...
Remove external dependencies
Swift SVN r22986
2014-10-28 03:58:40 +00:00
Dave Abrahams
cc0c66df75
[stdlib] destroy redundant property
...
Swift SVN r22985
2014-10-28 03:58:39 +00:00
Dave Abrahams
788cb848e0
[stdlib] Fix idiotic bug in ManagedBufferPointer
...
Found by inspection. I tried long and hard to think of a test that
would detect this bug, and even tried to write quite a few, but none
would be triggered. Bright ideas most welcome.
Commits to come, however, in the presence of this bug, cause around 25
failures in the stdlib test suite, so at least this won't regress.
Swift SVN r22984
2014-10-28 03:41:49 +00:00
Dave Abrahams
7c8364fb52
[stdlib] More array nil-state destruction
...
Baby steps.
Swift SVN r22975
2014-10-27 22:36:24 +00:00
Dave Abrahams
84a955d987
[stdlib] Construct HeapBuffer without AnyObject
...
The existential was causing the optimizer problems.
Swift SVN r22974
2014-10-27 21:48:38 +00:00
Graham Batty
eaf22e9661
Make malloc_size a platform stub called swift_malloc_size.
...
Swift SVN r22971
2014-10-27 17:16:24 +00:00
Erik Eckstein
f82dbb8176
Revert "[stdlib] Make some structs public which adopt MirrorType, because the conformances are accessed in Reflection.nm"
...
Commited by mistake. Accessing a protocol conformance from "outside" does not require the conforming type to be pulic.
Swift SVN r22968
2014-10-27 15:37:33 +00:00
Erik Eckstein
f0a36557e1
[stdlib] Make some structs public which adopt MirrorType, because the conformances are accessed in Reflection.nm
...
Swift SVN r22967
2014-10-27 15:19:14 +00:00
Erik Eckstein
e7ddfe4dde
[stdlib] Make ArrayType public because it is accessed from tests.
...
Swift SVN r22966
2014-10-27 15:08:24 +00:00
Dave Abrahams
46846c4ec1
Revert "[stdlib] _ArrayBufferType: drop baseAddress"
...
This reverts r22950 because the optimizer can't yet eliminate the
abstraction penalty of closures.
Swift SVN r22963
2014-10-27 13:06:54 +00:00
Dave Abrahams
1adda3e81b
[stdlib] non-nil ContiguousArray
...
This is the barest-minimum change required to ensure that the buffer is
never nil. Codegen problems were crushing all more-ambitious
efforts (radar to follow)
Swift SVN r22959
2014-10-27 05:02:44 +00:00
Dave Abrahams
6daf5cf8dc
[stdlib] Don't use AnyObject.self as ClassMetadata
...
Works around <rdar://problem/18777102>, and is smaller code to boot.
Swift SVN r22958
2014-10-27 04:45:46 +00:00
Dave Abrahams
f07b42ee9a
[stdlib] replace an assign with a swap
...
Theoretically, this should cut down retain/release traffic
Swift SVN r22957
2014-10-27 04:45:46 +00:00
Dave Abrahams
60e79b7560
[stdlib] Replace an unsafeBitCast
...
Swift SVN r22956
2014-10-27 04:45:45 +00:00
Joe Groff
24570fecc9
De-intrinsify and remove the _does*OptionalHaveValue functions.
...
Swift SVN r22955
2014-10-26 22:34:31 +00:00
Dave Abrahams
35a2584024
[stdlib] Work around rdar://18619176
...
Force a use of the value addressor so the linker doesn't drop it.
Swift SVN r22952
2014-10-26 21:37:41 +00:00