scale.clef2scribble
Class ExprTuple

java.lang.Object
  extended by scale.clef2scribble.ExprTuple

public final class ExprTuple
extends java.lang.Object

This class holds a SESE region of basic blocks.

$Id: ExprTuple.java,v 1.15 2007-10-04 19:58:10 burrill Exp $

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

Because the region is SESE, we can represent the basic blocks with a single begin and end block. In scribble, statements serve as basic blocks. This class also holds a reference to the variable holding the result of the expression.


Constructor Summary
ExprTuple(Chord begin, Chord end)
          Create a range of Chords.
ExprTuple(Expr exp, Chord begin, Chord end)
          Record a range of Chords.
 
Method Summary
 void append(Chord s)
          Append the Chord to this range.
 void concat(ExprTuple sr)
          Append the range to this range.
 Chord getBegin()
          Return the first Chord in the range.
 Chord getEnd()
          Return the last Chord in the range.
 Expr getRef()
          Return a copy of the last expression in this range of CFG nodes.
 void setRef(Expr ref)
          Specify the last expression in this range of CFG nodes.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExprTuple

public ExprTuple(Expr exp,
                 Chord begin,
                 Chord end)
Record a range of Chords. Begin and end may be null or neither arguments may be null.

Parameters:
exp - the result of the last expression or null
begin - first statement in the range
end - last statement in the range

ExprTuple

public ExprTuple(Chord begin,
                 Chord end)
Create a range of Chords. Both or neither arguments may be null.

Parameters:
begin - first statement in the range
end - last statement in the range
Method Detail

getBegin

public Chord getBegin()
Return the first Chord in the range.


getEnd

public Chord getEnd()
Return the last Chord in the range.


concat

public void concat(ExprTuple sr)
Append the range to this range.

Parameters:
sr - is the range to be appended

append

public void append(Chord s)
Append the Chord to this range.

Parameters:
s - is the Chord to be appended

toString

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

getRef

public Expr getRef()
Return a copy of the last expression in this range of CFG nodes.


setRef

public void setRef(Expr ref)
Specify the last expression in this range of CFG nodes.