com.tapina.robe.runtime
Class Instruction

java.lang.Object
  extended bycom.tapina.robe.runtime.Instruction
Direct Known Subclasses:
Branch, DataProcessingInstruction, DataTransferInstruction, MultipleTransferInstruction, MultiplyInstruction, SWI

public abstract class Instruction
extends java.lang.Object

Created by IntelliJ IDEA. User: gareth Date: Aug 21, 2003 Time: 8:00:02 AM


Field Summary
static int count
           
 
Constructor Summary
Instruction(Condition condition)
           
 
Method Summary
 boolean checkAndExecute(Environment environment)
           
protected  void dumpCondition(java.io.Writer out)
           
 void dumpJavaSource(java.io.Writer out)
           
abstract  void dumpJavaSourceUnconditional(java.io.Writer out)
           
protected abstract  boolean execute(Environment environment)
          Try to avoid having much in the way of conditionals in this method - it should execute straight through and be as easily optimised/inlined as possible for speed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

count

public static int count
Constructor Detail

Instruction

public Instruction(Condition condition)
Method Detail

checkAndExecute

public final boolean checkAndExecute(Environment environment)
Parameters:
environment -
Returns:
true if the pipeline should be flushed (i.e. branch has occurred)

execute

protected abstract boolean execute(Environment environment)
Try to avoid having much in the way of conditionals in this method - it should execute straight through and be as easily optimised/inlined as possible for speed. Do all your ifs and buts in the decoder or the constructor to this class.

Parameters:
environment -
Returns:
true if the pipeline should be flushed (i.e. branch has occurred)

dumpCondition

protected final void dumpCondition(java.io.Writer out)
                            throws java.io.IOException
Throws:
java.io.IOException

dumpJavaSource

public final void dumpJavaSource(java.io.Writer out)
                          throws java.io.IOException
Throws:
java.io.IOException

dumpJavaSourceUnconditional

public abstract void dumpJavaSourceUnconditional(java.io.Writer out)
                                          throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2003-2005 . All Rights Reserved.