Hello, I've spent many time trying to find a solution but I have no idea how to create a dynamically typed scripting language like Python and Ruby with LLVM. Is there any way to realize this? Best Regards, Thomas Gatzweiler -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090502/21d308f0/attachment.html>
Just as you would with any other CPU or C language primatives. ----- Original Message ----- From: Thomas Gatzweiler To: llvmdev at cs.uiuc.edu Sent: Saturday, May 02, 2009 7:47 PM Subject: [LLVMdev] Dynamic typing Hello, I've spent many time trying to find a solution but I have no idea how to create a dynamically typed scripting language like Python and Ruby with LLVM. Is there any way to realize this? Best Regards, Thomas Gatzweiler ------------------------------------------------------------------------------ _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090502/e26c5cb3/attachment.html>
On Sat, May 2, 2009 at 14:47, Thomas Gatzweiler <thomas.gatzweiler at googlemail.com> wrote:> > I've spent many time trying to find a solution but I have no idea how to > create a dynamically typed scripting language like Python and Ruby with > LLVM. > Is there any way to realize this? >Well "dynamically typed" really just means "trivially statically typed", where everything has type variant<string, integer, real, function, hashtable, pointer>, so presumably you'd have functions that do the double dispatch and do the right thing. Then you would likely write some analysis that would tell you what types are possible from the various expressions, and then optimize the dispatch accordingly. (I suppose if you were lucky, constant propagation, folding, inlining, and DCE would do much of that for you.) ~ Scott
On Saturday 02 May 2009 19:47:30 Thomas Gatzweiler wrote:> Hello, > > I've spent many time trying to find a solution but I have no idea how to > create a dynamically typed scripting language like Python and Ruby with > LLVM. > Is there any way to realize this?Sure. Just box all values and put run-time type tests everywhere when they are unboxed. -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e
You may want to do a double JIT, JIT'ing your dynamic code to LLVM code then JIT'ing that. Aaron ----- Original Message ----- From: Thomas Gatzweiler To: llvmdev at cs.uiuc.edu Sent: Saturday, May 02, 2009 7:47 PM Subject: [LLVMdev] Dynamic typing Hello, I've spent many time trying to find a solution but I have no idea how to create a dynamically typed scripting language like Python and Ruby with LLVM. Is there any way to realize this? Best Regards, Thomas Gatzweiler ------------------------------------------------------------------------------ _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090503/a2e494c0/attachment.html>
Maybe Matching Threads
- [LLVMdev] Dynamic Creation of a simple program
- [LLVMdev] Dynamic Creation of a simple program
- [LLVMdev] Dynamic Creation of a simple program
- [LLVMdev] Using LLVM to serialize object state -- and performance
- [LLVMdev] Using LLVM to serialize object state -- and performance