All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class prolog.TermInfoDictionary

java.lang.Object
   |
   +----prolog.TermInfoDictionary

public class TermInfoDictionary
extends Object
The symbol table for the compiler. Keep track of Term -> TermInfo mappings.


Constructor Index

 o TermInfoDictionary(short)
 o TermInfoDictionary(TermInfoDictionary)
Implements lexical scoping.

Method Index

 o allocLV()
Allocate a new LocalVariable number.
 o get(Term)
Searches this lexical context and its parents for the TermInfo object associated with this Term.
 o set(Term, LocalVariableGen, ClauseCodeGen)
Sets the Location object associated with this Term, creating a new Location object based on the type of the term.
 o set(Term, Location, TermType)
Sets the Location and TermType associated with the given Term in the current scope.
 o set(Term, TermInfo)
Sets the TermInfo object associated with this Term.
 o toString()

Constructors

 o TermInfoDictionary
 TermInfoDictionary(short first_avail_lv)
 o TermInfoDictionary
 TermInfoDictionary(TermInfoDictionary parent)
Implements lexical scoping. The new TermInfoDictionary is the most-local scope.

Methods

 o allocLV
 int allocLV()
Allocate a new LocalVariable number.

 o get
 public TermInfo get(Term t)
Searches this lexical context and its parents for the TermInfo object associated with this Term. If we find it in a parent context, we copy it into this one so that it can be modified with impunity.

 o set
 void set(Term t,
          TermInfo ti)
Sets the TermInfo object associated with this Term.

 o set
 public TermInfo set(Term t,
                     Location location,
                     TermType type)
Sets the Location and TermType associated with the given Term in the current scope.

 o set
 public void set(Term t,
                 LocalVariableGen lv,
                 ClauseCodeGen ccg)
Sets the Location object associated with this Term, creating a new Location object based on the type of the term.

 o toString
 public String toString()
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index