dovs.instructions
Class Jump
java.lang.Object
dovs.instructions.Instruction
dovs.instructions.Jump
- Direct Known Subclasses:
- ConditionalJump, Igoto
public abstract class Jump
- extends Instruction
Common superclass for all conditional and unconditional jump instructions.
|
Method Summary |
boolean |
canJump()
Can this instruction transfer control to a label? |
Label |
getTarget()
What is the target of any jump that this instruction performs? |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
target
protected Label target
Jump
public Jump(Label target)
canJump
public boolean canJump()
- Description copied from class:
Instruction
- Can this instruction transfer control to a label? If so, the
Instruction.getTarget() method returns the label.
- Overrides:
canJump in class Instruction
- Returns:
- whether or not the instruction can jump
getTarget
public Label getTarget()
- Description copied from class:
Instruction
- What is the target of any jump that this instruction performs? This
function is only legal to call if
Instruction.canJump() returns
true.
- Overrides:
getTarget in class Instruction
- Returns:
- the target label