dovs.instructions
Class Ildc_int

java.lang.Object
  extended by dovs.instructions.Instruction
      extended by dovs.instructions.Ildc_int

public class Ildc_int
extends Instruction

An integer constant load instruction. Depending on the value of the integer constant, this instruction is emitted as an iconst_m1, iconst_<n>, bipush, sipush or ldc instruction.


Field Summary
private  int value
           
 
Constructor Summary
Ildc_int(int value)
           
 
Method Summary
 Object getArg(int i)
          Returns the specified numbered argument as given to the constructor.
 int stackChange()
          Returns the number of stack slots that the stack height will change when this instruction is executed.
 String toAsm()
          Returns the instruction in jasmin format.
 
Methods inherited from class dovs.instructions.Instruction
canFallThrough, canJump, getID, getID, getTarget, localAccess
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

value

private int value
Constructor Detail

Ildc_int

public Ildc_int(int value)
Method Detail

toAsm

public String toAsm()
Description copied from class: Instruction
Returns the instruction in jasmin format.

Specified by:
toAsm in class Instruction
Returns:
the instruction as a string

stackChange

public int stackChange()
Description copied from class: Instruction
Returns the number of stack slots that the stack height will change when this instruction is executed. A positive value means the stack will grow. A negative value means the stack will shrink.

Specified by:
stackChange in class Instruction
Returns:
the stack change

getArg

public Object getArg(int i)
Description copied from class: Instruction
Returns the specified numbered argument as given to the constructor.

Overrides:
getArg in class Instruction
Parameters:
i - the index of the argument.
Returns:
the specified argument.