<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jun 2, 2009, at 3:52 AM, Camille Troillard wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: collapse; ">Hello,<div><br></div><div>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.</div> <div><br></div><div>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.</div><div><br></div><div>My question are:</div> <div><br></div><div>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?</div><div> <div><br></div><div>(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.)</div><div><br></div></div><div>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?</div> <div><br></div><div>3. If this is not a good idea, do you have a suggestion for an alternative approach?</div></span></blockquote><div><br class="webkit-block-placeholder"></div>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</div><div>CGObjCRuntime. If you need to generate specific meta-data, then look at CGObjCMac.cpp for guidance.</div><div><br class="webkit-block-placeholder"></div><div>- Fariborz</div><div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: collapse; "><div><br></div><div><br></div><div>Thanks!</div><div><br></div><div><br></div><div>Best Regards,</div><div>Camille</div> <div><br></div><font color="#888888"></font></span><font color="#888888"></font><font color="#888888"></font> _______________________________________________<br>cfe-dev mailing list<br><a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev<br></blockquote></div><br></body></html>