<div>Thanks for the response :D<br></div><div></div><div>I have used Python and Lua before. I'd love to use the syntax of lua with the object oriented ness of python, and I thought LLVM would be a way to do that.</div>
<div></div><div>Again your help is appreciated.</div><div></div><div class="gmail_quote">On Sun, Aug 2, 2009 at 12:25 AM, Eli Friedman <span dir="ltr"><<a href="mailto:eli.friedman@gmail.com">eli.friedman@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Sat, Aug 1, 2009 at 11:43 PM, Tres Walsh<<a href="mailto:tres.walsh@gmail.com">tres.walsh@gmail.com</a>> wrote:<br>

> Hello there!<br>
> I'm an absolute newb at LLVM,and I was hoping someone could answer a few of<br>
> my questions.<br>
> I'm currently working on a game engine. As part of it's design, I need a<br>
> virtual machine for scripts. Is LLVM suited for this at all? Such as<br>
> registering external functions that can be called from the scripts?<br>
<br>
</div>Possibly... but you're sort of making the decision at the wrong level;<br>
LLVM is really a low-level solution intended for implementing a<br>
language.  If you need scripts, you probably want a scripting language<br>
of some sort, and if you're working on a game engine, you probably<br>
don't want to write your own scripting language, since it's a lot of<br>
work with no obvious benefit.  There are numerous existing open-source<br>
solutions for this; I think Python and Lua are popular choices for<br>
that sort of thing.<br>
<div class="im"><br>
> And if<br>
> this did work, it wouldn't really matter what language the original scripts<br>
> were written in, since they all get compiled down to the LLVM bytecode<br>
> correct?<br>
<br>
</div>You can't really just compile a scripting language down to LLVM<br>
bitcode and expect good performance; you really need some glue code to<br>
mix interpretation, compilation, and possibly recompilation at runtime<br>
to get good performance.  And if the scripts in question aren't<br>
performance-sensitive, there's not really much point to using LLVM.<br>
It strongly depends on what you're doing.<br>
<div class="im"><br>
> As of now what platforms does LLVM not compile on? Is it good for embedded<br>
> work?<br>
<br>
</div>In terms of platforms, it'll probably work for everything you might<br>
care about; see <a href="http://llvm.org/docs/ReleaseNotes-2.6.html#portability" target="_blank">http://llvm.org/docs/ReleaseNotes-2.6.html#portability</a><br>
(although note that only some of those platforms have working JIT<br>
support).  As for embedded work, it depends on what you mean by<br>
embedded; if 10MB code footprint sounds way too large, LLVM is<br>
probably not the way to go.<br>
<br>
You might want to take a look at <a href="http://llvm.org/docs/tutorial/" target="_blank">http://llvm.org/docs/tutorial/</a> to get<br>
a better idea of what LLVM can do.<br>
<br>
-Eli<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><a href="http://treswalsh.com">http://treswalsh.com</a><br>