|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object scale.alias.steensgaard.AliasType scale.alias.steensgaard.FunctionType
public class FunctionType
A class which implements the non-standard type describing functions (or pointers to functions).
$Id: FunctionType.java,v 1.24 2005-02-07 21:27:11 burrill Exp $
Copyright 2008 by the
Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
In Steensgaard's paper, he refers to this as lambda types. A function type contains a list of parameters (represented as ValueType objects) and a list of function return values (also represented as ValueType objects). Although Steensgaard's algorithm allows multiple return values, we just use one.
Field Summary |
---|
Fields inherited from class scale.alias.steensgaard.AliasType |
---|
BOT |
Constructor Summary | |
---|---|
FunctionType()
Create a function type with an empty list of arguments and a return type with the value BOTTOM (upside down T). |
Method Summary | |
---|---|
void |
addArgument(ValueType a)
Add an argument to the function type. |
void |
addNewArguments(int n)
Create new arguments. |
void |
cleanup()
Remove any un-needed stuff after analysis has been performed. |
Vector<ValueType> |
getArguments()
Return the list of arguments. |
ValueType |
getRetval()
Return the type representing the function return value. |
Vector<ECR> |
pointsTo()
Return the points-to relation for this type. |
int |
pointsToSize()
Return the points-to size for this type. |
void |
setRetval(ValueType r)
Set function's return value type. |
java.lang.String |
toStringSpecial()
Return a string representing of a function type. |
void |
unify(AliasType t)
Recursively join two function types. |
Methods inherited from class scale.alias.steensgaard.AliasType |
---|
getNodeID, toString, toStringClass, toStringShort |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FunctionType()
Method Detail |
---|
public final Vector<ValueType> getArguments()
public final void addArgument(ValueType a)
a
- the argument to add to the function typepublic void addNewArguments(int n)
n
- is the number of new arguments to createpublic final ValueType getRetval()
public final void setRetval(ValueType r)
r
- the ECR representing the return value.public final void unify(AliasType t)
unify
in class AliasType
t
- a function type.public Vector<ECR> pointsTo()
pointsTo
in class AliasType
public int pointsToSize()
pointsToSize
in class AliasType
public java.lang.String toStringSpecial()
toStringSpecial
in class AliasType
public void cleanup()
cleanup
in class AliasType
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |