[cfe-dev] Objective-C Message Send Generation
David Chisnall
csdavec at swansea.ac.uk
Thu Feb 28 07:29:59 PST 2008
Hi Everyone,
I've started working on Objective-C code generation. The attached
diff contains my initial work. I've added a few hooks into the code
generation code for handling the Objective-C AST nodes.
I've created a CodeGenObjCRuntime abstract class which encapsulates
the runtime-specific components and a CodeGenObjCGNU concrete subclass
for the GNU runtime. Currently, this only handles message sends (and
assumes an id return type, which needs fixing later). It's also
completely unoptimised as yet, and does slightly silly things like
look up the selector every message send, rather than caching it after
the first lookup (I'm not sure if this should be done here or if a
later pass should know that sel_get_uid is a constant function and do
the caching as an optimisation).
I am trying to keep the CodeGenObjC* classes free from clang-specific
classes because I intend to use them with a Smalltalk and Self
compiler (which won't use the clang AST representations) as well.
David
P.S. I've not used C++ for almost five years and not looked at the
llvm/clang sources before Sunday, so I expect lots of comments.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang.diff
Type: application/octet-stream
Size: 10996 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080228/e1ee5856/attachment.obj>
More information about the cfe-dev
mailing list