edu.toronto.cs.yasm.pprogram
Class PFunctionDef

java.lang.Object
  extended by edu.toronto.cs.yasm.pprogram.PFunctionDef

public class PFunctionDef
extends java.lang.Object

PFunction.java Created: Fri Jun 25 14:14:01 2004

Version:
1.0
Author:
Kelvin Ku

Constructor Summary
PFunctionDef(Block _sourceBlock)
           
PFunctionDef(Expr _sourceExpr)
           
PFunctionDef(PProgram _parent, PStmt _head, java.util.Map _localDecls, Block _sourceBlock)
           
PFunctionDef(PProgram _parent, PStmt _head, java.util.Map _localDecls, Expr _sourceExpr)
           
 
Method Summary
 void addToHead(PStmt v)
           
 java.lang.String callSiteName(int index)
           
 PStmt getDDReturnSelector()
           
 PStmt getEntryPoint()
           
 ExprFactory getExprFactory()
           
 Expr getFullParametersExpr()
           
 java.lang.String getFunctionName()
           
 PStmt getHead()
           
 int getLineNum()
           
 java.util.Map getLocalDecls()
           
 int getNumCallSites()
           
 PProgram getParent()
           
 PStmt getPProgramReturnSelector(int selectorSubType)
           
 PDecl getReturnIndexDecl()
           
 PStmt getReturnSelector()
           
 Type getReturnType(ValidityChecker vc)
           
 PDecl getReturnValueDecl()
           
 Block getSourceBlock()
           
 Expr getSourceExpr()
           
 boolean isNonVoid()
           
 PStmt makeFunctionCall(FunctionCallPStmt call)
           
 void print()
           
 void setHead(PStmt v)
           
 void setLocalDecls(java.util.Map v)
           
 void setParent(PProgram v)
           
 void setSourceBlock(Block v)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PFunctionDef

public PFunctionDef(PProgram _parent,
                    PStmt _head,
                    java.util.Map _localDecls,
                    Block _sourceBlock)

PFunctionDef

public PFunctionDef(PProgram _parent,
                    PStmt _head,
                    java.util.Map _localDecls,
                    Expr _sourceExpr)

PFunctionDef

public PFunctionDef(Block _sourceBlock)

PFunctionDef

public PFunctionDef(Expr _sourceExpr)
Method Detail

getReturnSelector

public PStmt getReturnSelector()

getDDReturnSelector

public PStmt getDDReturnSelector()

getPProgramReturnSelector

public PStmt getPProgramReturnSelector(int selectorSubType)

makeFunctionCall

public PStmt makeFunctionCall(FunctionCallPStmt call)

callSiteName

public java.lang.String callSiteName(int index)

setHead

public void setHead(PStmt v)

addToHead

public void addToHead(PStmt v)

getHead

public PStmt getHead()

getEntryPoint

public PStmt getEntryPoint()

setLocalDecls

public void setLocalDecls(java.util.Map v)

getLocalDecls

public java.util.Map getLocalDecls()

getNumCallSites

public int getNumCallSites()

getFunctionName

public java.lang.String getFunctionName()

getReturnType

public Type getReturnType(ValidityChecker vc)
                   throws antlr.RecognitionException
Throws:
antlr.RecognitionException

getReturnValueDecl

public PDecl getReturnValueDecl()

getReturnIndexDecl

public PDecl getReturnIndexDecl()

getParent

public PProgram getParent()

setParent

public void setParent(PProgram v)

setSourceBlock

public void setSourceBlock(Block v)

getSourceBlock

public Block getSourceBlock()

getSourceExpr

public Expr getSourceExpr()

getLineNum

public int getLineNum()

isNonVoid

public boolean isNonVoid()

getFullParametersExpr

public Expr getFullParametersExpr()
Returns:
List of cs.Expr's, one for each parameter, with corresponding names, in the order they appear in the definition.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

print

public void print()

getExprFactory

public ExprFactory getExprFactory()