Skip to content

New refcount representation #5282

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 44 commits into from
Feb 24, 2017
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
79f090f
WIP: New refcount representation.
Aug 30, 2016
fcdf121
WIP: New refcount representation.
Aug 30, 2016
dcd0f51
WIP: Bias strong refcount. Add strong refcount overflow checking.
Sep 1, 2016
46228cf
WIP: Side table. Separate weak refcount.
Sep 9, 2016
c734c9a
Add long test infrastructure for test/Unit. Use it for max-refcount t…
Sep 1, 2016
43c1063
WIP: Fix debug build. Fix getHeapObject() for side table access.
Sep 16, 2016
d9793d5
WIP: Delete side table entries. Document stuff.
Oct 12, 2016
df0020b
WIP: Record unowned-retain error message to the crash log and console.
Oct 13, 2016
9c7a88a
WIP: Fix leak in swift_weakTakeStrong().
Oct 13, 2016
d3a2363
WIP: nits
Oct 13, 2016
b8decdb
WIP: Add refcounting lifecycle tests.
Oct 13, 2016
42e12f0
WIP: Fix Linux build. Fold Errors.h into Debug.h.
Oct 14, 2016
6a0b6aa
WIP: Fix Linux build.
Oct 14, 2016
6113aab
WIP: Fix Linux build.
Oct 14, 2016
095a795
WIP: Fix 32-bit build.
Oct 18, 2016
6107d43
WIP: Fix some whitespace style.
Oct 19, 2016
23eff3f
WIP: Introduce fake_memory_order_consume. Improve some memory barriers.
Nov 4, 2016
bdbb9be
WIP: Hide a group of assertions behind an NDEBUG check.
Nov 4, 2016
4515d70
WIP: Compact 32-bit inline refcounts.
Nov 4, 2016
3d258c6
Merge branch 'master' of github.com:apple/swift into new-refcount-rep…
Dec 9, 2016
a21ea82
Merge branch 'master' of github.com:apple/swift into new-refcount-rep…
Dec 9, 2016
88882d9
Formatting
Dec 10, 2016
1af09fe
Restore optimization of isUniquelyReferenced and isUniquelyReferenced…
Dec 10, 2016
963b9cf
fake_memory_order_consume -> SWIFT_MEMORY_ORDER_CONSUME
Dec 13, 2016
de7e517
fake_memory_order_consume -> SWIFT_MEMORY_ORDER_CONSUME
Dec 14, 2016
596a3a0
Undo unnecessary diffs.
Dec 15, 2016
3c94ba1
fake_memory_order_consume -> SWIFT_MEMORY_ORDER_CONSUME
Dec 15, 2016
ab2e310
Remove FIXMEs for canBeFreedNow() optimization, which looks fine.
Dec 15, 2016
68755ca
Merge branch 'master' into new-refcount-representation
gparker42 Dec 15, 2016
1f26bb8
Implement out-of-line path of tryIncrementAndPin().
Dec 15, 2016
5ed05f5
Fix Linux build.
Dec 15, 2016
dedcbec
Fix Linux build, maybe.
Dec 15, 2016
43e4a24
Fix Linux test.
Dec 15, 2016
7adaffa
Try to fix Linux tests.
Dec 15, 2016
7c2c0cd
Fix Linux tests.
Dec 15, 2016
c853530
Fix `swiftc -static-stdlib` on Linux.
Dec 15, 2016
af5f37d
Add -latomic to -static-executable.
Dec 16, 2016
e144f79
Merge branch 'master' of github.com:apple/swift into new-refcount-rep…
Feb 9, 2017
1b5b8c4
LLVM_ATTRIBUTE_UNUSED_RESULT has become LLVM_NODISCARD.
Feb 9, 2017
24d1fc2
Add descriptors of weak reference bits for lldb.
Feb 17, 2017
810fc35
Merge branch 'master' into new-refcount-representation
Feb 17, 2017
20d8d0f
Don't static_assert ObjC bits on non-ObjC platforms.
Feb 18, 2017
7880bae
Merge branch 'master' of github.com:apple/swift into new-refcount-rep…
Feb 24, 2017
3910e43
Fix LongRefcounting test.
Feb 24, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions include/swift/Runtime/Debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <llvm/Support/Compiler.h>
#include <stdint.h>
#include "swift/Runtime/Config.h"
#include "swift/Runtime/Metadata.h"

#ifdef SWIFT_HAVE_CRASHREPORTERCLIENT

Expand Down Expand Up @@ -63,6 +62,12 @@ static void CRSetCrashLogMessage(const char *) {}

namespace swift {

// Duplicated from Metadata.h. We want to use this header
// in places that cannot themselves include Metadata.h.
struct InProcess;
template <typename Runtime> struct TargetMetadata;
using Metadata = TargetMetadata<InProcess>;

// swift::crash() halts with a crash log message,
// but otherwise tries not to disturb register state.

Expand Down Expand Up @@ -91,11 +96,6 @@ static inline void _failCorruptType(const Metadata *type) {
LLVM_ATTRIBUTE_NORETURN
extern void
fatalError(uint32_t flags, const char *format, ...);

struct InProcess;

template <typename Runtime> struct TargetMetadata;
using Metadata = TargetMetadata<InProcess>;

// swift_dynamicCastFailure halts using fatalError()
// with a description of a failed cast's types.
Expand All @@ -117,6 +117,14 @@ SWIFT_RUNTIME_EXPORT
extern "C"
void swift_reportError(uint32_t flags, const char *message);

// Halt due to an overflow in swift_retain().
LLVM_ATTRIBUTE_NORETURN LLVM_ATTRIBUTE_NOINLINE
void swift_abortRetainOverflow();

// Halt due to reading an unowned reference to a dead object.
LLVM_ATTRIBUTE_NORETURN LLVM_ATTRIBUTE_NOINLINE
void swift_abortRetainUnowned(const void *object);

// namespace swift
}

Expand Down
Loading