10 Commits (71e38a048fc06fea0c2015662540d46a33b5c45d)

Author SHA1 Message Date
David Chisnall b3f7b1bac3 Remove Boehm GC support code.
This removes all support for GC mode.

This was deprecated by Apple in OS X 10.8 (2012) and never supported in
iOS.  Very little code ever tried to use it with this runtime.

It's gone from the build system already.
3 years ago
David Chisnall ed2ccda8bb Use _aligned_malloc on Windows.
On 32-bit Windows, malloc doesn't give us memory with sufficiently
strong alignment for AVX vectors.

Note that Windows also has a family of allocators that provide guarantee
exact misalignment.  Using these would simplify the ivar layout logic
slightly, because we wouldn't need to account for the refcount pointer.
It's not clear that it's actually worth doing though, because that logic
already exists.
8 years ago
theraven c819b379da Fix the build with GC enabled, export the GC symbols in all build configurations. 13 years ago
theraven 8d954d1cb8 When linking libdispatch, register to create / destroy autorelease pools at the
correct time.  This fixes the intermittent problems when using libdispatch from
LanguageKit, among other things.
13 years ago
theraven be3f8ddf0f Fix bug spotted by Justin Hibbits. 15 years ago
theraven 6a27408e9e Fix malloc() / free() imbalance. 15 years ago
theraven 34f7baf8d7 Added a fast path for ARC. Now, if a class implements ARC-compatible retain / release / autorelease methods, we don't call them at all. Instead, we inline them in the ARC accessors. This avoids all of the overhead of the message send (lookup and call) and should make ARC quite a bit faster than manual reference counting. 15 years ago
theraven fcc47bc7ce Fix building without GC support. Still need to make sure that some of the GC functions always work, since they are expected to be no-ops in non-GC mode. 15 years ago
theraven 9dcc66f7f6 Make sure that associated objects and blocks use GC-scanned memory in GC mode.
Blocks do not yet support __weak bound variables.  This needs fixing before the release.
15 years ago
theraven ad16172625 First pass at implementing Apple-compatible GC using Boehm. Still needs some tidying, but the following work:
- __strong pointers, preventing objects from being freed

_ __weak pointers are automatically freed when the last remaining __strong pointer goes away

- objc_gc_{retain,release}_np() functions, which can be used to implement CFRetain() and CFRelease() (adds an reference count - the object will not be collected until after its last retain is gone.
15 years ago