harpoon.Backend.Generic
Class Runtime.ObjectBuilder

java.lang.Object
  extended by harpoon.Backend.Generic.Runtime.ObjectBuilder
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ObjectBuilder
Enclosing class:
Runtime

public abstract static class Runtime.ObjectBuilder
extends Object
implements Serializable

The ObjectBuilder constructs data tables in the IR.Tree form to represent static objects which may be needed by the runtime---primarily string constant objects. Not every runtime need implement an ObjectBuilder.

See Also:
Serialized Form

Nested Class Summary
static interface Runtime.ObjectBuilder.ArrayInfo
          Information needed to build an array object.
static interface Runtime.ObjectBuilder.Info
          General information about a built object's type and what label to use to refer to it.
static interface Runtime.ObjectBuilder.ObjectInfo
          Information needed to build a non-array object.
 
Constructor Summary
Runtime.ObjectBuilder()
           
 
Method Summary
abstract  Stm buildArray(TreeFactory tf, Runtime.ObjectBuilder.ArrayInfo info, boolean exported)
          Build an array.
abstract  Stm buildObject(TreeFactory tf, Runtime.ObjectBuilder.ObjectInfo info, boolean exported)
          Build an object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Runtime.ObjectBuilder

public Runtime.ObjectBuilder()
Method Detail

buildArray

public abstract Stm buildArray(TreeFactory tf,
                               Runtime.ObjectBuilder.ArrayInfo info,
                               boolean exported)
Build an array.

Parameters:
info - Information about the type, length and contents of the array to build.
segtype - Segment in which to put the built array.
exported - true if this object's label is to be exported outside its module.

buildObject

public abstract Stm buildObject(TreeFactory tf,
                                Runtime.ObjectBuilder.ObjectInfo info,
                                boolean exported)
Build an object.

Parameters:
info - Information about the type and contents of the object to build.
segtype - Segment in which to put the built object.
exported - true if this object's label is to be exported outside its module.