Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lukaszcz/javalette
An educational compiler for Javalette, written in C
https://github.com/lukaszcz/javalette
c compiler
Last synced: 6 days ago
JSON representation
An educational compiler for Javalette, written in C
- Host: GitHub
- URL: https://github.com/lukaszcz/javalette
- Owner: lukaszcz
- License: mit
- Created: 2021-09-25T12:06:11.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-10-05T21:14:12.000Z (over 3 years ago)
- Last Synced: 2024-11-10T04:38:22.851Z (2 months ago)
- Topics: c, compiler
- Language: C
- Homepage:
- Size: 211 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
A locally optimising Javalette compiler written in C. Javalette is
essentially a subset of C, without pointers and dynamic memory
allocation.Features
--------
* Two backends: 32bit x86 assembly and quadruple code.
* Liveness analysis.
* Register allocation with Belady's algorithm.
* Local basic block optimisations: constant folding, common
subexpression elimination, copy propagation.
* Frame pointer omission optimisation.Requirements
------------
* Linux
* bison
* flex
* nasm assembler to produce x86 executablesUsage
-----
* Compilation: `make`
* Tests: `make test`
* Invocation: `jl [options] program.jl`
* Help: `jl -h`
* Examples: [`tests/examples`](tests/examples)Before running the compiler ensure that the `JL_DATA_DIR` environment
variable is set appropriately, or use the `-d` option. The
`JL_DATA_DIR` variable should point to the `data` directory in the
source package.Documentation
-------------A more detailed documentation is available in [`doc/doc.pdf`](doc/doc.pdf) (in Polish).
Copyright and license
---------------------Copyright (C) 2008-2021 by Lukasz Czajka.
Distributed under the MIT license. See the [LICENSE](LICENSE) file.