scale.clef.type
Class AtomicType
java.lang.Object
|
+--scale.common.Root
|
+--scale.clef.Node
|
+--scale.clef.type.Type
|
+--scale.clef.type.AtomicType
- All Implemented Interfaces:
- AnnotationInterface, DisplayNode, java.io.Serializable
- Direct Known Subclasses:
- NumericType, PointerType
- public abstract class AtomicType
- extends Type
This class represents types directly supported by (most) hardware
(e.g., integers, reals, and pointers).
$Id: AtomicType.java,v 1.23 2002/01/03 21:44:10 burrill Exp $
Copyright 2002 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
- See Also:
- Serialized Form
|
Method Summary |
int |
alignment(Machine machine)
Calculate the alignment needed for this data type. |
abstract int |
bitSize()
Return the number of bits required to represent the type. |
boolean |
isAtomicType()
Return true if type represents a scaler value. |
int |
memorySize(Machine machine)
Calculate how many addressable memory units are needed to represent the type. |
void |
visit(Predicate p)
The visit() method is used to implement a visit 'pattern'. |
| Methods inherited from class scale.clef.type.Type |
equivalent, finalize, getCompleteType, getCoreType, getDisplayColorHint, getDisplayShapeHint, getDisplayText, getPointedTo, getTag, getType, isAddressType, isAggregateType, isArrayType, isAttributeSet, isComplexType, isCompositeType, isConst, isIntegerType, isNamedType, isNumericType, isPointerType, isRealType, isSigned, isVoidType, isVolatile, nextVisit, number, setTag, setVisited, toString, toStringShort, visited |
| 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 |
AtomicType
public AtomicType()
visit
public void visit(Predicate p)
- Description copied from class:
Node
- The visit() method is used to implement a visit 'pattern'.
- Overrides:
visit in class Type
isAtomicType
public boolean isAtomicType()
- Return true if type represents a scaler value.
- Overrides:
isAtomicType in class Type
memorySize
public int memorySize(Machine machine)
- Calculate how many addressable memory units are needed to represent the type.
- Overrides:
memorySize in class Type
- Parameters:
machine - is the machine-specific data machine- Returns:
- the number of addressable memory units required to represent this type
alignment
public int alignment(Machine machine)
- Calculate the alignment needed for this data type.
- Overrides:
alignment in class Type
bitSize
public abstract int bitSize()
- Return the number of bits required to represent the type.