Hi Everyone,
Sorry for the patch size...
Please find attached:
sema.diff includes small changes required to make constant strings and message sends to super work. It fixes the AST so super is now a built in decl and it eliminates the warning if NSConstantString is not declared (which, it turns out, it isn't in most real code by the time the first constant string is found). This is not a completely sensible check anyway, since most people cast them to NSString* at creation time. If NSConstantString is declared, it is used, otherwise constant strings are of type id.
ccc.diff includes improved option parsing for a couple of things in ccc that apparently are need to build a lot of real ObjC programs.
isa.diff fixes a small bug where the implicit isa pointer was added to instance variable lists twice (I think this is caused by someone fixing the bug where it wasn't added to the AST at all, but it might just be that I'm incompetent...)
objc.diff is a big diff (sorry!) which tidies up most of Objective-C code generation, provides working implementations for the GNU runtime and mostly-working implementations for the Étoilé runtime. Feel free to edit out anything from GCObjCEtoile.cpp (there are a few changes to match the updated interfaces, but the implementation can all be left out for now since it isn't very heavily tested). This includes support for classes, categories, protocols, selector caching, message sends to the superclass, and constant Objective-C strings.
David
sema.diff (2.63 KB)
ccc.diff (676 Bytes)
isa.diff (713 Bytes)
objc.diff (83.7 KB)