173 Commits

Author SHA1 Message Date
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
theraven
de71ebb6b1 Rewritten class loading. 2010-06-01 19:41:07 +00:00
theraven
a1329e22de A bit more class table tidying. 2010-06-01 13:15:33 +00:00
theraven
7f6f798074 Rewrote some of the class table code to be slightly cleaner. 2010-06-01 12:59:57 +00:00
theraven
3672f04ea3 Default to installing libobjc2 headers 2010-05-26 19:41:03 +00:00
qmathe
55a62b527f Removed unused variable that prevents compilation by being treated as an error 2010-05-22 14:01:17 +00:00
theraven
8a451d212c More dtable fixes - now the EtoileFoundation tests work when compiled with GCC too. Hopefully that's all of the irritating corner cases in category loading dealt with... 2010-05-21 19:00:02 +00:00
theraven
e482b6986f More fixes for the new dtable. Now passing all of the EtoileFoundation tests, which do lots of things involving categories, so make a good stress test.
No longer installs headers by default.  This is because GNUstep Make notices when the objc headers have changed (because GNUstep includes them) and so reinstalling libobjc2 was requiring a complete recompile of anything that you tried to build, even if you only changed one line.  A better fix for this would be for install to use cmp or diff to check if the header has been modified before installing it, but I'm too lazy to do that right now.
2010-05-21 13:49:19 +00:00
theraven
a692cbd4dd Fix some GCC warnings. Patch by TOM. 2010-05-20 11:44:58 +00:00
theraven
a9bdab1f44 Reverted last commit - breaks the build with clang.
Fixed the definition of objc_msgSendSuper().

Tweaked the -dealloc implementation for hidden classes used for locking so that @synchronize(self) will work in a -dealloc method.
2010-05-20 10:56:56 +00:00
theraven
2efec09e39 Silence some warnings when compiling with GCC. Patch by TOM. 2010-05-20 10:46:02 +00:00
theraven
7a9b105817 Fixed missing ! in dtable construction code, which meant that class methods were being preferred to category methods. 2010-05-19 14:33:55 +00:00
theraven
0c8d2bd7b8 Added missing files. 2010-05-19 14:16:26 +00:00
theraven
c40f9e84f2 Return NULL instead of "" from sel_getTypes_np() - matches behaviour of sel_get_types() and makes more sense. 2010-05-19 12:56:46 +00:00
theraven
ded142ebff Add empty sarray.h - for some reason GNUstep is trying to #include this file (no idea why, as nothing in GNUstep actually uses anything from it). Adding an empty version should prevent breakage for now. 2010-05-17 21:40:07 +00:00
theraven
1a60fabf96 More 64-bit fixes. 2010-05-17 15:22:19 +00:00
theraven
060ddf89be Another 64-bit fix. 2010-05-17 14:29:55 +00:00
theraven
bfbc15e4f7 Fix 64-bit warning. 2010-05-16 22:36:59 +00:00
theraven
cc41e05598 Revert accidental changes to make file. 2010-05-16 21:33:22 +00:00
theraven
d36b939232 Actually commit the new dtable implementation this time... 2010-05-16 21:32:43 +00:00
theraven
b04cccf46b Fixed some issues in runtime.c when looking up methods. This fixes some issues with DO.
Removed GNU dtable and sparse array implementations, replaced entirely now with versions based on the Étoilé runtime.  Performance is roughly equivalent in microbenchmarks, memory usage is significantly lower (Gorm goes from 95MB to 50MB on my machine - this will be even more pronounced on 64-bit systems), which should improve cache usage considerably.  Still room for some performance tuning, however.
2010-05-16 20:39:54 +00:00
theraven
4be9799259 Unrolled the SparseArrayLookup loop. This means we only need one jump, instead of 2, which gives the same performance as the old GNU code and about half the memory usage. It's really, really, ugly code though - I need to teach the compiler to do this optimisation so I don't have to. 2010-05-15 13:27:20 +00:00
theraven
0d78186238 Some bug fixes and tidies.
I now have an out-of-tree replacement for the dtable stuff, so sarray.{h,c} will be going away soon.  The replacement offers similar (slightly worse currently) performance in microbenchmarks, but uses half as much memory (Gorm goes from 95MB to 48MB on my machine).  This will be committed once it's been tweaked a little bit.
2010-05-14 21:47:35 +00:00
theraven
0957cbe425 Factored out dtable stuff into dtable_legacy.c so that it can be replaced and so that we can do some profiling of the replacement to make sure it doesn't introduce performance regressions. 2010-05-14 17:53:35 +00:00
theraven
0045ce0cbd Install slot.h. 2010-05-14 12:55:07 +00:00
theraven
96de597b3c Mark string functions unused, in case the header is included in files that only use one of them. 2010-05-14 11:19:04 +00:00
theraven
7b8b3839df More refactoring. 2010-05-13 23:27:17 +00:00
theraven
2d84b96a72 Tidied up some bits by creating private headers for private data structures.
Imported selector table code frm the Étoilé runtime.  We can now make dispatch type dependent with a -D switch.  Not enabled yet, but it will be enabled in a warning mode soon - I consider preferable to the existing GNU and Apple solution of corrupting the stack.
2010-05-13 22:29:56 +00:00
theraven
a6b5cd15dc Rename the library with the lib prefix so it can actually be linked sensibly. 2010-05-09 12:28:36 +00:00
qmathe
7656e1f9aa Commented out 'firstslot' unused variable, otherwise Clang reports it as an error. 2010-05-04 11:22:23 +00:00
theraven
96f51da81e Commented out some premature termination code. This is a bit of a hack; we're now repeatedly adding the same methods to dtables, which is ugly. We ought instead to be able to test if something is a lazy copy. 2010-05-03 13:35:09 +00:00
theraven
23447feca5 Profile-driven inlining of Objective-C methods. 2010-05-01 18:24:22 +00:00
theraven
ede942cdd8 Simplified profiling even more. Now should allow inlining of manually-cached IMPs. 2010-05-01 16:53:15 +00:00
theraven
9ea9a6cf41 Made inlining conditional on inlining actually being sensible. 2010-05-01 15:54:27 +00:00
theraven
6a58d3d49d Added unfinished inliner that uses type feedback info to inline instance methods.
Made class method inliner also inline message sends to super.

Various updates caused by clang now attaching more sensible metadata to the IR.
2010-05-01 13:56:59 +00:00
theraven
160d1ce829 Added cachable version of the message-to-super lookup function. Clang now calls this in preference to the other one when -fobjc-nonfragile-abi is specified. 2010-05-01 13:54:47 +00:00
theraven
168a0d02e1 Revert last commit. Was fixing the wrong thing. 2010-05-01 13:53:51 +00:00
theraven
3f52e353ee Mark NSBlocks classes as resolved, so we don't crash trying to interpret the class pointers as strings... 2010-05-01 13:53:18 +00:00