|
|||||||||
| 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.IncompleteType
An IncompleteType is used to represent a type before the complete type is known.
$Id: IncompleteType.java,v 1.42 2002/01/03 21:44:12 burrill Exp $
Copyright 2002 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
For example, when creating a struct type in C, a field of the struct may reference itself.
| Fields inherited from interface scale.common.DisplayNode |
ANNO, CLEF, DD, DEFUSE, DOM, EXPR, MAYUSE, TYPE |
| Constructor Summary | |
IncompleteType()
|
|
| Method Summary | |
int |
alignment(Machine machine)
Calculate the alignment needed for this data 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)
Return true if the types are equivalent. |
protected void |
finalize()
Keep the count of instances up-to-date. |
Type |
getCompleteType()
Return the completed type or null if it is not complete. |
Type |
getCoreType()
This method filters out some the special case type nodes from a type DAG. |
Declaration |
getDecl()
Return the TypeDecl or TypeName of this type reference. |
boolean |
isAddressType()
Return true if type represents the address of something. |
boolean |
isAggregateType()
Return true if type represents an aggregate object. |
boolean |
isArrayType()
Return true if type represents an array. |
boolean |
isAtomicType()
Return true if type represents a scaler value. |
boolean |
isAttributeSet(int attribute)
Return true if the attribute is associated with this type. |
boolean |
isComplexType()
Return true if type represents a complex value. |
boolean |
isCompositeType()
Return true if type represents a composite type. |
boolean |
isConst()
Return true if the type specifies const. |
boolean |
isIntegerType()
Return true if type represents an integer value. |
boolean |
isNamedType()
Return true if this type has an associated TypeName or TypeDecl. |
boolean |
isNumericType()
Return true if type represents a numeric value. |
boolean |
isPointerType()
Return true if type represents an address. |
boolean |
isRealType()
Return true if type represents a floating point value. |
boolean |
isSigned()
Return true is the type is signed. |
boolean |
isVoidType()
Return true if type represents no type. |
boolean |
isVolatile()
Return true if the type specifies volatile. |
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. |
void |
setCompleteType(Type type)
|
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 |
getDisplayColorHint, getDisplayShapeHint, getDisplayText, getPointedTo, getTag, getType, nextVisit, setTag, setVisited, toString, toStringShort, visited |
| Methods inherited from class scale.clef.Node |
getChildren, 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 |
public IncompleteType()
| Method Detail |
protected void finalize()
throws java.lang.Throwable
finalize in class Typejava.lang.Throwable - [needs description]public static int number()
public Type getCompleteType()
getCompleteType in class Typescale.clef.type.TypeIncompleteTypepublic final void setCompleteType(Type type)
public boolean isAttributeSet(int attribute)
isAttributeSet in class TypeRefTypepublic boolean isAddressType()
isAddressType in class Typepublic boolean isArrayType()
isArrayType in class Typepublic boolean isPointerType()
isPointerType in class Typepublic boolean isVoidType()
isVoidType in class Typepublic boolean isAggregateType()
isAggregateType in class Typepublic boolean isCompositeType()
isCompositeType in class Typepublic boolean isRealType()
isRealType in class Typepublic boolean isIntegerType()
isIntegerType in class Typepublic boolean isComplexType()
isComplexType in class Typepublic boolean isAtomicType()
isAtomicType in class Typepublic boolean isNumericType()
isNumericType in class Typepublic boolean isNamedType()
isNamedType in class Typepublic boolean isSigned()
isSigned in class Typepublic Declaration getDecl()
getDecl in class Nodepublic void visit(Predicate p)
Nodevisit in class Typeprotected Vector createChildren()
NodecreateChildren in class Nodescale.clef.Nodepublic Type getCoreType()
getCoreType in class TypeType.getCoreType()public int memorySize(Machine machine)
memorySize in class Typemachine - is the machine-specific data machinepublic int alignment(Machine machine)
alignment in class Typepublic boolean isConst()
isConst in class Typepublic boolean isVolatile()
isVolatile in class Typepublic java.lang.String toStringSpecial()
RoottoStringSpecial in class Nodepublic boolean equivalent(Type t)
equivalent in class Type
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||