Class LValue

java.lang.Object
  extended byValue
      extended byLValue

public class LValue
extends Value

LValue is a specialized Value extension to represent the address-valued result of evaluating a memory designator. Any variable or designator expression used in an l-value context is represented as an LValue.


Field Summary
 
Fields inherited from class Value
type, val
 
Constructor Summary
LValue(java.lang.Object val, TypeNode type)
           
 
Method Summary
 int getVal()
          Return the value of this as an integer address.
 
Methods inherited from class Value
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LValue

public LValue(java.lang.Object val,
              TypeNode type)
Method Detail

getVal

public int getVal()
Return the value of this as an integer address. This method signifies the key distinction between Value as an r-value, an the LValue extension as an l-value. Namely, the val component of an r-Value is an Object, meaning some form of data value. As such, it can be accessed directly via the public .val field, which is of type Object. In contrast, the val component of an l-value is an integer memory address, which is delivered with this getVal method.