Peephole optimization using Java Bytecode and JOOS.
JOOSA-src/
: Source code for the A+ JOOS compiler (excluding the A+ patterns). It is thus more complete than the A- compiler distributed previously. For example, it supports for loops, increment expressions, and proper computation of stack heightpatterns.h
: Source file containing all your patterns for this assignment. We have included a few sample patterns to get you started, but you should add many more!
JOOSexterns/
: The.joos
files that define the external signatures. They are included by the scriptsJOOSlib/
: The.java
files that serve as interfaces to Java functionalityjasmin.jar
: A copy of jasmin, used by thejoosc.sh
scriptjooslib.jar
: A copy of the JOOS libraryjoos.sh
: Script that calls the joos compiler inJOOSA-src/
directory. It produces one.j
file for each input.java
filejoosc.sh
: Script that calls the joos compiler to generate the.j
files and then calls jasmin to generate the.class
files. You should be able to run those.class
files with any Java system
PeepholeBenchmarks/
: There are 6 benchmarks in this directory that you can use for testing your optimizations. Each benchmark contains a Makefile that you can use to compile. Optimizations are appled when invokingmake opt
. Note that you must set the $PEEPDIR environment variable to directly invoke the Makefilecount.sh
: Script that compiles all benchmarks with/without optimization and reports the bytecode size in both cases. This will likely be the sole command you run to compile and test