Releases: joshradin/Jodin-Java
Toolchains and the Single Launch Point
Previously, there were two main entry points for Jodin. One would run the compiler. The other would run the interpreter. Now there is one entry point, with the "far-backend" being chose by the current toolchain
What is a Toolchain?
A toolchain is a directory layout that is either in the new $JODIN_HOME/toolchains
folder, or in a local directory named .toolchains
. In this directory, there is also a config file, like so:
type = interpreter # either interpreter or compiler
toolchain = ./interpreter # relative position of the current toolchain
experimental = false
opt-level = 0
trycatch = false
stacktrace = true
autostring = false
Each toolchain at the minimum must have the following structure
- TOOLCHAIN/
- include/
-toolchain/
- defines.h
- host_hook.h/
- src/
- toolchain.jdn
This is subject to change
The defines.h
file defines some types for the core library
The host_hook.h
file is where the toolchain defines all of the functions that it won't define, but the host, for example the Interpter, will.
The toolchain.jdn
file is where the system/toolchain.h
file in the standard library headers is implemented. Every in the system/toolchain.h
must be defined as part of the toolchain.
With the core
source files, toolchain
source files, and the generated runtime.jdn
file created by the compiler, every Jodin project can now be compiled without having to adjust any code, as all potential differing code is taken care of by the toolchain.
Interpreter Functionality
With the addition of a fairly well functioning interpreter and a clear plan for how the Jodin Compiler will be bootstrapped, I am officially naming this current iteration the alpha