frysk.scopes
Class Function

java.lang.Object
  extended by frysk.scopes.Scope
      extended by frysk.scopes.NamedScope
          extended by frysk.scopes.Function
All Implemented Interfaces:
ObjectDeclaration
Direct Known Subclasses:
InlinedFunction, OutOfLineFunction

public class Function
extends NamedScope

In DWARF a subroutine is used to refer to an entity that can either be a concrete function (Subprogram) or an inlined function (InlinedSubprogram).


Constructor Summary
Function(DwarfDie die, TypeFactory typeFactory)
           
 
Method Summary
 Composite getComposite()
          Returns the structure that this subroutine belongs to.
 ObjectDeclaration getDeclaredObjectByName(String name)
           
 FunctionType getFunctionType()
           
 LinkedList getParameters()
           
 Type getType(ISA isa)
           
 Value getValue(DebugInfoFrame frame)
           
 boolean isInlined()
          returns true if: - this is a concrete instance of an inlined function - this is an abstrace instance of an inlinable function - a regular funciton which has been inlined by the compiler
 void printParameters(PrintWriter writer, DebugInfoFrame frame, boolean printValues)
           
 void printScopes(PrintWriter writer, DebugInfoFrame frame)
           
 void setFunctionType(FunctionType functionType)
           
 String toString()
           
 
Methods inherited from class frysk.scopes.NamedScope
getName
 
Methods inherited from class frysk.scopes.Scope
getDeclaredObjectByNameRecursive, getEnums, getInner, getObjectDeclarations, getOuter, getScopes, getSourceLocation, getVariables, isScopeDie, setOuter, toPrint
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface frysk.value.ObjectDeclaration
getSourceLocation
 

Constructor Detail

Function

public Function(DwarfDie die,
                TypeFactory typeFactory)
Method Detail

getParameters

public LinkedList getParameters()

setFunctionType

public void setFunctionType(FunctionType functionType)

printScopes

public void printScopes(PrintWriter writer,
                        DebugInfoFrame frame)

getFunctionType

public FunctionType getFunctionType()

toString

public String toString()
Overrides:
toString in class Object

getDeclaredObjectByName

public ObjectDeclaration getDeclaredObjectByName(String name)
Overrides:
getDeclaredObjectByName in class Scope

getComposite

public Composite getComposite()
Returns the structure that this subroutine belongs to. If this subroutine does not belong to any structs/classes it returns null.

Returns:
Struct containing this Subroutine or null

isInlined

public boolean isInlined()
returns true if: - this is a concrete instance of an inlined function - this is an abstrace instance of an inlinable function - a regular funciton which has been inlined by the compiler


getType

public Type getType(ISA isa)

getValue

public Value getValue(DebugInfoFrame frame)

printParameters

public void printParameters(PrintWriter writer,
                            DebugInfoFrame frame,
                            boolean printValues)