scale.clef2scribble
Class GotoFix

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

public class GotoFix
extends java.lang.Object

This class is used to record forward gotos.

$Id: GotoFix.java,v 1.17 2007-10-04 19:58:10 burrill Exp $

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

This record is a GotoChord, LabelDecl pair. The LabelDecl is used to find the actual score node to which the label refers. The target of the GotoChord is then set.


Constructor Summary
GotoFix()
           
 
Method Summary
 void add(Chord bc, java.lang.Object label, java.lang.Object index)
          Record a new forward reference.
 void defineLabel(java.lang.Object label, Chord s)
          Associate a label with a Chord.
 void fixupGotos()
          Fix whatever forward gotos there were.
 Chord getChord(java.lang.Object label)
          Return the Chord associated with this label.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GotoFix

public GotoFix()
Method Detail

add

public void add(Chord bc,
                java.lang.Object label,
                java.lang.Object index)
Record a new forward reference.

Parameters:
bc - is the branch Chord
label - is the label branched to
index - is the index of the out-going CFG edge of the branch Chord

defineLabel

public void defineLabel(java.lang.Object label,
                        Chord s)
Associate a label with a Chord.


getChord

public Chord getChord(java.lang.Object label)
Return the Chord associated with this label.


fixupGotos

public void fixupGotos()
Fix whatever forward gotos there were.