Chapter 10: Intermediate Representations
- Locate and install the lab10 project into your
eclipse workspace as directed by your instructor,
following the usual instructions,
including those for an ant build.
- Browse this lab document to get an idea of the work you will do for this assignment.
You will write
a simple program in Java assembler language.
- Install the software as usual.
- Take a look at Contest.j,
which is a jasmin program that, as provided, calls
its static fibs method.
Be certain only to modify the file
- Complete the Jasmin file Contest.j file as directed
by the comments in that file.
- To assist you with the Jasmin part, there is on-line
A more thorough guide to the Java VM instruction set can be found
- Your solution must correctly pass the bytecode-verification stage
of a JVM. That stage always runs by default, and the JVM will throw
an exception or crash on bytecodes that do not verify.
- Submit your solution as usual.
A contest may be held as described below.
We will examine the size in bytecodes of each contest submission, and we will
award a tasty prize for the smallest solution
in each of the following categories:
- Verified: submissions to this category must bytecode-verify by
a standard JVM.
- NonVerified: submissions to this category need not bytecode-verify.
Solutions that need not verify can generally be shorter than those that do.
Submit your contest entry as directed by your instructor.
Your solution must clearly indicate via comments at the top
if it is intended for the NonVerified
category. We will otherwise assume that your solution should verify