Cellox
0.1.0
|
Welcome to the technical documentation of the cellox compiler.
Cellox is a dynamically typed, object oriented, high-level scripting language.
It is based on the book crafting iterpreters by Robert Nystrom.
Cellox is designed with the following key concepts in mind:
To build the compiler a C-Compiler, that supports the C99 standard and CMake (Version >= 3.16) is required.
Additionaly cellox has the following dependecies
Under windows:
Under unix-based systems:
There are a couple of options which can be enable with CMake:
Option | Description | Default |
---|---|---|
CLX_BUILD_TESTS | Determines whether the tests are built | OFF |
CLX_BUILD_TOOLS | Determines whether the development tools are built | OFF |
CLX_DEBUG_LOG_GARBAGE_COLLECTOIN | Determines whether the garbage collection be logged | OFF |
CLX_DEBUG_PRINT_BYTECODE | Determines whether the chunks are dissassembled and the bytecode is printed | OFF |
CLX_DEBUG_STRESS_GARBAGE_COLLECTOR | Determines whether the garbage collector shall be stressed | OFF |
CLX_DEBUG_TRACE_EXECUTION | Determines whether the execution shall be traced | OFF |
CLX_NAN_BOXING_ACTIVATED | Determines whether "not a number boxing / tagging" is used | ON |
The options that contain 'DEBUG' do only affect the build if a 'debug' is the selected build type.
The Compiler currently features the following compiler optimization techniques:
The Project provides a set of scripts to ease the development of the compiler. The following generators, compilers are used: Under windows:
Under unix-based systems:
The scripts can be copied into another folder at the root level that is ignored by git, and altered to fit the developers environment.
For building the language tests a C++-Compiler, that supports the C++14 standard and CMake (Version >= 3.24) is required.
The test are written in C++ using the google-test framework (version 1.12.1).
For testing a cellox program is executed and the standard output is redirected to a string.
The string is compared with the expected output after the program was executed.
A small benchmarking tool to measure the performance of cellox programs and a disassbler for cellox chunk files is also included (only used for developing the compiler)
Copyright © 2022 by Frederik Tobner.
Permission to use, copy, modify, and distribute this software and its documentation under the terms of the GNU General Public License is hereby granted.
No representations are made about the suitability of this software for any purpose.
It is provided "as is" without express or implied warranty.
See the GNU General Public License for more details.