All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class prolog.Location

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

public class Location
extends Object
Represents a Term's location, i.e. which LocalVariable it's in.


Variable Index

 o cast_pos
== null ? this term has the Java type dictated by the type field.

Constructor Index

 o Location(LocalVariableGen)
Location of a Term.
 o Location(LocalVariableGen, LocalVariableGen)
Location of a CompoundType.
 o Location(TermInfo, int)

Method Index

 o isArgLocation()
 o load(ClauseCodeGen, ObjectType)
Loads this Term onto the stack, loading its parent, etc.
 o load_args(ClauseCodeGen)
Loads a reference to the Compound's args array onto the stack.
 o set(LocalVariableGen)
 o store_do(ClauseCodeGen)
Actually stores a Term into this location.
 o store_prep(ClauseCodeGen)
Prepares to store a Term into this location.
 o toString()
Sets the LV for the Term associated with this Location.

Variables

 o cast_pos
 InstructionHandle cast_pos
== null ? this term has the Java type dictated by the type field.

Otherwise it has type Term, but can be cast to something specific by inserting a checkcast instruction at this point.

Constructors

 o Location
 Location(LocalVariableGen term_lv)
Location of a Term.

Parameters:
term_lv - the location of this Term.
 o Location
 Location(LocalVariableGen term_lv,
          LocalVariableGen args_lv)
Location of a CompoundType.

Parameters:
t - the location of the term.
a - the location of the args array.
 o Location
 Location(TermInfo ti,
          int arg_index)
Parameters:
l - the location of the Compound in which this Term is an argument.
arg_index - the position of this argument.

Methods

 o set
 void set(LocalVariableGen term_lv)
 o load
 void load(ClauseCodeGen ccg,
           ObjectType type)
Loads this Term onto the stack, loading its parent, etc. if necessary.

Parameters:
cast - should this object be cast to it's most-specific type?
 o load_args
 void load_args(ClauseCodeGen ccg)
Loads a reference to the Compound's args array onto the stack.

Stack: ... -> (Term[])ArgsRef

 o store_prep
 void store_prep(ClauseCodeGen ccg)
Prepares to store a Term into this location. This method is invoked before the Term is pushed onto the stack.

 o store_do
 void store_do(ClauseCodeGen ccg)
Actually stores a Term into this location. This method is invoked after the Term is pushed onto the stack.

 o isArgLocation
 boolean isArgLocation()
 o toString
 public String toString()
Sets the LV for the Term associated with this Location.

Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index