If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

You Can Now Run LLVM Assembly In Your Web-Browser

Phoronix: You Can Now Run LLVM Assembly In Your Web-Browser

Thanks to some experimental and innovative work done on LLVM, it's now possible to parse and execute LLVM Assembly within your web-browser. This Assembly code from the LLVM compiler infrastructure is then translated to JavaScript using EmScripten...

I easily see LLVM bytecode being a universal bytecode standard in 5 years. Translate any interpreted or JIT language into it, and either run it in a VM or compile it to native on any platform. Next generation OSes might ship with LLVM interpreters to sandbox applications at near-native speeds, rather than seperate C# / Java runtimes (and maybe instead of shipping Python / Perl / Ruby etc you just compile apps to LLVM and ship them like that).

I easily see LLVM bytecode being a universal bytecode standard in 5 years. Translate any interpreted or JIT language into it, and either run it in a VM or compile it to native on any platform. Next generation OSes might ship with LLVM interpreters to sandbox applications at near-native speeds, rather than seperate C# / Java runtimes (and maybe instead of shipping Python / Perl / Ruby etc you just compile apps to LLVM and ship them like that).

I used to think this way ... but it's really nothing like Java byte code and it is especially architecture-dependent. It is fun to dream of such a technology though.

Emscripten is quite impressive in what it can achieve. And it uses the SDL API for canvas operations, which makes it easy to pick up.

But JavaScript has some limitations at this point, so it's not possible to compile C or C++ code to it that makes use of longjmp() or setcontext() (used for C exception handling implementations or thin threads, for example.)