Class VariableInfo

  • Direct Known Subclasses:
    LetInfo, ParameterInfo

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

      • slot

        private int slot
      • usages

        private int usages
    • Constructor Detail

      • VariableInfo

        public VariableInfo​(Location location)
    • Method Detail

      • getName

        public abstract java.lang.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.