Commit Graph

173 Commits

Author SHA1 Message Date
Xin Tong
dca508bfbb This is part of a series of commits to remove reference forwarding for
some of the ARC entry points. rdar://22724641. After this commit,
swift_retain_noresult will be completely replaced by swift_retain.
LLVMARCOpts pass is modified NOT to rewrite swift_retain to
swift_retain_noresult which forward no reference.

Swift SVN r32082
2015-09-18 21:56:50 +00:00
Xin Tong
bc3fe169b4 This is part of a series of commits to remove reference forwarding for some of the ARC entry points. rdar://22724641.
After this commit, swift_retain will return no reference and LLVMARCContract pass is modified NOT to rewrite
swift_retain_noresult to old swift_retain which forwarded the reference.

Swift SVN r32075
2015-09-18 20:35:39 +00:00
Michael Gottesman
121ef3ef9f Revert the series of commits for removing the return value from swift_retain_noresult.
I asked that the patches were split up so I could do post commit review.

This reverts commit r32059.
This reverts commit r32058.
This reverts commit r32056.
This reverts commit r32055.

Swift SVN r32060
2015-09-18 02:31:24 +00:00
Xin Tong
4e46dacc3d Completely replace swift_retain_noresult with swift_retain. this is part of a series of commits
to remove reference forwarding for some of the ARC entry points. rdar://22724641. After this
commit, swift_retain_noresult will be completely replaced by swift_retain and LLVMARCOpts.cpp
will no longer canonicalize swift_retain to swift_retain_noresult as now swift_retain returns no
reference.

Swift SVN r32058
2015-09-18 01:51:17 +00:00
Xin Tong
955e4ed652 Change swift_retain/swift_retain_n to return no value. this is part of a series of commits
to remove reference forwarding for some of the ARC entry points. rdar://22724641. After this
commit, swift_retain will be the same as swift_retain_noresult, returning no reference.
LLVMARCContract pass is also modified NOT to rewrite swift_retain_noresult to the
old swift_retain which forwards the reference.

Swift SVN r32055
2015-09-18 00:41:35 +00:00
Xin Tong
275daaf750 recommiting. r31989. Implement weak/unowned retain_n/release_n entry points. rdar://22629226
Swift SVN r31991
2015-09-16 16:01:16 +00:00
Mark Lacey
fff32395cc Revert "Implement weak/unowned retain_n/release_n entry points. rdar://22629226"
This reverts commit r31989 because it broke the build due to a faulty
assert that fires in the refcounting unit test.

Swift SVN r31990
2015-09-16 06:15:31 +00:00
Xin Tong
206673b95d Implement weak/unowned retain_n/release_n entry points. rdar://22629226
Swift SVN r31989
2015-09-16 05:35:09 +00:00
David Farler
9e4d52c9cb Reinstate watchOS and other SDK overlays to build against the public SDKs.
Un-revert the below commits with the following addition:
add declarations for posix_spawn related APIs to SwiftPrivateDarwinExtras.
posix_spawn-related APIs aren't available in the public SDKs, so force past
the availability by creating our own stubs in the internal DarwinExtras
library.

r31244, r31245

CMake: build all platforms except watchOS using the public SDK

Covers rdar://problem/21145996.
A step towards rdar://problem/21099318.

Switch SDK overlays to use the public SDK

I had to cut the dependency on CrashReporterClient.h and reimplement
some of that code inline in the Swift runtime.  This shoud be OK (even
though not very clean), since the layout of CrashReporter sections is
ABI.

rdar://21099318

Swift SVN r31252
2015-08-14 22:09:49 +00:00
Dmitri Hrybenko
c75fc00cec Revert "CMake: build all platforms except watchOS using the public SDK"
This reverts commit r31244.  It broke the buildbot.

Swift SVN r31247
2015-08-14 18:56:15 +00:00
Dmitri Hrybenko
dd38372fb7 CMake: build all platforms except watchOS using the public SDK
Covers rdar://problem/21145996.
A step towards rdar://problem/21099318.

Swift SVN r31244
2015-08-14 17:26:04 +00:00
Slava Pestov
1628bfc3e2 SIL: Split dealloc_ref into [constructor] and [destructor] kinds
dealloc_ref [destructor] is the existing behavior. It expects the
reference count to have reached zero and the isDeallocating bit to
be set.

The new [constructor] variant first drops the initial strong
reference.

This allows DI to properly free uninitialized instances in
constructors. Previously this would fail with an assertion if the
runtime was built with debugging enabled.

Progress on <rdar://problem/21991742>.

Swift SVN r31142
2015-08-11 18:38:00 +00:00
Slava Pestov
89f2af6bb3 Random comment fixes split off from another patch, NFC
Swift SVN r31140
2015-08-11 18:37:52 +00:00
Mish Awadah
10bdef0936 Revert "CMake: build all platforms except watchOS using the public SDK"
This reverts commit cd3f1ba7d1ee2397817e1a165209fdeab8a1c004.

Reverting this b/c it is breaking buildbots with the following:
CMake Error at CMakeLists.txt:522 (message):
  CrashReporterClient library is required, but it was not found

Swift SVN r31047
2015-08-06 06:12:23 +00:00
Dmitri Hrybenko
271acdfcab CMake: build all platforms except watchOS using the public SDK
Covers rdar://problem/21145996.
A step towards rdar://problem/21099318.

Swift SVN r31041
2015-08-06 04:28:05 +00:00
Michael Gottesman
839a4d7737 Track retain_n and release_n in dtrace as single retains, releases.
Swift SVN r30395
2015-07-20 06:34:58 +00:00
Erik Eckstein
57c5de4491 [llvm-arc-opts] Optimize strong_retain_unowned/strong_release pairs.
Replaces a swift_retainUnowned/swift_release pair with a swift_checkUnowned, if possible.
For details see rdar://problem/21297936




Swift SVN r30262
2015-07-16 13:46:18 +00:00
Michael Gottesman
4ce5cdad17 [llvm-arc-opts] Implement swift_{retain,release}_n.
rdar://21803771

Swift SVN r30204
2015-07-15 00:03:03 +00:00
Joe Groff
a9e69dda79 IRGen/Runtime: Mark indirect cases in an enum's field type infos.
And use this information in EnumMirror to project boxed payloads when we encounter them.

Swift SVN r29866
2015-07-02 00:00:42 +00:00
Joe Groff
d7d3ff2b10 IRGen/Runtime: Keep the payload offset inside both compiler- and runtime-generated box metadata.
A missing link in our polymorphic box projection story, and likely a perf improvement for the generic case as well.

Swift SVN r29835
2015-07-01 04:51:56 +00:00
Joe Groff
2630dba793 Runtime: Rename Box2 functions to Box.
Swift SVN r29763
2015-06-27 18:10:17 +00:00
Joe Groff
8ec59e5c11 Runtime: Implementation for generic typed boxes.
Provide new swift_{alloc,dealloc,project}Box2 entry points that allocate, project, and deallocate typed boxes using runtime-instantiated metadata. Give these a new metadata kind, so that external tools recognize the difference and can interpret the metadata appropriately.

Swift SVN r29714
2015-06-26 00:06:17 +00:00
Dmitri Hrybenko
350248dae5 Reorganize the directory structure under 'stdlib'
The standard library has grown significantly, and we need a new
directory structure that clearly reflects the role of the APIs, and
allows future growth.

See stdlib/{public,internal,private}/README.txt for more information.

Swift SVN r25876
2015-03-09 05:26:05 +00:00