autohit.vm
Class VMIFor

java.lang.Object
  |
  +--autohit.vm.VMInstruction
        |
        +--autohit.vm.VMIFor

public class VMIFor
extends VMInstruction

A Virtual Machine instruction. This impliments the head of a FOR loop. The loop should resolve to a RSCOPE immeadiately following a JUMP instruction. (The JUMP instruction should point back to THIS instruction).

 ip (Instruction Pointer) Flow

                         $count$ == 0
                   -----------------------------
                   |                           |
                   |                           V
     [SCOPE][SET][FOR] ..code block.. [JUMP][RSCOPE]
                   ^                    |
                   |---------------------
                        always

 SET should only be emitted if the init attribute is present.

 

See Also:
VMInstruction, VMIJump, Serialized Form

Field Summary
 java.lang.String count
          Count variable.
 int target
          Target for when the FOR is broken.
 
Fields inherited from class autohit.vm.VMInstruction
ADD, CRC, EXEC, FOR, GET, HEADER, IF, iv, IVToken, JUMP, NOP, nToken, NV, RSCOPE, SCOPE, SEEK, SET, VERIFY, WAIT, WHILE
 
Constructor Summary
VMIFor()
          Default constructor.
 
Method Summary
 java.lang.String toString()
          Dump this Instruction.
 
Methods inherited from class autohit.vm.VMInstruction
orIV
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

count

public java.lang.String count
Count variable. Will contain a variable reference. Should the referenced variable = "0", the for should break.

target

public int target
Target for when the FOR is broken.
Constructor Detail

VMIFor

public VMIFor()
Default constructor.
Method Detail

toString

public java.lang.String toString()
Dump this Instruction. Mostly for debugging.
Returns:
a String containing the dump.
Overrides:
toString in class VMInstruction