|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--scale.common.Root
|
+--scale.clef.Node
|
+--scale.clef.type.Type
|
+--scale.clef.type.ProcedureType
A ProcedureType represents the type of a procedure.
$Id: ProcedureType.java,v 1.35 2002/01/03 21:44:13 burrill Exp $
Copyright 2002 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
| Fields inherited from interface scale.common.DisplayNode |
ANNO, CLEF, DD, DEFUSE, DOM, EXPR, MAYUSE, TYPE |
| Constructor Summary | |
protected |
ProcedureType(Type returnType,
Vector formals,
Vector raises)
|
| Method Summary | |
int |
alignment(Machine machine)
Calculate the alignment needed for this data type. |
boolean |
compareSignatures(ProcedureType s2,
boolean procedureMatchUnknown,
boolean procedureFormalName,
boolean procedureFormalMode,
boolean procedureMatchExceptions,
boolean procedureExactExceptions)
|
static ProcedureType |
create(Type returnType,
Vector formals,
Vector raises)
Re-use an existing instance of a particular procedure type. |
protected Vector |
createChildren()
Create the list of children for the node - each node that has children must implement this method. |
boolean |
equivalent(Type t)
Compares two ProcedureTypes for equivalence as defined by the type equivalence rules specified in ted. |
protected void |
finalize()
Keep the count of instances up-to-date. |
java.util.Enumeration |
getFormals()
Return an Enumeration of the formal parameters. |
int |
getNumFormals()
Return the number of formal parameters. |
int |
getNumRaises()
Return the number of exceptions raised. |
java.util.Enumeration |
getRaises()
Return an enumeration of the exceptions raised. |
Vector |
getRaiseVector()
Return a Vector of exceptions raised. |
Type |
getReturnType()
Return the return type of the procedure. |
static java.util.Enumeration |
getTypes()
Return an Enumeration of all the different types. |
boolean |
isAddressType()
Return true if type represents the address of something. |
int |
memorySize(Machine machine)
Calculate how many addressable memory units are needed to represent the type. |
static int |
number()
Return the current number of instances of this class. |
boolean |
sameFormals(Vector formals)
Return true if the formals match. |
boolean |
sameRaises(Vector raises)
Return true if the formals match. |
java.lang.String |
toStringSpecial()
Return any special information of a node that is not a child or annotation. |
void |
visit(Predicate p)
The visit() method is used to implement a visit 'pattern'. |
| Methods inherited from class scale.clef.type.Type |
getCompleteType, getCoreType, getDisplayColorHint, getDisplayShapeHint, getDisplayText, getPointedTo, getTag, getType, isAggregateType, isArrayType, isAtomicType, isAttributeSet, isComplexType, isCompositeType, isConst, isIntegerType, isNamedType, isNumericType, isPointerType, isRealType, isSigned, isVoidType, isVolatile, nextVisit, setTag, setVisited, toString, toStringShort, visited |
| Methods inherited from class scale.clef.Node |
getChildren, getDecl, getParent, setAnnotationLevel, setParent, setReportLevel, toString, toStringChildren |
| Methods inherited from class scale.common.Root |
addAnnotation, allAnnotations, allMatchingAnnotations, getAnnotation, getDisplayName, getDisplayString, getNodeCount, getNodeID, hasAnnotation, hasEqualAnnotation, hashCode, removeAnnotation, removeAnnotations, toStringAnnotations, toStringClass |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
protected ProcedureType(Type returnType,
Vector formals,
Vector raises)
| Method Detail |
protected void finalize()
throws java.lang.Throwable
finalize in class Typejava.lang.Throwable - [needs description]public static int number()
public static ProcedureType create(Type returnType,
Vector formals,
Vector raises)
returnType - the return type of the routine.formals - a vector of FormalDecls. If the vector is empty, the routine is of the form r(void).raises - the exceptions raised by the routine or null if none.public boolean sameFormals(Vector formals)
public boolean sameRaises(Vector raises)
public boolean isAddressType()
isAddressType in class Typepublic final Type getReturnType()
public final java.util.Enumeration getFormals()
public int getNumFormals()
public final java.util.Enumeration getRaises()
public final Vector getRaiseVector()
public int getNumRaises()
public void visit(Predicate p)
Nodevisit in class Typeprotected Vector createChildren()
NodecreateChildren in class Nodescale.clef.Nodepublic java.lang.String toStringSpecial()
RoottoStringSpecial in class Node
public boolean compareSignatures(ProcedureType s2,
boolean procedureMatchUnknown,
boolean procedureFormalName,
boolean procedureFormalMode,
boolean procedureMatchExceptions,
boolean procedureExactExceptions)
public boolean equivalent(Type t)
equivalent in class Typepublic static java.util.Enumeration getTypes()
public int memorySize(Machine machine)
memorySize in class Typemachine - is the machine-specific data machinepublic int alignment(Machine machine)
alignment in class Type
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||