step8
Class R

java.lang.Object
  extended by step8.R
Direct Known Subclasses:
R.Float, R.Long

abstract class R
extends Object

manages registers and output for a register machine. Nested classes use package access to register descriptions.


Nested Class Summary
static class R.Float
          describes a result in a floating point register.
static class R.Long
          describes a result in a general register.
 
Field Summary
protected  int rX
          register containing this result.
 
Constructor Summary
R()
           
 
Method Summary
protected static int get(boolean[] reg)
          allocates a register.
static void reset()
          makes all registers available.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rX

protected int rX
register containing this result.

Constructor Detail

R

R()
Method Detail

reset

public static void reset()
makes all registers available.


get

protected static int get(boolean[] reg)
allocates a register.

Throws:
RuntimeException - if there is no register available.