| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectscale.common.Root
scale.score.Note
scale.score.chords.Chord
scale.score.chords.SequentialChord
scale.score.chords.LoopHeaderChord
scale.score.chords.BeginChord
public class BeginChord
This class is used to represent the very first node in the CFG.
$Id: BeginChord.java,v 1.28 2005-02-07 21:28:34 burrill Exp $
 Copyright 2005 by the Scale Compiler Group,
 Department of Computer Science
 University of Massachusetts,
 Amherst MA. 01003, USA
 All Rights Reserved.
| Field Summary | 
|---|
| Fields inherited from class scale.score.chords.LoopHeaderChord | 
|---|
| classTrace | 
| Fields inherited from class scale.score.chords.Chord | 
|---|
| lineNumber | 
| Constructor Summary | |
|---|---|
| BeginChord(Scribble scribble)Create the first node in the CFG. | |
| BeginChord(Scribble scribble,
           Chord next)Create the first node in the CFG. | |
| Method Summary | |
|---|---|
|  void | addInCfgEdge(Chord node)Add an in-coming CFG edge. | 
|  Chord | copy()Make a copy of this loop header sans any data dependence information. | 
| static int | created()Return the number of instances of this class that were created. | 
|  LoopPreHeaderChord | getPreHeader()Return nullfor theLoopPreHeaderChordinstance for this "loop". | 
|  boolean | isTrueLoop()Return true if this loop is an actual loop in the program. | 
|  void | visit(Predicate p)Process a node by calling its associated routine. | 
| Methods inherited from class scale.score.Note | 
|---|
| getChord, getEssentialUse, setAnnotationLevel, setReportLevel, toString | 
| Methods inherited from class scale.common.Root | 
|---|
| addAnnotation, allAnnotations, allMatchingAnnotations, getAnnotation, getDisplayName, getDisplayString, getNodeCount, getNodeID, hasAnnotation, hasEqualAnnotation, hashCode, removeAnnotation, removeAnnotations, toStringAnnotations, toStringClass, trace, trace, trace | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public BeginChord(Scribble scribble,
                  Chord next)
scribble - represents the entire CFGnext - is the out-going CFG edgepublic BeginChord(Scribble scribble)
scribble - represents the entire CFG| Method Detail | 
|---|
public static int created()
public Chord copy()
LoopHeaderChord
copy in class LoopHeaderChordpublic void visit(Predicate p)
Note
 Each class has a visit(Predicate p) method.  For
 example, in class ABC:
 
   public void visit(Predicate p)
   {
     p.visitABC(this);
   }
 
 and the class that implements Predicate has a method
 
   public void visitABC(Note n)
   {
     ABC a = (ABC) n;
     ...
   }
 
 Thus, the class that implements Predicate can call
 n.visit(this);where
n is a Note sub-class without
 determining which specific sub-class n is.
 The visit pattern basically avoids implementing a large
 switch statement or defining different methods
 in each class for some purpose.
visit in class LoopHeaderChordPredicatepublic void addInCfgEdge(Chord node)
Chord
addInCfgEdge in class Chordnode - CFG node which is pointing to mepublic boolean isTrueLoop()
isTrueLoop in class LoopHeaderChordpublic LoopPreHeaderChord getPreHeader()
null for the LoopPreHeaderChord instance for this "loop".
getPreHeader in class LoopHeaderChord| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||