scale.clef.type
Class VoidType

java.lang.Object
  |
  +--scale.common.Root
        |
        +--scale.clef.Node
              |
              +--scale.clef.type.Type
                    |
                    +--scale.clef.type.VoidType
All Implemented Interfaces:
AnnotationInterface, DisplayNode, java.io.Serializable

public class VoidType
extends Type

This class represents the void type in C and is used to represent the absence of a type.

$Id: VoidType.java,v 1.27 2002/01/03 21:44:15 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

Field Summary
static VoidType type
          There is only one void type.
 
Fields inherited from interface scale.common.DisplayNode
ANNO, CLEF, DD, DEFUSE, DOM, EXPR, MAYUSE, TYPE
 
Method Summary
 int alignment(Machine machine)
          Calculate the alignment needed for this data type.
 boolean equivalent(Type t)
          Return true because all void types are equivalent.
protected  void finalize()
          Keep the count of instances up-to-date.
 boolean isVoidType()
          Return true if type represents no type.
 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.
 java.lang.String toString()
           
 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, isAddressType, isAggregateType, isArrayType, isAtomicType, isAttributeSet, isComplexType, isCompositeType, isConst, isIntegerType, isNamedType, isNumericType, isPointerType, isRealType, isSigned, isVolatile, nextVisit, setTag, setVisited, toStringShort, visited
 
Methods inherited from class scale.clef.Node
createChildren, 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
 

Field Detail

type

public static final VoidType type
There is only one void type.
Method Detail

finalize

protected void finalize()
                 throws java.lang.Throwable
Keep the count of instances up-to-date.
Overrides:
finalize in class Type
Throws:
java.lang.Throwable - [needs description]

number

public static int number()
Return the current number of instances of this class.

isVoidType

public boolean isVoidType()
Return true if type represents no type.
Overrides:
isVoidType in class Type

toString

public java.lang.String toString()
Overrides:
toString in class Type

toStringSpecial

public java.lang.String toStringSpecial()
Description copied from class: Root
Return any special information of a node that is not a child or annotation. This method is meant to be overridden by nodes that need to provide special output.
Overrides:
toStringSpecial in class Node

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

equivalent

public boolean equivalent(Type t)
Return true because all void types are equivalent.
Overrides:
equivalent 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