Libjit is a library that aims to become the standard tool for dynamic compilation. Unlike its competitors like the nanojit, the GNU lightning, and the LLVM, libjit is a project that is open source and
... [More]
free and free software and faster and more platform-independent and easier in usage and easier in support. Libjit can be used on the GNU/Linux, GNU, Hurd, Linux, Debian, Ubuntu, Suse, RedHat, Fedora Core, Windows, Windows Vista, Windows XP and many other operating systems, hardware and software platforms.
This site contains libjit-linear-scan a library for dynamic compilation based on libjit. We study fast compilation and dynamic compilation. We study extended linear scan register allocation, generation of binary code, "optimal" register allocation, the CLR, the ECMA-335, the Microsoft Common Intermediate Language, virtual machines, embedded systems and the cloud computing.
If you are looking for the official version please check out the DotGNU site.
Free software for advanced just-in-time and dynamic compilationThe design of libjit and its original source code base were built by Rhys Weatherley and Norbert Bollow. They built the DotGNU and the Portable.NET implementation of the Common Language Infrastructure for the Free Software Foundation. Later Kirill Kononenko, Klaus Treichel, Aleksey Demakov continued the development and design of the library. These researchers fixed the source code and added the missing parts toward the libjit 0.1.2 release. This version is suitable for just-in-time compilation. Secondly, they created with the libjit a just-in-time compiler for the GNU Portable.NET and added a new codec parser into the Portable.NET.
Why should we dynamically compile with the libjit library and its API?We support a standartized API. It's independent of the bytecode format, of the garbage collector, of the shared libraries and the bytecode specifics. We provide standard means for arithmetic operations, types conversions, exceptions handling and memory accesses.
Libjit is in our opinion the best library for development of advanced just-in-time compilation in virtual machine implementations, domain-specific languages, dynamic programming languages, dynamic verification and scripting languages. Unlike the nano JIT and GNU lightning and the LLVM libjit provides all of the following properties:
The compilation time with libjit aims to become deterministic and linear Libjit is suitable for just-in-time and fast dynamic compilation Binary code that libjit generates is of a very high quality for a fast compiler Libjit is platform independent. Compilation of the source code needs a C language GCC, IBM compatible compiler for platform that performs just-in-time compilation. An aggressive support of more optimized just-in-time compilation for the target platforms include: IA-32 (this support is of production quality) AMD64 (under major development) ARM (we have an experimental support), Alpha DEC (implementation started by Thomas Cort in Google Summer of Code 2006) We believe that a support of new hardware and software platforms by other software developers can be done very quickly. When libjit doesn't know how to generate binary code it fallbacks into an interpretation mode.
The design and the architecture of the libjit API have been very well tested in Linux and Windows real-time embedded systems, industrial software, production automation and machinery industry Libjit has a remarkably easy API for usage by the software developers. A simple just-in-time compiler can be built in 5 minutes. A simple support of the just-in-time compilation like one in the VMKit for the MSIL and the Java byte code can be created in a few weeks. A support of a high level industry production can be complete in 2 - 3 months We develop the libjit linear scan that is libjit with a support of a data-flow and control-flow analysis Libjit is a Free Software product that is independent of any proprietary company interests Libjit is free and it can be used free of charge by commercial software, by research projects and by the open source and Free Software community and in the static compilers and in proprietary software. Libjit can be applied for dynamic compilation by a syntaxes analysis of MSIL, Java bytecode, Ruby, Python, Perl, LLVM (LLVA) bytecode and many other virtual machines. Libjit allows us to add support of dynamically compilation in new software only once and for a long time. Software that use libjit adapts to new hardware features like multi-cores without any extra changes to its own architecture Libjit is open to new ideas and features that are later applied into industrial applications and research applications The engineers and the researchers that are involved into the development of libjit are hard-working, open-minded and highly-cooperative Why do you have this web page? Is this a fork of the libjit? Should I use this branch of the libjit library?- No this is not a fork.
This is a research branch of libjit.
How was created this source code base?We made an integration of a variant of an optimal linear scanning algorithm into the libjit and found that a lot more of research and development are required to make the optimization useful. We created this branch of libjit and added a support of a few optimizations. For example, we support a few "optimal" register allocations and data-flow and control-flow analysis. These algorithms are enabled with various optimization levels and are adaptive. We can only hope that our research helps other software projects that already use or implement dynamic compilation
See more information and downloads section for many answers of questions including this short review, how productivity of the libjit design and its approach for just-in-time and fast dynamic compilation compares to use for this task of LLVM or GNU lightning
The source code of the libjit linear scan 0.1.2.5 are available for download
You can have a look at the svn for a package of the source code of the libjit linear scan 0.1.2.5, for the documentation and research papers and benchmarks and the review of its architecture please have a look at downloads.
This release included besides a support of a few features of the git repository:
Optimization levels for IA-32 from 0 to 4 (jit_function_set_optimization_level) A new specializing Application Binary Interface (jit_abi_internal) A brand new optimizing binary code generator There are supported 4 levels of optimization A few low-level machine dependent optimizations An aggressive optimization of division by integer constants with reciprocals as by Torbjorn Granlund and Peter L. Montgomery in "Division By Invariant Integers using Multiplication" divcnst-pldi94.pdf Templates for generation of MMX/Streaming SIMD Extensions/SSE/SSE2/SSE3 instructions A usage of SIMD SSE/SSE2/SSE3 for floating point values and operations Fast static live variable analysis with level 2 of optimization Dead-code elimination with level 4 of optimization Static live variable analysis with level 3, 4 of optimization A linear scanning register allocation algorithm (level 2) based on algorithm proposed by Massimiliano Poletto and Vivek Sarkar A second-chance binpacking register allocation algorithm (level 3, 4) The design of this extension has been well tested in regression tests and .NET applications and the GNU Portable.NET Where is libjit library used? For example, do you use it?Yes we use it.
Libjit was applied on the industrial lasers produced by the TRUMPF Laser division for their embedded systems software. These lasers use GNU Portable.NET, a GNU Portable.NET just-in-time compiler and a GNU Portable.NET managed implementation of Windows.Forms class from Microsoft .NET Framework
Libjit research is applied as a research base in a few independent research projects:
ILDJIT that is developed by Simone Campanoni and the Formal Languages and Compilers Group Politecnico di Milano. See ILDJIT for the documentation and the papers about how libjit has been applied into the ILDJIT Another application of the libjit library research is in the HornetsEye that is developed by Jan Wedekind and the Mobile Machines and Vision Laboratory (MMVL), that is a part of the Centre for Robotics and Automation (CENRA) at the Materials and Engineering Research Institute (MERI). See the HornetsEye website for documentations, papers, and video about how libjit is used for real-time image and video processing with Ruby Where can I find the documentation and the tutorials?http://www.gnu.org/software/dotgnu/libjit-doc/libjit.html
The primary interface is in C, for maximal reusability. Class interfaces are available for programmers who prefer C++. Designed for portability to all major 32-bit and 64-bit platforms. Simple three-address API for library users, but opaque enough that other representations can be used inside the library in future without affecting existing users. Up-front or on-demand compilation of any function. In-built support to re-compile functions with greater optimization, automatically redirecting previous callers to the new version. Fallback interpreter for running code on platforms that don’t have a native code generator yet. This reduces the requirement for the programmers to write their own interpreters for these platforms. Arithmetic, bitwise, conversion, and comparison operators for 8-bit, 16-bit, 32-bit, or 64-bit integer types; and 32-bit, 64-bit, or longer floating point types. Includes overflow detecting arithmetic for integer types. Large set of mathematical and trigonometric operations (sqrt, sin, cos, min, abs, etc) for inlining floating-point library functions. Simplified type layout and exception handling mechanisms, upon which a variety of different object models can be built. Support for nested functions, able to access their parent’s local variables (for implementing Pascal-style languages).
--Rhys Weatherley
The mailing lists and google groupsQuestion or comment about use of GNU Portable.NET just-in-time compiler and libjit library? Email Dotgnu-pnet mailing list
Question or comment about libjit library? Email the GNU libjit developers mailing list Question or comment about libjit linear scan? Email GNU libjit developers mailing list or libjit-linear-scan-register-allocator-dev google group If you want to ask about a usage of libjit with any other project you probably might be interested to contact mailing lists of those projects. We think the following projects can be interested to usage of libjit:
Question or comment about Mono and libjit? Email Mono-devel mailing list Question or comment about GCC and libjit? Email GCC mailing list Question or comment about use of ILDJIT and libjit? Email ILDJIT mailing list Question or comment about Ruby and libjit? Use Ruby forum Question or comment about Parrot and the libjit library? Email Parrot-dev mailing list Question or comment about Perl and libjit? Email Perl5.porters mailing list Question or comment about Python and libjit? Email Python-dev mailing list How to contribute to the development of the libjit? How can I get a few special improvements into the libjit that my group wants for its software and hardware platform?Your job queries and monetary donations can help us to contribute more of our precious time.
Please use savannah and libjit mailing list for a submission of your patch or to report a bug you found. Please tell us your thoughts, share your idea about how you want to use the libjit library. Please let us know your suggestions on how the libjit community can improve the libjit library even better for you, for your business needs or your cutting edge research project.
If you are interested in a submission of your own source code or a patch of a new "smart" algorithm or you find a need for a repository access then you probably may want an access to the repository of the libjit linear scan.
Access to the repository of the libjit linear scan is given on the first request.
If you plan to contribute any source code or participate in the development please contact us. Hence, we can cooperate with the highest productivity.
Related projects A project led by Novell (formerly by Ximian) to create an ECMA standard compliant, .NET-compatible set of tools, including among others a C# compiler and a CLR implementation.
A software framework available with several Microsoft Windows operating systems. It includes a large library of coded solutions to prevent common programming problems and a virtual machine that manages the execution of programs written specifically for the framework. The .NET Framework is a key Microsoft offering and is intended to be used by most new applications created for the Windows platform.
A .NET platform for extremely resource-constrained devices.
An extensible embedded operating system written in C#. Cosmos also encompasses a compiler (IL2CPU) for converting CIL (.NET) bytecode into native instructions. The operating system is compiled together with a user program and associated libraries (written in any .NET language) using IL2CPU to create a bootable standalone native binary. The binary can be run off a floppy, usb key, or inside a VM. Cosmos is in early stages of development. The currently supported architecture is x86, with more planned.
An open source .NET-C# based operating system currently under development by a group of volunteers and presided over by a team of six project administrators (Mircea-Cristian Racasan, Bruce Markham, Johann MacDonagh, Sander van Rossen, Jae Hyun and William Lahti). This operating system is only one of two C# based operating systems released under an open source license. SharpOS is still under major development with only one public version available and a basic command line interface
A Ruby real-time computer vision extension running under GNU+Linux and Microsoft Windows
The Ludicrous JIT Compiler [Less]