public abstract class IsaPrimitive
extends java.lang.Object
IsaPrimitive
class implements base functionality of addressing modes
and operations.Constructor and Description |
---|
IsaPrimitive() |
Modifier and Type | Method and Description |
---|---|
Location |
access(ProcessingElement processingElement,
TemporaryVariables temporaryVariables)
Returns the location the primitive object points to (when initialized with specific
parameters).
|
protected void |
action(ProcessingElement processingElement,
TemporaryVariables temporaryVariables)
Runs the action associated with the primitive.
|
void |
execute(ProcessingElement processingElement,
TemporaryVariables temporaryVariables)
Runs execution of the current primitive's action.
|
static java.lang.String |
getCurrentOperation()
Returns the name of the currently executed primitive or an empty
string if no primitive is being executed.
|
java.lang.String |
getName()
Returns the primitive name.
|
java.lang.String |
image(TemporaryVariables temporaryVariables)
Returns binary representation of the specified primitive.
|
void |
init(TemporaryVariables tempVars)
Perform initialization of temporary variables that can be used in other attributes
(action, syntax, image).
|
java.lang.String |
syntax(TemporaryVariables temporaryVariables)
Returns assembly format of the specified primitive.
|
public static java.lang.String getCurrentOperation()
public final java.lang.String getName()
public void init(TemporaryVariables tempVars)
public java.lang.String syntax(TemporaryVariables temporaryVariables)
Default implementation is provided to allow using primitives that have no explicitly specified syntax attribute. This method does not do any useful work and should never be called. It is needed only to let inherited classes compile.
public java.lang.String image(TemporaryVariables temporaryVariables)
Default implementation is provided to allow using primitives that have no explicitly specified image attribute. This method does not do any useful work and should never be called. It is needed only to let inherited classes compile.
public final void execute(ProcessingElement processingElement, TemporaryVariables temporaryVariables)
protected void action(ProcessingElement processingElement, TemporaryVariables temporaryVariables)
Default implementation is provided to allow using primitives that have no explicitly specified action attribute. This method does not do any useful work and should never be called. It is needed only to let inherited classes compile.
public Location access(ProcessingElement processingElement, TemporaryVariables temporaryVariables)
Default implementation is provided to allow using primitives that do not have a return expression. This method does not do any useful work and should never be called. It is needed only to let inherited classes compile.