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

Just as you would with any other CPU or C language primatives.

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

Sure. Just box all values and put run-time type tests everywhere when they are
unboxed.

You may want to do a double JIT, JIT’ing your dynamic code to LLVM code then JIT’ing that.

Aaron