Frederik Seiffert
7166a41999
Fixed usage of properties linked list.
6 years ago
David Chisnall
369c84db35
Fix compiler warnings.
7 years ago
David Chisnall
abf629b1f7
Make some private symbols private.
7 years ago
David Chisnall
bc726e7564
Improve protocol table locking.
...
Remove the protocol table from the global lock and make sure that we do
acquire it when accessing the table.
8 years ago
David Chisnall
38efd04e33
Fix some bugs in protocol upgrading from old ABIs.
...
Reported by Riccardo Mottola!
8 years ago
David Chisnall
0c9ee8b920
Improve protocol tests and fix bugs.
...
Also add the new protocol_getProperties2 function.
8 years ago
David Chisnall
2934a98503
Support building without support for old ABIs.
8 years ago
David Chisnall
67cf43c5a2
Add support for class properties in protocols.
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
ab84589b5d
Improve protocol method metadata.
...
Methods now include a selector and extended type encoding, rather than a
method name and lgacy type encoding. Older ones are auto-upgraded.
Expose the extended type encoding via a function that JavaScriptCore
expects to exist.
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
6bf87d9e8a
Allow the buffered objects to be something other than a pointer.
10 years ago
David Chisnall
f55c158be8
First pass at new Objective-C ABI.
10 years ago
David Chisnall
d44bf5655b
Ensure that objects that support ARC will use ARC, even if they are
...
created without sending a message to the class.
Also ensure that protocols are always valid objects so that ARC doesn't
become confused.
10 years ago
theraven
a78a7f3e6b
Fix protocol_copyProtocolList() to return the correct count value.
12 years ago
rfm
eee9f69ca1
protocol_copyProtocolList() return the allocated/populated result
12 years ago
theraven
d315fd40f5
Correctly handle buffered protocols.
...
Reported by: Krystof Vasa
13 years ago
theraven
8979f19f1d
Fix some bugs in protocol property introspection and remove a redundant #define.
...
Reported by Krystof Vasa!
13 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
abc1d44c9c
Fix handling of properties that refer to an instance variable other than the
...
default.
13 years ago
thebeing
1684283af0
Fix bug in protocol_copyMethodDescriptionList() where we were calling calloc()
...
with a wrong element size.
14 years ago
theraven
0eeff38f1b
Fix potential null pointer dereference.
...
Reported by: Riccardo Mottola
14 years ago
theraven
ec5046f8ca
Work around GCC bug.
14 years ago
theraven
4796a41e4e
Finished implementing the new runtime APIs.
14 years ago
theraven
9b70b22eee
Use __unsafe_unretained instead of const for returning protocol arrays. Let's not break everyone's code, even if we really want to.
15 years ago
theraven
b5380d50d3
Added support for ARC.
...
Weak references are still not supported, but code that doesn't use them (i.e. any code that wants to be compatible with OS X 10.6) will work fine.
The current implementation is VERY inefficient and has a large number of missed optimisation opportunities: this is the 'make it right' phase, and should be almost equivalent to explicit retain / release code.
15 years ago
theraven
4ffb19230f
Make sure that the statics used to store internal tables are marked as roots.
15 years ago
theraven
c6f0651609
Implemented objc_copyProtocolList().
15 years ago
theraven
d51500184c
More cleanups. Stop using __ identifiers for internal stuff now that it's properly marked private and we don't have to worry about conflicts.
15 years ago
theraven
6c7cf4a5a6
Add visibility attributes on all internal functions so that we aren't ever exporting them outside of libobjc.
15 years ago
theraven
3eb0ecb96b
Ensure that the superclass is registered when testing for protocol conformance.
15 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
d70523947b
Implement some missing runtime functions.
16 years ago
theraven
7453547c47
Add protocol_getMethodDescription().
16 years ago
theraven
77d02d075b
Add some missing protocol introspection functions.
16 years ago
theraven
65ec110a61
Make sure both protocol classes are available before resolving protocols.
16 years ago
theraven
627e8cb0dc
Remove debugging lines left in by mistake in last commit.
16 years ago
theraven
779b28abeb
Lots of tidying, removing legacy stuff.
16 years ago
ericwa
cc260222da
protocol.c: don't call init_protocols() with NULL
16 years ago
theraven
bb8cafaa15
Finished rewriting the loader. It's now cleanly separated into logically-separate components, so there's a chance it might actually be maintainable...
16 years ago
theraven
8058495e39
Fix crash with gcc-compiled protocols.
16 years ago
theraven
c1a637a990
Allowed hash tables to dynamically resize. This uses toydispatch to free the old version of the table after copying all of the data into the new one, after waiting enough time to allow all potential readers to finish. There are theoretical cases when this can fail, but hopefully no practical ones. The theoretical cases can be removed by making the garbage thread run at a lower priority than all of the other threads in the system.
...
The protocols table and the class table will now grow as required. Protocols are now added to the protocols table as they are created, so you should get something sensible and introspectable back when you look up a protocol by name.
16 years ago
theraven
a2dbc582de
Made objc_getProtocol() return a protocol from the protocol table, rather than creating a new one.
16 years ago
theraven
e1ae8df5af
Initial work on protocol uniquing. Protocols are now added to a table and can be looked up at run time.
16 years ago
theraven
323e3dfaeb
Added new runtime library, based on GCC 4.4 libobjc, libobjc_tr and Objective2.framework.
17 years ago