[cfe-dev] Clang & Objective-C questions

Fariborz Jahanian fjahanian at apple.com
Tue Jun 2 08:37:19 PDT 2009


On Jun 2, 2009, at 3:52 AM, Camille Troillard wrote:

> Hello,
>
> I am learning LLVM and would like to add JIT support to the F-Script  
> language.  F-Script is a Smalltalk like scripting language that  
> lives above the Objective-C runtime.  In F-Script everything is  
> represented as an Objective-C object.
>
> Right now, when a block is parsed, a AST representation is built and  
> then interpreted.  This results in selectors calls (by large), but  
> also classes and methods definitions.
>
> My question are:
>
> 1. Do you think it would make sense to use the clang codebase  
> (specifically Objective-C CodeGen / CGObjCRuntime) in order to  
> generate the code that will replace F-Script's interpretation?
>
> (I have asked llvmdev if it was possible to use the objc code  
> generation module in clang to emit the code, and they sent me to cfe- 
> dev.)
>
> 2. If the previous answer is yes, can you point me to some code  
> where CGObjCRuntime is used?  Or advices on how to use it?
>
> 3. If this is not a good idea, do you have a suggestion for an  
> alternative approach?

If you can write an F-Script to Objective-c translator, then you  
should be able to generate the objective-c like ASTs expected by the
CGObjCRuntime. If you need to generate specific meta-data, then look  
at CGObjCMac.cpp for guidance.

- Fariborz

>
>
> Thanks!
>
>
> Best Regards,
> Camille
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20090602/453dcde3/attachment.html>


More information about the cfe-dev mailing list