scale.score.analyses
Class VirtualVar

java.lang.Object
  |
  +--scale.common.Root
        |
        +--scale.clef.Node
              |
              +--scale.clef.decl.Declaration
                    |
                    +--scale.clef.decl.ValueDecl
                          |
                          +--scale.clef.decl.VariableDecl
                                |
                                +--scale.score.analyses.VirtualVar
All Implemented Interfaces:
AnnotationInterface, DisplayNode, java.io.Serializable
Direct Known Subclasses:
SubVirtualVar, SuperVirtualVar

public class VirtualVar
extends VariableDecl

A class that represents a virtual variable which is used to handle aliasing and indirect operations in SSA form.

$Id: VirtualVar.java,v 1.19 2002/01/03 21:45:42 burrill Exp $

Copyright 2002 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.

A virtual variable is a pseudo-declaration. We don't actually generate code for the declaration, but we treat it like a declaration in the representation.

See Also:
Serialized Form

Field Summary
protected  ECR var
           
 
Fields inherited from class scale.clef.decl.Declaration
accessibilities, cAuto, cExtern, cFile, cGlobal, cLocal, cMemory, cPrivate, cProtected, cPublic, cRegister, residencies, visibilitys
 
Fields inherited from interface scale.common.DisplayNode
ANNO, CLEF, DD, DEFUSE, DOM, EXPR, MAYUSE, TYPE
 
Constructor Summary
VirtualVar(java.lang.String name, ECR v)
          Create a new virtual variable with a given name and associated ECR.
 
Method Summary
 VariableDecl copy(java.lang.String name)
          Make a copy of this declaration using a new name.
static int created()
          Return the number of instances of this class created.
protected  void finalize()
          Keep the count of instances up-to-date.
 java.lang.String getDisplayText()
          Return a String suitable for labeling this node in a graphical display.
 ECR getECR()
           
 java.util.Enumeration getSubsets()
          Return an Enumeration of the subset.
 VirtualVar getSuperset()
          Return the superset virtual variable.
 boolean inSubsets(VirtualVar vv)
          Return true if vv is in the subset.
 boolean isSuper()
          Return true if this is a superset virtual variable.
 boolean isVirtual()
          Return true if the declaration is a virtual variable.
static int number()
          Return the current number of instances of this class.
 boolean subsetEquiv(VirtualVar vv)
          Return true if virtual variable param is equal to this, or this is a superset.
 
Methods inherited from class scale.clef.decl.VariableDecl
addressTaken, alignment, declareFtnResultVar, getConstantValue, getInitialValue, getOriginal, inMemory, isConst, isFormalArg, isFtnResultVar, isReferenced, isStatic, isTemporary, isVariable, isVolatile, residency, setAddressTaken, setAlignment, setInitialValue, setReferenced, setResidency, setTemporary, shouldBeInRegister, toStringSpecial, visit
 
Methods inherited from class scale.clef.decl.ValueDecl
createChildren, getValue, setValue
 
Methods inherited from class scale.clef.decl.Declaration
accessibility, DDname, getCoreType, getDecl, getDisplayColorHint, getDisplayShapeHint, getName, getParent, getScope, getScopeNode, getTag, getType, hashCode, isGlobal, isPure, setAccessibility, setChildParent, setName, setParent, setScope, setTag, setType, setVisibility, visibility
 
Methods inherited from class scale.clef.Node
getChildren, setAnnotationLevel, setReportLevel, toString, toString, toStringChildren
 
Methods inherited from class scale.common.Root
addAnnotation, allAnnotations, allMatchingAnnotations, getAnnotation, getDisplayName, getDisplayString, getNodeCount, getNodeID, hasAnnotation, hasEqualAnnotation, removeAnnotation, removeAnnotations, toStringAnnotations, toStringClass
 
Methods inherited from class java.lang.Object
clone, equals, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

var

protected ECR var
Constructor Detail

VirtualVar

public VirtualVar(java.lang.String name,
                  ECR v)
Create a new virtual variable with a given name and associated ECR. The virtual variable does not have a type.
Method Detail

finalize

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

number

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

created

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

getDisplayText

public java.lang.String getDisplayText()
Description copied from class: Declaration
Return a String suitable for labeling this node in a graphical display. This method should be over-ridden as it simplay returns the class name.
Overrides:
getDisplayText in class Declaration

getSuperset

public VirtualVar getSuperset()
Return the superset virtual variable.

isSuper

public boolean isSuper()
Return true if this is a superset virtual variable.

isVirtual

public boolean isVirtual()
Return true if the declaration is a virtual variable.
Overrides:
isVirtual in class Declaration

inSubsets

public boolean inSubsets(VirtualVar vv)
Return true if vv is in the subset.

getSubsets

public java.util.Enumeration getSubsets()
Return an Enumeration of the subset.

subsetEquiv

public boolean subsetEquiv(VirtualVar vv)
Return true if virtual variable param is equal to this, or this is a superset.

copy

public VariableDecl copy(java.lang.String name)
Make a copy of this declaration using a new name.

getECR

public ECR getECR()