r2ic: Rust to Intermediate Code
System Design
Operating Systems
Assembly Code
Microprocessors
A simple front end compiler for converting basic constructs of the Rust programming language (if, if-else, for, while, loop) to a form of intermediate code (quadruples). It also supports generation of an abstract syntax tree (AST). The code generated has three kinds of optimizations - constant folding, constant propagation, and loop unrolling.
Technologies Used: Python, Compiler, Linux, Shell.
My Role:
- Created the Abstract Syntax Tree for loops and if-else blocks.
- Implemented constant folding and loop unrolling optimizations.