codegenmips
Class MipsCodeGenerator

java.lang.Object
  extended by codegenmips.MipsCodeGenerator

public class MipsCodeGenerator
extends java.lang.Object

The MipsCodeGenerator class generates mips assembly code targeted for the SPIM emulator. Note: this code will only run under SPIM. This class is incomplete and will need to be implemented by the student.


Constructor Summary
MipsCodeGenerator(ClassTreeNode root, java.lang.String outFile, boolean gc, boolean opt, boolean debug)
          MipsCodeGenerator constructor
 
Method Summary
 void generate()
          Generate assembly file In particular, will need to do the following: 1 - start the data section 2 - generate data for the garbage collector 3 - generate string constants 4 - generate class name table 5 - generate object templates 6 - generate dispatch tables 7 - start the text section 8 - generate initialization subroutines 9 - generate user-defined methods See the lab manual for the details of each of these steps.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MipsCodeGenerator

public MipsCodeGenerator(ClassTreeNode root,
                         java.lang.String outFile,
                         boolean gc,
                         boolean opt,
                         boolean debug)
MipsCodeGenerator constructor

Parameters:
root - root of the class hierarchy tree
outFile - filename of the assembly output file
gc - boolean indicating whether garbage collection is enabled
opt - boolean indicating whether optimization is enabled
debug - boolean indicating whether debugging is enabled
Method Detail

generate

public void generate()
Generate assembly file In particular, will need to do the following: 1 - start the data section 2 - generate data for the garbage collector 3 - generate string constants 4 - generate class name table 5 - generate object templates 6 - generate dispatch tables 7 - start the text section 8 - generate initialization subroutines 9 - generate user-defined methods See the lab manual for the details of each of these steps.