Sign in to follow this  

LLVM

This topic is 3778 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Father, I have sinned. I have strayed from the righteous path of AngelScript, and fraternized with other scripting solutions. Nah, seriously... I have checked out Mono some, to see if it's usable for scripting in a game engine. Mostly because I was currently bored with actually developing stuff, so I investigated Mono some since I'm curious about it in general but just haven't really found an application where I get to use it. :) So... While messing around with that (which by the way is way more complex than integrating AS, so good job there WitchBoy :), I ran into something called LLVM. Anyone seen anything about that? Here's the site: http://www.llvm.org I'm actually writing here before I've even done more than reading the feature list over there, so I'm totally jumping the gun. But... It looks to me like a pretty feature rich script engine backend (got some JIT compilation to x86 etc and stuff going on there), so basically I'm wondering if it'd be possible (or at all desireable) to have the frontend of AS (which I like a lot) on the backend of LLVM (which, in my five second analyzis, sounds fast and cool as a runtime)? Just throwing the ball out there to see what you can make of it. :)

Share this post


Link to post
Share on other sites
I hadn't heard of LLVM before this moment.

I would have to study it before I decide whether it is of any interest to me and the future of AngelScript.

However, I have no immediate plans to substitute the AngelScript VM machine. My focus is on improving the interface to make AngelScript more useful and flexible.

I'm keeping a link to LLVM in my reference database for future use. Thanks for the link.

Share this post


Link to post
Share on other sites
Yeah, I haven't studied it myself yet either. I just wanted to note that it existed.

And I indeed understand that it's a bit like coming to Audi and say "Hey guys, Toyota has great engines, can't we just slab one of those into our casing since they're better?". But my point is that if it turns out it indeed is better (I've got no idea right now, AS' VM might be way better for all I know), it might be a good idea to use so the focus can be put on developing AS as a nice language and API, and not have to think about the VM backend. (But I also realize that writing the VM etc is a lot of fun as well, at least sometimes. :)

Share this post


Link to post
Share on other sites
I can't say the AngelScript VM is better than LLVM, but then again, the AngelScript VM is very tiny. I hardly spend any time working on it anymore. Everything goes into the compiler and the interface nowadays.

However, when I get so far as to start thinking about JIT compilation to native code etc, then I'll definitely check out the LLVM since it seems to have this already.

Share this post


Link to post
Share on other sites
What I've found so far is that LLVM and the AS bytecode has a bit different abstraction level. LLVM has notion of functions, blocks and variables, which by AS (as far as I can tell) is mostly handled in the compiler, generating more LL bytecode. This makes the overlap a bit weird, since parts that's currently outside of the bytecode would have to go into the bytecode instead.

It's not necessarily bad, just makes it more complex. Also, makes it harder to abstract to two parallel backends.

Share this post


Link to post
Share on other sites
I don't know really, but I'm guessing there's at least two reasons... First, I'm guessing you can do some more optimizations if the VM knows more about the context of things. Second, it makes it _a lot_ easier to write frontends for, since you don't really have to worry about a bunch of stuff that usually I guess is the most cumbersome part of the LL pieces of the compiler.

But I'm just guessing. :)

Share this post


Link to post
Share on other sites

This topic is 3778 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this