[cfe-dev] Objective-C: methods, ivars, and cleanup

David Chisnall csdavec at swansea.ac.uk
Mon Mar 24 11:48:30 PDT 2008


Hi,

This is a fairly big diff, so I've tried to split it into a few  
separate parts.

globals.diff is a simple addition to the global_ctors code which  
avoids emitting empty global_ctors.

etoile_runtime.diff contains a subclass of CGObjCRuntime which  
implements the runtime-specific parts for the Étoilé runtime.  Other  
parts do not depend on this unless output for this runtime is selected  
(the runtime to use is currently hard-coded).  I am now writing the  
GNU and Étoilé versions at the same time to make sure the interfaces  
are sufficiently abstract.  Hopefully this will make adding support  
for the Apple runtimes easy for whoever gets that job.

obj_struct.diff handles conversion from Objective-C pointers to LLVM  
types.  This is needed for accessing instance variables statically and  
is used in the ivar access parts.  This patch is also self-contained,  
and does not depend on any other changes.

runtime_if.diff contains changes to the runtime interface.  This  
probably needs to be committed at the same time as the changes to the  
GNU runtime, or there might be some conflicts.  The Étoilé patch may  
also conflict with the old definitions if it is committed before this.

gnu_runtime.diff contains the changes made to the GNU runtime to adopt  
the new interface.  It also adds methods for generating method  
functions and some things related to creating class structures which  
are not used yet.

method_gen.diff contains the code required to generate Objective-C  
methods (although it does not yet attach them to class structures.

Finally, ivar.diff contains the code required for accessing and  
modifying Objective-C instance variables.  This depends on the stuff  
in objc_struct.diff for all runtimes that do not use late-bound  
instance variable addresses (i.e. all of the currently supported ones).

Have fun,

David

-------------- next part --------------
A non-text attachment was scrubbed...
Name: globals.diff
Type: application/octet-stream
Size: 3725 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080324/7639c722/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gnu_runtime.diff
Type: application/octet-stream
Size: 14756 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080324/7639c722/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ivar.diff
Type: application/octet-stream
Size: 6132 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080324/7639c722/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: method_gen.diff
Type: application/octet-stream
Size: 6985 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080324/7639c722/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: obj_struct.diff
Type: application/octet-stream
Size: 4065 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080324/7639c722/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: runtime_if.diff
Type: application/octet-stream
Size: 3656 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080324/7639c722/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: etoile_runtime.diff
Type: application/octet-stream
Size: 9507 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080324/7639c722/attachment-0006.obj>


More information about the cfe-dev mailing list