harpoon.Backend.Runtime1
Class StubCode

java.lang.Object
  extended by harpoon.ClassFile.HCode<Tree>
      extended by harpoon.IR.Tree.Code
          extended by harpoon.IR.Tree.TreeCode
              extended by harpoon.Backend.Runtime1.StubCode

public class StubCode
extends TreeCode

StubCode is used to generate non-canonical tree code stubs for native methods. That is, a StubCode is a thunk from runtime-native methods to the JNI interface which C-code "native methods" conform to.

StubCode will generate a thunk for any old method you give to its constructor. It is the job of the nativeTreeCodeFactory() in Runtime1.Runtime to weed out native from non-native methods, give the proper ones to StubCode, and do the right thing with the stubs that StubCode makes.

Version:
$Id: StubCode.java,v 1.3 2003/10/21 02:11:02 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>

Nested Class Summary
 
Nested classes/interfaces inherited from class harpoon.IR.Tree.Code
Code.TreeFactory
 
Nested classes/interfaces inherited from class harpoon.ClassFile.HCode
HCode.PrintCallback<HCE extends HCodeElement>
 
Field Summary
 
Fields inherited from class harpoon.IR.Tree.TreeCode
codename
 
Fields inherited from class harpoon.IR.Tree.Code
frame, parent, tf, tree
 
Constructor Summary
StubCode(HMethod method, Frame frame)
          Creates a StubCode.
 
Method Summary
 
Methods inherited from class harpoon.IR.Tree.TreeCode
clone, codeFactory, codeFactory, getGrapher, getName, getTreeDerivation, getUseDefer, isCanonical, recomputeEdges
 
Methods inherited from class harpoon.IR.Tree.Code
clone, cloneHelper, elementArrayFactory, getElements, getElementsI, getFrame, getLeafElements, getMethod, getRootElement, print, remove
 
Methods inherited from class harpoon.ClassFile.HCode
clone, elementIndexer, getElementsL, print, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StubCode

public StubCode(HMethod method,
                Frame frame)
Creates a StubCode.

Parameters:
method - The method for which to generate code.
frame - The frame for the generated code.