-
Notifications
You must be signed in to change notification settings - Fork 4
Just in Time Compilation
In Just-in-Time (JIT) mode, oberon-lang
translates Oberon source code into the LLVM Intermediate Representation (IR). Rather than generating the entire object code from the LLVM IR, the compiler starts executing the module and only generates object code that are required to run the program. JIT mode is built on LLVM's On-Request Compilation (ORC) infrastructure. It supports loading of both static and dynamic libraries, where if a library is available in both formats, the dynamic variant is preferred.
JIT mode is enabled by a new compiler option -r
or --run
that is followed by one file name of an Oberon module. Additionally, compiler options to pass library search paths (-L
) and dynamic libraries (-l
) can be used to tell JIT mode where to look for libraries and which libraries to load.
For example, the following command can be used to run HelloWorld.Mod
in JIT mode.
> ./oberon-lang -I ".:./include" -L ".:./lib" -loberon -r HelloWorld.Mod
JIT mode has been tried and tested using the following configurations.
-
aarch64
- LLVM 17.0.6: no known issues
-
x86_64
- LLVM 17.0.6: no known issues
-
aarch64
- LLVM 17.0.6: no known issues
- LLVM 18.0.0: no known issues
-
x86_64
- LLVM 17.0.6: no known issues
-
aarch64
- status unknown
-
x86_64
- LLVM 17.0.2: no known issues
Building the Frontend
Using the Compiler
Miscellaneous