dibyendumajumdar / nj

Licence: other
A cross platform JIT engine based on Eclipse OMR

Programming Languages

C++
36643 projects - #6 most used programming language
TeX
3793 projects
CMake
9771 projects
python
139335 projects - #7 most used programming language
c
50402 projects - #5 most used programming language
assembly
5116 projects

Projects that are alternatives of or similar to nj

Suravi
Suravi is a small distribution of Ravi/Lua 5.3 with batteries such as cjson, lpeglabel, luasocket, penlight, torch7, luv, luaossl
Stars: ✭ 56 (+194.74%)
Mutual labels:  jit, eclipse-omr
dmr c
dmr_C is a C parser and JIT compiler with LLVM, Eclipse OMR and NanoJIT backends
Stars: ✭ 45 (+136.84%)
Mutual labels:  jit, eclipse-omr
Jitex
A library to modify MSIL and native code at runtime
Stars: ✭ 52 (+173.68%)
Mutual labels:  jit
RSqueak
A Squeak/Smalltalk VM written in RPython.
Stars: ✭ 78 (+310.53%)
Mutual labels:  jit
JitPad
On the fly disassemble C# code based on JitDasm
Stars: ✭ 119 (+526.32%)
Mutual labels:  jit
libjit
Unofficial libjit mirror.
Stars: ✭ 46 (+142.11%)
Mutual labels:  jit
wazero
wazero: the zero dependency WebAssembly runtime for Go developers
Stars: ✭ 2,065 (+10768.42%)
Mutual labels:  jit
vox
Vox language compiler. AOT / JIT / Linker. Zero dependencies
Stars: ✭ 288 (+1415.79%)
Mutual labels:  jit
sham
A DSL for runtime code generation in racket
Stars: ✭ 63 (+231.58%)
Mutual labels:  jit
DoubleStar
A personalized/enhanced re-creation of the Darkhotel "Double Star" APT exploit chain with a focus on Windows 8.1 and mixed with some of my own techniques
Stars: ✭ 140 (+636.84%)
Mutual labels:  jit
Batch-First
A JIT compiled chess engine which traverses the search tree in batches in a best-first manner, allowing for neural network batching, asynchronous GPU use, and vectorized CPU computations.
Stars: ✭ 27 (+42.11%)
Mutual labels:  jit
adorad
Fast, Expressive, & High-Performance Programming Language for those who dare
Stars: ✭ 54 (+184.21%)
Mutual labels:  jit
CL-CXX-JIT
Common Lisp and CXX interoperation with JIT
Stars: ✭ 40 (+110.53%)
Mutual labels:  jit
tenderjit
JIT for Ruby that is written in Ruby
Stars: ✭ 388 (+1942.11%)
Mutual labels:  jit
samp-plugin-jit
JIT plugin for SA-MP server (JIT compiler for Pawn 3.2)
Stars: ✭ 52 (+173.68%)
Mutual labels:  jit
rpaheui
Industrial-strength implementaiton of Aheui written in RPython with JIT
Stars: ✭ 52 (+173.68%)
Mutual labels:  jit
JUDI.jl
Julia Devito inversion.
Stars: ✭ 71 (+273.68%)
Mutual labels:  jit
py-cryptonight
Python Cryptonight binding / extension. Monero hash function, proof-of-work, cn_slow_hash()
Stars: ✭ 20 (+5.26%)
Mutual labels:  jit
openj9
Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Stars: ✭ 2,973 (+15547.37%)
Mutual labels:  jit
fasmi
F# -> ASM disassembler
Stars: ✭ 168 (+784.21%)
Mutual labels:  jit

nj

This is a leaner version of the Eclipse OMR project focussing just on the compiler / JIT backend.

Here is what is included:

  • compiler: Components for building compiler technology, such as JIT compilers.
  • jitbuilder: An easy to use high level abstraction on top of the compiler technology.
  • tool: Code generation tools for the build system (only required parts)
  • fvtest: Tests for the compiler/JitBuilder (includes tril)

Following OMR components have been removed:

  • gc: Garbage collection framework for managed heaps
  • port: Platform porting library
  • thread: A cross platform pthread-like threading library
  • util: general utilities useful for building cross platform runtimes
  • omrsigcompat: Signal handling compatibility library
  • omrtrace: Tracing library for communication with IBM Health Center monitoring tools
  • vm: APIs to manage per-interpreter and per-thread contexts
  • example: Demonstration code to show how a language runtime might consume some Eclipse OMR components

Status

  • Builds successfully on Linux, Mac OSX and Windows 10
  • Some tests fail on Windows 10
  • A C API is implemented to allow easy use of the JIT engine in projects; note this is a low level api, not the same as the JITBuilder api provided by Eclipse OMR. A user guide for this api will be available at a future date.
  • An easy way to get started is to use the C front end dmr_C, which enables you to generate code from C code taking away a lot of the complexities of working with the JIT api.
  • Or you can use the JITBuilder api from OMR which is included and installed by default.

Roadmap

  • Immediate focus is on trying to use the JIT engine behind a C front end dmr_C and with the help of that, as a backend JIT engine for Ravi, a Lua 5.3 derived language.
  • I would like to further trim the library to make it even leaner and focussed - especially enable a build option that is minimal in size

Known Issues

  • The OMR technology originated for Java. In Java, stack values cannot be referenced through pointers. Hence stack values cannot be modified indirectly via pointers, nor can they be aliased by function calls. OMR's optimizer (mainly the alias analysis framework in the optimizer) does not handle these scenarios, hence resulting in incorrect optimization. Therefore, OMR at present cannot be successfully used as the JIT for a language such as C. The approach I am taking in dmr_C for now is to not allow constructs that are not supported.

Merge Strategy

I have submitted a pull request to Eclipse OMR for the C api as it stands. However that does not do away with the need to maintain this project as I disagree with one aspect of the Eclipse OMR strategy which is to make the compiler depend on the port and thread libraries.

Initially I wanted to merge the commits from Eclipse OMR using git's am facility. But I got hopelessly lost and some of the merges did not succeed. So sadly I am taking the easy way and am doing periodic manual merges from the OMR tree using BeyondCompare tool. The downside is that the upstream commit history is not maintained.

Build Instructions

You can build the libraries and install the header files plus library. On Windows a static library is built. On Mac OSX and Linux a shared library will be built (JITBuilder library will be static however).

Note - the only builds I have done so far as X86-64 versions. I have no means of testing other architectures.

Note that due to the way the OMR code is structured the code is compiled several times, once for each target. You can reduce the time taken to build by commenting out some of the targets you do not require in the top-level CMakeLists.txt file.

Linux or Mac OSX

  • You will need CMake, Perl, Python, bison and flex installed
  • I follow steps below from the location of source directory.
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=$HOME/Software/nj -DCMAKE_BUILD_TYPE=MinSizeRel ..
make install

Windows 10

  • You will need Visual Studio 2017, Python, Perl, Win flex-bison, and CMake installed
  • Follow these steps from the source directory
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/Software/nj -G "Visual Studio 15 2017 Win64" ..
cmake --build . --target INSTALL --config MinSizeRel
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].