pnuts.compiler
Class Label

java.lang.Object
  extended by pnuts.compiler.Label

public class Label
extends java.lang.Object


Method Summary
 void fix()
          Fixes the position to which the label points as the current position in the code buffer
 void register(int pos, int size)
          Registers the label and allocate 2 or 4 bytes in the code buffer.
 void setPosition(int tgt)
          Fixes the position to which the label points
 void setRelativePosition(int tgt)
          Fixes the position to which the label points
 Label shift(int offset)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

fix

public void fix()
Fixes the position to which the label points as the current position in the code buffer


shift

public Label shift(int offset)

setRelativePosition

public void setRelativePosition(int tgt)
Fixes the position to which the label points

Parameters:
tgt - the relative position to which the label points

setPosition

public void setPosition(int tgt)
Fixes the position to which the label points

Parameters:
tgt - the absolute position to which the label points

register

public void register(int pos,
                     int size)
Registers the label and allocate 2 or 4 bytes in the code buffer.