239 Commits (025688a2d5442c3c2db604e51c7018ec8e9b6e45)
 

Author SHA1 Message Date
theraven 025688a2d5 Added property_getName(). Added non-portable API documentation. 16 years ago
theraven d70523947b Implement some missing runtime functions. 16 years ago
theraven 9c077368a8 Make sel_copyTypes_np() return the number of types in all cases. 16 years ago
theraven a029fb2af3 Expose sel_copyTypes_np(). 16 years ago
theraven 60e0fa9f95 Ensure that sel_getName() on two selectors with the same name always returns the same string. 16 years ago
ericwa 7ce5a0ab11 libobjc2: make Object.h include runtime.h 16 years ago
theraven 84fd691944 Make adding more than one ivar with class_addIvar() work... 16 years ago
theraven e1562b28d4 Correctly calculate the offset when adding ivars. 16 years ago
ericwa 9e64fb7828 undo accidentally commited stuff 16 years ago
ericwa dbb8ea2090 add deprecated sel_eq function for compatibility 16 years ago
theraven 033676b9e7 Enable type-dependent dispatch by default. Stack corruption is bad, m'kay? 16 years ago
theraven 18e8d1bfc1 Add Makefile. This compiles libobjc2 without the need for GNUstep Make (or even GNU make), so should make bootstrapping a bit easier. 16 years ago
theraven 2d1add48e5 Updated libobjc2 README. 16 years ago
ericwa c604289023 libobjc2: define SEL as const for GCC 16 years ago
theraven b1aa77e450 Commit some missing files. 16 years ago
ericwa 8f857ae5d3 libobjc2: Change sel_getUid to just call sel_registerName (compatible with OS X 10.0 onwards) 16 years ago
theraven eb48fda62b Expose a function needed by GNUstep. 16 years ago
theraven e2d848467c Another try... 16 years ago
theraven 00004fe5f3 More tweaks to the GNU-compatibility encoding stuff. This API is too broken to use, but GNUstep seems to want it. 16 years ago
theraven 0177ef56e1 Tweak the type encoding stuff a bit. 16 years ago
theraven 5885fd196a Add defines for ObjC types (GNUstep apparently uses them, even though they are not part of the language spec, but the things that they define are, so they only serve to obfuscate code where they are used). 16 years ago
theraven 569a48650d Various tidies. 16 years ago
theraven 718c9398e5 Include the correct headers in hooks.c. 16 years ago
theraven bd58a33b84 Prevent accidental mixing of GNU runtime headers with GNUstep runtime.h. 16 years ago
theraven 108247eb5d Fix dead store (the only bug found by the clang static analyser). 16 years ago
theraven f43e7f6845 Fix typo. 16 years ago
theraven ab59ce1d33 Add feature test APIs to libobjc2. 16 years ago
rfm cd1d274928 Remove usage of -march=native since it doesn't work with most compilers, and
also causes problems with builds on server farms where the build machine is
not the machine the code will run on.
16 years ago
theraven 7453547c47 Add protocol_getMethodDescription(). 16 years ago
theraven 77d02d075b Add some missing protocol introspection functions. 16 years ago
ericwa 52bdf1484f libobjc2: add dummy objc.h and objc-api.h headers which simply include runtime.h 16 years ago
ericwa 7a2c302c5f libobjc2: tweaks to build on Windows 16 years ago
theraven fe566cbc2f Fix introspection with type-dependent dispatch enabled. Looking up a method with an untyped selector was failing because the UID for the selector was no longer the same for all type variants.
As a side-effect of this change, method lookups for introspection are now much faster.  They use the slot lookup mechanism to find which class has the method declared and then only need to do the linear search on that class, rather than doing the linear search on the entire hierarchy (slow!).  If the method is not present, then they can give up after two memory accesses, rather than after searching a few hundred list entries, but that's a less important case.

I also noticed while tracking down this bug that the implementation of methodSignatureForSelector in GNUstep is very inefficient.  I'll tweak that next.
16 years ago
theraven 0284155f2d Added a hook that defines the behaviour when you call a method with the wrong signature. 16 years ago
theraven 06015757a7 Type dependent dispatch now actually works. 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 e9b129d878 Added low memory profile to libobjc2. This uses a more NeXT-style dtable design, which gives better memory usage at the cost of (significantly) worse worst-case performance. The memory savings seem to be only about 10% in the apps I've tested (Gorm, edlc), so it's probably not worthwhile, but it might be useful for someone finding stuff is just starting to swap... 16 years ago
theraven 943ed5e714 Some source tidies. 16 years ago
theraven 9986294a51 Fix setting the superclass for metaclasses correctly. 16 years ago
theraven 2cc96a6f7e Fix message forwarding by, for example, actually calling the public forwarding hook, instead of one that isn't exposed to GNUstep... 16 years ago
theraven a75064866a More tweaks to +load. Now defers +load a little bit more. 16 years ago
theraven 378c7d3a6c Crash in the caller, instead of in the message lookup, when the method does not exist and there is no forwarding hook. 16 years ago
theraven ac6f5835e0 Remember to run +load methods in categories, as well as classes. 16 years ago
theraven 65ec110a61 Make sure both protocol classes are available before resolving protocols. 16 years ago
theraven 7ac0904a1f Don't leak memory when throwing exceptions. 16 years ago
theraven 7d0d599241 Fix handling of cleanups while unwinding for exception throwing. 16 years ago
theraven fb474dd7f9 Removed hooks from runtime.h that are in hooks.h 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 f4e7a7bf5c Return the correct thing to exception handlers. 16 years ago
theraven f375d20d7a Add support for catching C++ (and Java / Ada) exceptions in Objective-C. 16 years ago