
VMIR – Virtual Machine for LLVM Intermediate Representation - ingve
https://github.com/andoma/vmir
======
n00b101
What is the difference between the JIT here and LLVM's own MCJIT (besides the
fact that this JIT is currently only supported on 32 bit ARM)?

~~~
bluejekyll
In addition to this question, it would be nice if there was a "why" section in
the readme. It's not clear to me what the intention of this project is.

Was it just for fun? Is it for a school project? Do you want to have some way
of running cross platform?

Just curious, I love projects like this, just like to understand what the
motivation is.

~~~
andoma
VMIR's Author here.

The reason I started this was to add support for "binary" plugins to my media
player/center ([http://movian.tv](http://movian.tv)). Movian runs on some
platforms which does not allow loading code runtime (Google NaCl is one). I
haven't gotten that far yet though. Still fixing stuff and testing what kind
of performance I can get out of it.

Also I did it for fun and, as always, one learns a lot along the way.

~~~
izym
Slightly off-topic: Does Movian support theming? Looks like a great media
center.

------
sklogic
I was thinking of building something like this, a lightweight IR engine. IR is
designed to be exceptionally crappy for a direct interpretation, so I was
thinking of converting it to an intermediate stack-based machine first (and
then do an indirect threading).

------
jevinskie
llli? Lightweight LLVM Interpreter? This is very cool since it doesn't depend
on the (large) LLVM library. I'm eager to try it out!

Edit: I don't see a license. May I kindly suggest WTFPL or something similar?

~~~
DannyBee
Please don't use WTFPL, unless you enjoy getting sued over implied warranties,
or arguing with people over what rights they've really given you, or ...

~~~
jevinskie
Thanks for the heads up. I've normally used MIT style and haven't worried
about that sort of thing but I'm getting into "as public domain as possible"
licenses lately. Do you think ISC is a good license?

~~~
DannyBee
Sure, ISC is a reasonable license for this purpose.

------
michaelmior
I'm curious why the author chose to include separate C files instead of just
compiling and linking multiple object files.

~~~
andoma
Basically to avoid polluting symbol namespace without having to have very long
function names. Also it gives the compiler a good chance of inlining without
having to resort to LTO.

Eventually I might do some "make dist" thing that just concats it all into one
amalgamation file similar to projects like Sqlite and Duktape.

------
caf
Specifically, nacl-targeted IR.

