harpoon.Backend.RuntimeTiny
Class TinyPackedClassFieldMap

java.lang.Object
  extended by harpoon.Backend.Maps.FieldMap
      extended by harpoon.Backend.RuntimeTiny.TinyPackedClassFieldMap
All Implemented Interfaces:
Serializable

public abstract class TinyPackedClassFieldMap
extends FieldMap

PackedClassFieldMap is a FieldMap for non-static fields of a class which attempts to maximally fill holes in the data structure (even if this means commingling a subclass' fields with those of its superclass) in order to minimize the space required by objects.

Version:
$Id: TinyPackedClassFieldMap.java,v 1.2 2002/04/10 03:03:43 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>
See Also:
Serialized Form

Constructor Summary
TinyPackedClassFieldMap(Runtime runtime)
          Creates a PackedClassFieldMap.
 
Method Summary
 List<HField> fieldList(HClass hc)
          Return an unmodifiable List over all appropriate fields in the given class, in order from smallest to largest offset.
 int fieldOffset(HField hf)
          Return an offset to the given field.
 int fieldPreferredAlignment(HField hf)
          Override this function to indicate a *preferred* but not *mandatory* alignment for the given field.
 
Methods inherited from class harpoon.Backend.Maps.FieldMap
fieldAlignment, fieldSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TinyPackedClassFieldMap

public TinyPackedClassFieldMap(Runtime runtime)
Creates a PackedClassFieldMap.

Method Detail

fieldPreferredAlignment

public int fieldPreferredAlignment(HField hf)
Override this function to indicate a *preferred* but not *mandatory* alignment for the given field. We will "try hard" to honor this alignment, but not if it would mean increasing the object size.


fieldOffset

public int fieldOffset(HField hf)
Return an offset to the given field.

Specified by:
fieldOffset in class FieldMap

fieldList

public List<HField> fieldList(HClass hc)
Return an unmodifiable List over all appropriate fields in the given class, in order from smallest to largest offset.

Specified by:
fieldList in class FieldMap