theraven
77d02d075b
Add some missing protocol introspection functions.
2010-09-07 20:55:26 +00:00
ericwa
52bdf1484f
libobjc2: add dummy objc.h and objc-api.h headers which simply include runtime.h
2010-09-06 18:27:07 +00:00
ericwa
7a2c302c5f
libobjc2: tweaks to build on Windows
2010-09-03 21:08:06 +00:00
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.
2010-09-02 14:52:35 +00:00
theraven
0284155f2d
Added a hook that defines the behaviour when you call a method with the wrong signature.
2010-09-01 12:48:39 +00:00
theraven
06015757a7
Type dependent dispatch now actually works.
2010-08-31 22:03:53 +00:00
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).
2010-08-31 20:40:08 +00:00
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...
2010-08-15 22:30:32 +00:00
theraven
943ed5e714
Some source tidies.
2010-08-15 11:17:00 +00:00
theraven
9986294a51
Fix setting the superclass for metaclasses correctly.
2010-07-21 16:08:01 +00:00
theraven
2cc96a6f7e
Fix message forwarding by, for example, actually calling the public forwarding hook, instead of one that isn't exposed to GNUstep...
2010-07-21 12:26:49 +00:00
theraven
a75064866a
More tweaks to +load. Now defers +load a little bit more.
2010-07-20 10:53:53 +00:00
theraven
378c7d3a6c
Crash in the caller, instead of in the message lookup, when the method does not exist and there is no forwarding hook.
2010-07-20 09:47:26 +00:00
theraven
ac6f5835e0
Remember to run +load methods in categories, as well as classes.
2010-07-19 15:47:34 +00:00
theraven
65ec110a61
Make sure both protocol classes are available before resolving protocols.
2010-07-19 14:13:51 +00:00
theraven
7ac0904a1f
Don't leak memory when throwing exceptions.
2010-07-16 11:49:51 +00:00
theraven
7d0d599241
Fix handling of cleanups while unwinding for exception throwing.
2010-07-15 17:47:13 +00:00
theraven
fb474dd7f9
Removed hooks from runtime.h that are in hooks.h
2010-07-15 09:48:29 +00:00
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).
2010-07-01 18:03:31 +00:00
theraven
f4e7a7bf5c
Return the correct thing to exception handlers.
2010-06-30 12:09:42 +00:00
theraven
f375d20d7a
Add support for catching C++ (and Java / Ada) exceptions in Objective-C.
2010-06-30 12:02:53 +00:00
theraven
121e14a3b8
Small cleanup of dtable code.
2010-06-30 11:49:19 +00:00
theraven
666c84c129
Test the correct class when resolving superclasses.
2010-06-30 10:53:40 +00:00
thebeing
11b7b2b23c
Fix compilation issues.
2010-06-30 04:45:56 +00:00
theraven
9271591544
Remove GCC file that is no longer used.
2010-06-29 22:01:04 +00:00
theraven
eb84a02e97
Reinstate legacy_malloc in the build, unless you disable legacy nonsense.
2010-06-29 22:00:43 +00:00
theraven
b8543a1e13
Removed files that should have gone in the last commit.
2010-06-29 21:57:11 +00:00
theraven
07758fe521
Removed last bits of legacy code from libobjc2. Added new exception handling implementation.
2010-06-29 21:46:20 +00:00
theraven
0e374db1db
Added support for type-dependent dispatch to libobjc2.
2010-06-29 12:42:20 +00:00
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.
2010-06-25 19:48:20 +00:00
thebeing
e36200bb8b
Fix division by zero bug triggered by pointers to opaque structs.
2010-06-22 15:56:30 +00:00
theraven
f54132293b
Remove debugging line from encoding2.c
2010-06-22 09:40:07 +00:00
theraven
8158ff0a7a
Tweak fragile ABI test to account for alignment padding.
2010-06-22 09:34:15 +00:00
thebeing
673ae40779
64bit fixes.
2010-06-16 13:22:01 +00:00
theraven
77ed3977bc
Added missing file.
2010-06-08 16:20:30 +00:00
theraven
627e8cb0dc
Remove debugging lines left in by mistake in last commit.
2010-06-06 23:59:49 +00:00
theraven
779b28abeb
Lots of tidying, removing legacy stuff.
2010-06-06 21:11:25 +00:00
theraven
1f7f5cbfab
Added file missing in last commit.
2010-06-04 23:40:30 +00:00
theraven
4ee07676cc
Added rewritten encoding parser. The functions that function pointers as arguments and parse compound types should be exposed via the public interfaces, or possibly moved to a separate library - they are generally useful.
2010-06-04 23:40:07 +00:00
ericwa
cc260222da
protocol.c: don't call init_protocols() with NULL
2010-06-03 19:30:01 +00:00
ericwa
9697c01c33
Remove remaining uses of class_get_class_method and class_get_instance_method, which were causing link errors. David: can you check that I didn't do anthing silly? Thanks.
2010-06-03 19:19:19 +00:00
theraven
75712d61a3
Made Object use sensible functions instead of ones that don't exist.
2010-06-03 17:42:15 +00:00
theraven
b1b9baf382
Finished rewrite of message sending. Deleted lots of legacy stuff.
2010-06-03 15:17:12 +00:00
theraven
9dcfe43e69
Removed DLL entry point. The Win32 API docs say that this function is optional, and the implementation was doing exactly the same thing as if it was absent. High quality coding at its finest.
2010-06-03 12:43:17 +00:00
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...
2010-06-02 22:25:12 +00:00
theraven
7c72069fd9
Rewrote ABI compatibility testing. Makes it easier to define new, incompatible ABIs in future without breaking everything.
2010-06-02 13:18:24 +00:00
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.
2010-06-02 11:12:27 +00:00
thebeing
13964517ef
Small 64bit fix.
2010-06-02 09:47:57 +00:00
theraven
fdc1f1e916
Removed more unused code.
2010-06-01 20:23:38 +00:00
theraven
67741f3f68
Removed hash.c - no longer used.
2010-06-01 20:04:32 +00:00