cetus.hir
Class SymbolTools

java.lang.Object
  extended by cetus.hir.SymbolTools

public final class SymbolTools
extends java.lang.Object


Constructor Summary
SymbolTools()
           
 
Method Summary
static void linkSymbol(Traversable tr)
          Makes links from all IDExpression objects in the program to their corresponding declarators while generating warnings if there is any undeclared variables or functions.
static void searchAndLink(Identifier id)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SymbolTools

public SymbolTools()
Method Detail

linkSymbol

public static void linkSymbol(Traversable tr)
Makes links from all IDExpression objects in the program to their corresponding declarators while generating warnings if there is any undeclared variables or functions. This method is called with the whole program, before any Cetus passes by default and provides a short cut to the declaration point, which enables faster access to the declaration when necessary. Pass writers can call this routine after changing a certain part of the program, e.g., a specific program section within a scope, to reflect the change due to new insertion of declaration.

Parameters:
tr - the input cetus IR.

searchAndLink

public static void searchAndLink(Identifier id)