Class VariableInfo

java.lang.Object
com.schibsted.spt.data.jslt.impl.VariableInfo
Direct Known Subclasses:
LetInfo, ParameterInfo

public abstract class VariableInfo extends Object
Class encapsulating what we know about a specific variable. Keeps track of the stack frame slot, but mostly used for optimizations.
  • Field Details

    • slot

      private int slot
    • location

      private Location location
    • usages

      private int usages
  • Constructor Details

    • VariableInfo

      public VariableInfo(Location location)
  • Method Details

    • getName

      public abstract String getName()
    • setSlot

      public void setSlot(int slot)
    • getSlot

      public int getSlot()
    • getLocation

      public Location getLocation()
    • incrementUsageCount

      public void incrementUsageCount()
    • getUsageCount

      public int getUsageCount()
    • isLet

      public boolean isLet()
    • getDeclaration

      public ExpressionNode getDeclaration()
      The expression that computes this variable's value. null for parameters, because in that case we don't know the expression.