NanoJIT Extra 0.1 Alpha Release
Pre-releaseNanoJIT Extra is a C API that wraps the NanoJIT C++ library, originally part of Adobe Flash and Mozilla SpiderMonkey. NanoJIT is designed to be a small and simple JIT engine. Although the library supports multiple CPU architectures, this release has only been tested on X86-64 architecture.
NanoJIT provides a simple abstract linear instruction set, but its IR lacks phi instructions and hence is not strictly SSA. The instruction set is lower level than LLVM, in that it operates on the level of bytes, words, quads, etc. and has no understanding of higher level structures. The main benefit of NanoJIT is that it is relatively easy to use, is pretty compact, and generates code quickly. However, a consequence of its compact size is that it has a simple register allocator, and only performs simple optimizations.
The NanoJIT Extra library is being used in the dmr_C project as an alternative light weight JIT engine. This project illustrates how NanoJIT can be used to build a fully usable JIT compiler for a large subset of C.