ruby-llvm/ruby-llvm — pull request #43 by ishikawa (2014-06-06 11:17:19+00:00)
Title: MCJIT execution engine

I added **MCJITCompiler** class which encapsulates [MCJIT execution engine](http://llvm.org/docs/MCJITDesignAndImplementation.html). Its interface is much like JITCompiler.

```ruby
# It also initialize AsmPrinter and AsmParser
LLVM.init_jit(true)

mcjit = LLVM::MCJITCompiler.new(mod, :opt_level => 3)

mcjit.run_function(mod.functions[:fib], 13)
```

Some notes:

* `JITCompiler#initialize` now takes module and option hash. However, `JITCompiler#initialize(Module, opt_level)` still works for backward compatibility.
* FunctionCollection and ModuleCollection are added.
* `functions.named(name)`
* `modules.add(mod)`
* `modules.delete(mod)`
* **MCJIT memory manager is not supported yet.**