harpoon.Backend.RuntimeTiny
Class Runtime

java.lang.Object
  extended by harpoon.Backend.Generic.Runtime
      extended by harpoon.Backend.Runtime1.Runtime
          extended by harpoon.Backend.RuntimeTiny.Runtime
All Implemented Interfaces:
Serializable

public class Runtime
extends Runtime

RuntimeTiny.Runtime is a size-optimized version of the FLEX backend. It inherits most of the implementation of Runtime1, but uses indices rather than direct pointers to compress the claz field and (will) support byte- and bit-aligned (i.e. "unaligned") fields in object layouts.

Version:
$Id: Runtime.java,v 1.4 2004/02/08 01:57:47 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class harpoon.Backend.Runtime1.Runtime
Runtime.ExtraClazInfo
 
Nested classes/interfaces inherited from class harpoon.Backend.Generic.Runtime
Runtime.ObjectBuilder, Runtime.TreeBuilder
 
Field Summary
protected static boolean byteAlign
           
protected static boolean clazShrink
           
protected  harpoon.Backend.RuntimeTiny.ClazNumbering cn
           
protected static boolean fixAlign
           
protected static boolean hashlockShrink
           
 
Fields inherited from class harpoon.Backend.Runtime1.Runtime
as, cg, ch, frame, main, ob, staticInitializers
 
Fields inherited from class harpoon.Backend.Generic.Runtime
configurationSet
 
Constructor Summary
Runtime(Frame frame, AllocationStrategy as, HMethod main, boolean prependUnderscore)
           
Runtime(Frame frame, AllocationStrategy as, HMethod main, boolean prependUnderscore, ObjectBuilder.RootOracle rootOracle)
           
 
Method Summary
 List<HData> classData(HClass hc)
          Returns a list of HDatas which are needed for the given class.
protected  Runtime.ExtraClazInfo getExtraClazInfo()
          A means for a subclass to set this.
protected  Runtime.ObjectBuilder initObjectBuilder(ObjectBuilder.RootOracle ro)
           
protected  TreeBuilder initTreeBuilder()
           
 HCodeFactory nativeTreeCodeFactory(HCodeFactory hcf)
          This code factory hook allows the runtime to return runtime-specific stubs for native methods --- or any other method which the runtime wishes to reimplement.
 void setClassHierarchy(ClassHierarchy ch)
          Sets the ClassHierarchy to use for this Generic.Runtime.
 
Methods inherited from class harpoon.Backend.Runtime1.Runtime
getNameMap, getTreeBuilder, resourcePath, runtimeCallableMethods, setCallGraph
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

clazShrink

protected static final boolean clazShrink

hashlockShrink

protected static final boolean hashlockShrink

byteAlign

protected static final boolean byteAlign

fixAlign

protected static final boolean fixAlign

cn

protected harpoon.Backend.RuntimeTiny.ClazNumbering cn
Constructor Detail

Runtime

public Runtime(Frame frame,
               AllocationStrategy as,
               HMethod main,
               boolean prependUnderscore)

Runtime

public Runtime(Frame frame,
               AllocationStrategy as,
               HMethod main,
               boolean prependUnderscore,
               ObjectBuilder.RootOracle rootOracle)
Method Detail

initObjectBuilder

protected Runtime.ObjectBuilder initObjectBuilder(ObjectBuilder.RootOracle ro)
Overrides:
initObjectBuilder in class Runtime

initTreeBuilder

protected TreeBuilder initTreeBuilder()
Overrides:
initTreeBuilder in class Runtime

setClassHierarchy

public void setClassHierarchy(ClassHierarchy ch)
Description copied from class: Runtime
Sets the ClassHierarchy to use for this Generic.Runtime. This method must be called at least once before the TreeBuilder or classData are used to generate tree form. It may be called multiple times if transformations cause the class hierarchy to change.

Overrides:
setClassHierarchy in class Runtime

nativeTreeCodeFactory

public HCodeFactory nativeTreeCodeFactory(HCodeFactory hcf)
Description copied from class: Runtime
This code factory hook allows the runtime to return runtime-specific stubs for native methods --- or any other method which the runtime wishes to reimplement. The default implementation just passes the given code factory through without modification.

The code factory returned by this method should return a null for methods which the output routine should skip. For example, if stubs are not needed for native methods, then the code factory should return null when convert() is called on a native method (just as the standard code factories do).

The code factory given should produce tree form. The returned code factory should also produce tree form; the tree form need not be canonicalized or optimized.

Overrides:
nativeTreeCodeFactory in class Runtime

classData

public List<HData> classData(HClass hc)
Description copied from class: Runtime
Returns a list of HDatas which are needed for the given class.

Overrides:
classData in class Runtime

getExtraClazInfo

protected Runtime.ExtraClazInfo getExtraClazInfo()
Description copied from class: Runtime
A means for a subclass to set this.

Overrides:
getExtraClazInfo in class Runtime