DennisMitchell / heck

hemato-encephalic compiler kit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hemato-encephalic compiler kit (heck)

The hemato-encephalic compiler kit is a WIP compiler for the programming language brainfuck (to be extended to its derivates).

Heck compiles brainfuck code to hemato-encephalic byte code (hebc), which can be rapidly translated to x86_x64 machine code, without any external compilers, assemblers, or linkers. The result is a compiler that copes well both with tight loops and huge program files.

The implementation is currently limited to x86_64 *nix that support the mprotect syscall and has only been tested on Linux. The tape size is the largest power of two that fits into the virtual address page (usually, 64 TiB), minus enough guard pages to catch an out-of-bounds memory pointer with no impact on performance. The tape head starts at the middle to provide a double-ended tape. The cells are 8 bits wide and use modular arithmetic.

About

hemato-encephalic compiler kit

License:MIT License


Languages

Language:C 98.6%Language:Makefile 1.4%