55 Commits (164f3744fd47b2233841b991bbde11a89e5a892a)

Author SHA1 Message Date
David Chisnall abf629b1f7 Make some private symbols private. 7 years ago
David Chisnall 93248d581b Allow double indirection for superclass pointers. 7 years ago
David Chisnall 8eb06a3b15 Improve ARC test and fix bugs it uncovered.
This cleans up handling of objects that are not reference counted and
makes their interactions with ARC more consistent.  We should probably
generalise this somewhat - it currently special cases NSConstantString
and NSGlobalBlock, but it would be nice to have an API for constant
objects.
8 years ago
David Chisnall c865b519b0 Unregister classes when deleting them.
Coverage checking of the test suite showed that objc_disposeClassPair
wasn't tested at all, which then led to discovering that it didn't
unregister the class.
8 years ago
David Chisnall 2934a98503 Support building without support for old ABIs. 8 years ago
David Chisnall 11637010ad Rename method_list.h to method.h
Work around the fact that LaTeX really doesn't like file names with
underscores...
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 64ab2d51f5 Rename legacy types.
For consistency, each now has a `_gcc` or `_gsv1` suffix indicating
whether they were inherited from the GCC or GNUstep v1 ABI.
8 years ago
David Chisnall 0964d63ba9 Update for the compiler / linker setting up superclass pointers.
In the legact ABI, superclass pointers are initially set to strings
containing the superclass name and the runtime fixes them up.  In the
new ABI, the compiler sets up the linkage directly.
8 years ago
David Chisnall c94357e8a3 Add missing include. 8 years ago
David Chisnall f91fb2e745 Checkpoint more work on new ABI.
We're now using a new class and category structure and auto-upgrading the old ones.  Other changes:

- The Ivar structure now points to the ivar offset variable, so we can more easily find it.
- Categories can now add properties.
8 years ago
David Chisnall 9f83f1639f Fix traversal of the resolved class list.
This probably didn't make a difference, but if we ended up
resolving a class as a result of resolving a subclass, then we'd previously go and explore an unrelated linked list for a bit.
8 years ago
theraven ffa7dbad8d Cleaner version of the last fix. 13 years ago
theraven fb2e6756f6 Fix (and add test case for) a bug where objc_allocateClassPair() failed if the
superclass had not yet been loaded.
13 years ago
theraven 4c9acdf153 ARM stuff. 14 years ago
theraven 4796a41e4e Finished implementing the new runtime APIs. 14 years ago
theraven 4e3e71c750 Tweak 64-bit support for small objects. 15 years ago
theraven 8af52846b7 Small object (hidden in a pointer) support. 15 years ago
theraven 4ffb19230f Make sure that the statics used to store internal tables are marked as roots. 15 years ago
theraven 0cb2ea01bc Simplify the finalization code slightly. 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 95ef5a93f9 Always use the first version of a class that's loaded twice until the merging code is a bit better tested. 15 years ago
thebeing ee7817cf57 Implement a hook that allows the compiler to register the aliases used with the
@compatibility_alias directive so that they can be resolved at runtime.
15 years ago
theraven faa741b133 Added some header documentation for runtime functions. 15 years ago
theraven e0719a9c62 Added Objective-C++ exception handling support. Allows throwing Objective-C objects with throw or @throw and catching them with catch() or @catch. 15 years ago
theraven 5df6a42107 Log a warning when loading the same class twice. 15 years ago
theraven db53012509 Disabled loaded class test. 15 years ago
theraven ca2c7d1d9d Stop treating NSObject as magic and do what OS X does with regard to root objects and metaclasses. 15 years ago
theraven 5574585b0f Don't load the same class twice. 15 years ago
theraven 8db63b976f Initial work on developer mode (allows classes to be replaced at run time with new versions, by cooperating IDEs). This support is part of ongoing work to provide fix-and-continue functionality with Clang / Cling and LanguageKit. 15 years ago
theraven f66a69561a Fix metametaclass setup. 15 years ago
theraven 76bb7762ff Properly resolve the metaclass's isa pointer. 15 years ago
theraven b6abe490ab Remove some obsolete comments. 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 42a545fc7c In some irritating circumstances, the load order can cause a +load message to trigger other code, which sends messages with selectors that have not been mapped yet.
The runtime was handling the message lookup correctly in this case, but only as a side-effect of the fallback code from when type-dependent dispatch is not possible.  This resulted in a confusing warning message, telling you that you were calling a method with an incorrect signature, when the two signatures that it printed were the same.

This case is now handled correctly, so the warning disappears (unless you really are calling a method with the wrong signature and have TDD enabled).
16 years ago
theraven 9986294a51 Fix setting the superclass for metaclasses correctly. 16 years ago
theraven d3122bcfa4 Make sure BOOLs in class tests are always YES or NO.
Make self in +load the correct value (the class, not the metaclass).
16 years ago
theraven 666c84c129 Test the correct class when resolving superclasses. 16 years ago
theraven 0e374db1db Added support for type-dependent dispatch to libobjc2. 16 years ago
qmathe 79899f8a46 Fixed unresolved class list loss when the root class gets resolved.
Hence not all classes were previously resolved at load time.

Was breaking +forwardInvocation: because unresolved classes such as 
GSFFInvocation were not receiving +load right when gnustep-base was loaded.
16 years ago
theraven 779b28abeb Lots of tidying, removing legacy stuff. 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 4ea82e14da Fixed hash functions.
Tweaked class resolve function to make sure that it keeps scanning the list as long as one or more classes is resolved while scanning it.
16 years ago
thebeing 13964517ef Small 64bit fix. 16 years ago
theraven de71ebb6b1 Rewritten class loading. 16 years ago
theraven a1329e22de A bit more class table tidying. 16 years ago
theraven 7f6f798074 Rewrote some of the class table code to be slightly cleaner. 16 years ago
theraven 09ed66f819 Fixed use of uninitialized variable. 16 years ago
theraven e85975a36e Don't make NSObject a subclass of NSObject. Thanks to Truls Becken! 16 years ago