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
Frederik Seiffert
7166a41999
Fixed usage of properties linked list.
6 years ago
Frederik Seiffert
09fdceaa7d
Fixed property_copyAttributeList skipping logic
...
Was incrementing the index twice and thereby possibly skipping over the string end with undefined results.
7 years ago
David Chisnall
e4f4cf095f
Remove unused header include.
7 years ago
David Chisnall
d015f0160c
Rename PUBLIC to OBJC_PUBLIC to avoid some namespace pollution.
7 years ago
David Chisnall
5585a44574
Remove work around for old glibc.
7 years ago
David Chisnall
934cd13a7a
Initial pass at Windows support.
...
All tests now pass with the new ABI on x86-64, with the new ABI. Some
of the code is ugly and other platforms are probably broken.
8 years ago
David Chisnall
4036a88936
Remove separate flags for class and metaclass.
...
Every class is either a class or a metaclass, it doesn't make sense to
use two flags to store one bit of data.
Also remove the newabi flag from classes in the v2 ABI, where it's
redundant.
8 years ago
David Chisnall
c4ff744620
Audit the runtime for direct access to variable-sized arrays.
...
Several of the structures now end with an array of structures that may
have other fields added to them that the runtime doesn't know about yet
by a compiler. Rather than indexing into them directly, we must call an
accessor to find the correct address.
A few of the places where accesses were replaced were in functions where
it is safe because they only deal with versions of the structures that
are dynamically allocated (and will therefore have the correct size).
This was done to simplify future auditing: these fields should be
accessed directly only from the accessor functions in the header and
from the upgraders (currently in legacy.c).
Also fix a few bugs where the sizes weren't being filled in.
8 years ago
David Chisnall
65b34a196f
Add support for improved property structure.
...
As a side effect, we need to upgrade properties in class and protocols
(but not categories because we didn't have class properties in earlier
ABIs).
8 years ago
David Chisnall
44a85a401a
Add size to the property list.
...
It should now be possible to support newer ABIs.
8 years ago
David Chisnall
12d1ea62a4
Merge branch 'master' into newabi
9 years ago
David Chisnall
2493137996
Treat the property encoding string as canonical.
...
This is more reliable than the bitfields (and is constructed from them if the compiler doesn’t fill in the string).
10 years ago
David Chisnall
f442f17034
Set the count to 0 if no property attributes are copied.
10 years ago
theraven
58a574b34f
Fixed a great many property introspection bugs and added test case.
...
Test case by Jean-Charles Bertin!
13 years ago
theraven
aeb0c913b9
Enabled property attribute test, fixed failure.
13 years ago
theraven
d1f3463ac7
Make sure that there is always a comma between T and V in property attributes.
13 years ago
theraven
d0562d2127
Added helper function for C++ non-POD type atomic properties.
...
Fixed prototypes of specialised property functions.
13 years ago
theraven
a9be008911
Add optimised special-case property function.
13 years ago
theraven
713957f9d2
Fix lookup of properties after getting their attributes.
13 years ago
theraven
c7419155d5
Add some explicit NULL checks in property introspection code.
13 years ago
theraven
abc1d44c9c
Fix handling of properties that refer to an instance variable other than the
...
default.
13 years ago
theraven
cdc31c6c0d
Fix class_addProperty().
...
Reported by Luboš Doležel!
13 years ago
theraven
3c8407c41d
Fix incorrect malloc size.
14 years ago
theraven
dc8be2905e
Add explicit cast to silence a warning.
14 years ago
theraven
4796a41e4e
Finished implementing the new runtime APIs.
14 years ago
theraven
663995f08c
Small cleanup. Use the ARC functions for retain / release / autorelease messages everywhere. This will make properties faster if we're using an ARC-compatible NSObject.
15 years ago
theraven
fe5d1b892a
Tweak GC check, make sure GC_init() is called even when ObjC code isn't using GC (stuff internal to the runtime may be)
15 years ago
theraven
e05c9c2ff5
More GC fixes
15 years ago
theraven
01237af0fc
Add GC-aware property accessors (in GC mode, we don't need all of the atomic juggling, because the GC looks after that stuff for us).
15 years ago
theraven
76ef007766
Actually return the correct value in case of races.
15 years ago
theraven
94f72f539b
Fixed thread safety for constructing property attributes.
15 years ago
theraven
8ee4d9c38a
Added implementation of property_getAttributes(). This is a horrible interface, both to implement and to use. We should add some better interfaces.
15 years ago
theraven
e198597bd3
Added support for associative references. Modified sync code to use this.
15 years ago
theraven
b416b31957
Property sizes should be specified in ptrdiff_t sizes.
15 years ago
theraven
661d406a8c
Added property structure copy functions.
15 years ago
ericwa
d56930241e
Stylistic fixes
16 years ago
ericwa
ed1c9d41eb
libobjc2: Add a pile of NULL checks. In general, any public function should be able to handle NULL for any object/class/selector/pointer to opaque structure without blowing up.
16 years ago
theraven
025688a2d5
Added property_getName(). Added non-portable API documentation.
16 years ago
theraven
d70523947b
Implement some missing runtime functions.
16 years ago
ericwa
7a2c302c5f
libobjc2: tweaks to build on Windows
16 years ago
theraven
352e721861
Changed ptrdiff_t to int in property accessors. This is for compatibility with some changes in clang that are required to prevent things from breaking on LP64 platforms.
...
It would be cleaner to use a ptrdiff_t here, but unfortunately we can't because the ivar_offset field in the runtime metadata is an int so ivar offsets beyond 4GB will not work on LP64 platforms.
This probably isn't a limitation. If you have more than 4GB of ivars in one object, you've done something badly wrong and probably shouldn't be allowed to write code anymore.
16 years ago
theraven
492b2315c1
Rewrote property locking to be faster and not require @synchronized (which breaks if you call it in the object's -dealloc method).
16 years ago
theraven
baed61c3e6
Added property support functions, NSBlock base classes and uncaught exception handler.
16 years ago