Dear list,<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 in the Objective-C runtime. It is written by Philippe Mougin.</div>
<div><br></div><div>The goal is for me to become more familiar with LLVM, and learn about the conclusions we can draw in terms performance improvements (or degradation !), possible optimizations, etc. So far, I have followed with great interest the Kaleidoscope tutorial, this gave me an initial idea of what needs to be accomplished.</div>
<div><br></div><div>In F-Script everything is represented as an Objective-C object.</div><div>When a block is parsed, a AST representation is built and then interpreted. The mechanics of interpretation are rather complicated, and for a start, I would like to stay way from that. Thus, I have chosen to JIT only expressions, but not blocks (yet).</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? If that is possible it would enable me to start progressively porting F-Script to LLVM, instead of reinventing the wheel and port everything at once.</div>
<div><br></div><div>2. If the previous answer is yes, can you point me to some code where CGObjCRuntime is used?</div><div><br></div><div>3. If the previous answer is no, do you have a suggestion for an alternative approach?</div>
<div><br></div><div><br></div><div>Thank you in advance for your help!</div><div><br></div><div><br></div><div>Best Regards,</div><div>Camille</div><div><br></div>