harpoon.Backend.RuntimeTiny
Class CompleteClazNumbering

java.lang.Object
  extended by harpoon.Backend.RuntimeTiny.CompleteClazNumbering

public class CompleteClazNumbering
extends Object

CompleteClazNumbering extends PreOrderClazNumbering to create a numbering valid for all classes in the given classhierarchy. Single-inheritance instantiated classes are placed first, in the order given by PreOrderClazNumbering, and multiple-inheritance instantiated classes are placed next. Lastly, we'll number all non-instantiated classes. This was we can use the lowest part of the numbering to implement 'instanceOf' using the PreOrderClazNumbering, use a slightly-larger part of the numbering to compactly encode the classes which can actually tag an instantiated object, and still have a numbering which is valid for all classes in the hierarchy (and thus is good for sorting and such).

Version:
$Id: CompleteClazNumbering.java,v 1.3 2004/02/08 03:21:01 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>

Constructor Summary
CompleteClazNumbering(ClassHierarchy ch)
           
CompleteClazNumbering(ClassHierarchy ch, PreOrderClazNumbering pocn)
          Creates a CompleteClazNumbering.
 
Method Summary
 int clazNumber(HClass hc)
          Returns the number associated with the given HClass.
 int maxNumber()
          Returns the largest number which this ClazNumbering will associate with any HClass.
 int minNumber()
          Returns the smallest number which this ClazNumbering will associate with any HClass.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompleteClazNumbering

public CompleteClazNumbering(ClassHierarchy ch,
                             PreOrderClazNumbering pocn)
Creates a CompleteClazNumbering.


CompleteClazNumbering

public CompleteClazNumbering(ClassHierarchy ch)
Method Detail

clazNumber

public int clazNumber(HClass hc)
Returns the number associated with the given HClass.


minNumber

public int minNumber()
Returns the smallest number which this ClazNumbering will associate with any HClass.


maxNumber

public int maxNumber()
Returns the largest number which this ClazNumbering will associate with any HClass.