Skip to content

Releases: joshradin/Jodin-Java

Toolchains and the Single Launch Point

03 Apr 07:00
aed174f
Compare
Choose a tag to compare
Pre-release

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

17 Mar 05:01
1ac4e0d
Compare
Choose a tag to compare
Pre-release

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

Minimum Working Version

08 Jan 08:30
1ac4e0d
Compare
Choose a tag to compare
Pre-release

This can compile simple programs. I have attached two example files that show a successful conversion

c6a2bc7e2293c421d63f9d632c9cfa4c
749994a192b9d357c961e31ab2f81bcd