Package iota
Class NEmitter
java.lang.Object
iota.NEmitter
A class for generating Marvin code.
-
Field Summary
FieldsModifier and TypeFieldDescriptionMaps method identifier (ie, combination of its name and descriptor) to its address (ie, where the method is defined in the text segment of Marvin's main memory.static int
Program counter for Marvin instructions. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
destinationDir
(String destDir) Sets the destination directory for the .marv file.boolean
Returns true if an emitter error has occurred up to now, and false otherwise.void
write()
Writes out .marv file to the file system.
-
Field Details
-
methodAddresses
Maps method identifier (ie, combination of its name and descriptor) to its address (ie, where the method is defined in the text segment of Marvin's main memory. -
pc
public static int pcProgram counter for Marvin instructions.
-
-
Constructor Details
-
NEmitter
Constructs an NEmitter object.- Parameters:
sourceFile
- the source iota program file name.clFile
- JVM bytecode representation of the program.ra
- register allocation scheme (naive or graph) to use.verbose
- whether to produce verbose output or not.
-
-
Method Details
-
destinationDir
Sets the destination directory for the .marv file.- 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 .marv file to the file system. The destination directory for the files can be set using the destinationDir() method.
-