A Lisp compiler to ARM written in Lisp
uLisp has launched an experimental Lisp compiler that converts functions into ARM machine code, enhancing performance. It supports more functions, features better error checking, and is available on GitHub.
Read original articleuLisp has introduced a new experimental Lisp compiler designed to convert Lisp functions into ARM machine code, enhancing the efficiency of code execution. The latest version, released on August 21, 2024, improves upon its predecessor by compiling expressions to leave results in a register instead of pushing them onto the stack, thus optimizing performance. It now supports additional Lisp functions, including 1+, 1-, car, and cdr, and features enhanced error checking. The compiler is written in a subset of Common Lisp compatible with uLisp and can run on ARM boards with a minimum of 5000 objects of workspace. Users can compile functions by calling the compile command, which replaces the original Lisp code with machine code. The compiler currently has limitations, such as only handling functions with up to four integer arguments and generating less efficient code compared to hand-written assembly. However, it supports recursive function calls and uses a stack-based approach for managing register usage. The compiler's design allows for potential adaptations to generate code for other architectures like AVR or RISC-V. The source code is available on GitHub for those interested in exploring or contributing to its development.
- uLisp's new compiler converts Lisp functions into ARM machine code for improved performance.
- The latest version includes support for additional Lisp functions and better error checking.
- The compiler is designed to run on ARM boards with specific workspace requirements.
- Limitations include handling only up to four integer arguments and generating less efficient code than hand-written assembly.
- The source code is accessible on GitHub for further exploration and development.
Related
Ur-Scheme: A GPL self-hosting compiler from a subset of R5RS Scheme
Ur-Scheme is a compact GPL compiler translating R5RS Scheme to Linux x86 assembly. Despite limitations, it offers speed, safety, and unique extensions. Inspired by Ghuloum, it simplifies compiler construction.
Beating the Compiler
The blog post discusses optimizing interpreters in assembly to outperform compilers. By enhancing the Uxn CPU interpreter, a 10-20% speedup was achieved through efficient assembly implementations and techniques inspired by LuaJIT.
Lisp with GC in 436 Bytes
SectorLISP, a compact programming language with garbage collection, fits in a 436-byte boot sector, surpassing FORTH and BASIC. It runs on 1981 PC models and emphasizes file size optimization.
Writing a Lisp compiler (Lisp to assembly) from scratch in JavaScript (2018)
The article describes creating a Lisp compiler in JavaScript that converts Lisp expressions to assembly code, covering parsing, code generation, and assembly fundamentals, with source code available for exploration.
A Lisp compiler to RISC-V written in Lisp
uLisp has launched an experimental Lisp compiler that translates functions into RISC-V machine code, optimizing performance for microcontrollers like the Raspberry Pi Pico 2 and supporting various Lisp constructs.
Related
Ur-Scheme: A GPL self-hosting compiler from a subset of R5RS Scheme
Ur-Scheme is a compact GPL compiler translating R5RS Scheme to Linux x86 assembly. Despite limitations, it offers speed, safety, and unique extensions. Inspired by Ghuloum, it simplifies compiler construction.
Beating the Compiler
The blog post discusses optimizing interpreters in assembly to outperform compilers. By enhancing the Uxn CPU interpreter, a 10-20% speedup was achieved through efficient assembly implementations and techniques inspired by LuaJIT.
Lisp with GC in 436 Bytes
SectorLISP, a compact programming language with garbage collection, fits in a 436-byte boot sector, surpassing FORTH and BASIC. It runs on 1981 PC models and emphasizes file size optimization.
Writing a Lisp compiler (Lisp to assembly) from scratch in JavaScript (2018)
The article describes creating a Lisp compiler in JavaScript that converts Lisp expressions to assembly code, covering parsing, code generation, and assembly fundamentals, with source code available for exploration.
A Lisp compiler to RISC-V written in Lisp
uLisp has launched an experimental Lisp compiler that translates functions into RISC-V machine code, optimizing performance for microcontrollers like the Raspberry Pi Pico 2 and supporting various Lisp constructs.