Objective-C top-level constructs code generation

Hi David,

Sadly, I haven't had a chance to do much with this lately. I still
have a huge pile of clang diffs sitting on my machine waiting to be
submitted, and I've made a number of bug fixes in the copy of
<snip>

As you may have noticed I have started work on support for the NeXT
runtime. While I'm not going to go out of my way to change the
CGObjCRuntime interface if there are things that need to be changed or
improvements to the API I was planning on doing them.

Obviously this is an issue if you have outstanding diffs vs the current
interface. I don't want to make extra work for you but its not clear what
else we can do.

What kinds of changes are in the "huge pile" of diffs? Are they primarily
changes to the internals or have you also significantly changed the interface?
If it is only the internals then this might not be so bad, but if the interface
has changed as well would it make sense to simply update the current interface
to match your revisions so that the diffs will go easier in the future?

- Daniel

Hey Daniel,

Hi David,

Sadly, I haven't had a chance to do much with this lately. I still
have a huge pile of clang diffs sitting on my machine waiting to be
submitted, and I've made a number of bug fixes in the copy of
<snip>

As you may have noticed I have started work on support for the NeXT
runtime. While I'm not going to go out of my way to change the
CGObjCRuntime interface if there are things that need to be changed or
improvements to the API I was planning on doing them.

I haven't updated clang for a while, since Chris's changes to the ObjC stuff filled my tree with conflicts and after spending two days failing to untangle them I ran out of time to work on clang for a bit.

Obviously this is an issue if you have outstanding diffs vs the current
interface. I don't want to make extra work for you but its not clear what
else we can do.

My original plan was to have the runtime-specific code in clang isolated and reusable for implementing other dynamic languages on top of an Objective-C runtime. This was possible with the old interface, which isolated clang-specific and runtime-specific code in separate files. The new interface breaks this layering, and so I will probably have to use the version I have forked for Smalltalk as a base for this (the Nu guys and some people working on JavaScript and Io implementations contacted me a while ago about using this, although I think they also wanted a NeXT runtime implementations which is likely to be a low priority for me) and back-port the changes to clang periodically.

What kinds of changes are in the "huge pile" of diffs? Are they primarily
changes to the internals or have you also significantly changed the interface?
If it is only the internals then this might not be so bad, but if the interface
has changed as well would it make sense to simply update the current interface
to match your revisions so that the diffs will go easier in the future?

I haven't made any changes to the runtime interface - I just haven't updated my copy to correspond to the new one. Before Chris's changes, I had ObjC support in my local tree up to the point where the only problems compiling GNUstep's Foundation and AppKit libraries came from bits of C not implemented. The Étoilé runtime implementation is now only in my local tree - Chris didn't update it to his new interface and so the version in trunk became too bit-rotted to remain and was removed a few weeks ago.

I have sent most of the changes to the list at various points, but haven't had a chance to address all of the review comments in them. I don't think many were related to the runtime-specific components. There were quite a few little changes related to mapping the ObjC type system to LLVM, and a few minor changes in various places where I encountered problems compiling ObjC code.

If you have more time to tidy and polish the changes than me then I'd be happy to send you a diff from my tree. I think it was down to just over 1000 lines before Chris's changes (not including the code to support the Étoilé runtime).

David