Package jminusminus

Class NEmitter

java.lang.Object
jminusminus.NEmitter

public class NEmitter extends Object
A class for generating native SPIM code.
  • Constructor Details

    • NEmitter

      public NEmitter(String sourceFile, ArrayList<CLFile> clFiles, String ra)
      Constructs an NEmitter object.
      Parameters:
      sourceFile - the source j-- program file name.
      clFiles - list of CLFile objects.
      ra - register allocation scheme (naive, linear, or graph).
  • Method Details

    • destinationDir

      public void destinationDir(String destDir)
      Sets the destination directory for the SPIM files.
      Parameters:
      destDir - the destination directory.
    • errorHasOccurred

      public boolean errorHasOccurred()
      Returns true if an emitter error has occurred up to now, and false otherwise.
      Returns:
      true if an emitter error has occurred up to now, and false otherwise.
    • write

      public void write()
      Writes out SPIM file(s) to the file system. The destination directory for the files can be set using the destinationDir() method.