Monday, 24 December 2007

JIT compilation from OCaml using LLVM

Gordon Henriksen just took the next step in using the Low Level Virtual Machine (LLVM) project from OCaml by extending the bindings to support JIT compilation. In a post to the LLVM developers mailing list, Gordon explains how to JIT compile a simple Hello World program from OCaml using LLVM. Note that OCaml is one of the only languages to have first class bindings to LLVM bundled as part of the core LLVM distribution.

This is a really exciting development because it now makes compiler writing in OCaml much more accessible than ever before. The next milestone will be the first successful integration of an existing garbage collector with code generated by LLVM. Gordon is already working on garbage collection, several other people are working on compiler front-ends written in OCaml and dozens more people have expressed a keen interest in this project.

No comments: