Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 1.47 KB

File metadata and controls

22 lines (15 loc) · 1.47 KB

Functional Java Compiler

© Kai Chen

Overview

FJavaC (Functional Java Compiler) is a compiler (for x86) written in OCaml for an extended version of Java with functional features such as higher-order functions and nested function compositions. The major components include a front-end (a lexer and parser), the intermediate representation (IR), the functional intermediate representation (FIR), and a back-end (code-generator, register allocator ...). The full compiler is too huge to be covered here. In this repo, we only present parts we found of most interest.


Components of Interest


Examples

  • A demonstration of the usage of higher-order functions: HigherOrder1.java.
  • The assembly dump for HigherOrder1.java generated by our fjavac: HigherOrder1.s.