frysk.value
Class AddressUnit

java.lang.Object
  extended by frysk.value.ArithmeticUnit
      extended by frysk.value.AddressUnit

public class AddressUnit
extends ArithmeticUnit

Operation handling for pointers and addresses.


Field Summary
 
Fields inherited from class frysk.value.ArithmeticUnit
intType, retType, wordSize
 
Constructor Summary
AddressUnit(ArrayType t, int wordSize)
           
AddressUnit(PointerType t, int wordSize)
           
 
Method Summary
 Value add(Value v1, Value v2)
          Pointer and Address Addition
private  Value addArray(Value v1, Value v2)
           
 Value subtract(Value v1, Value v2)
           
 
Methods inherited from class frysk.value.ArithmeticUnit
bitWiseAnd, bitWiseAndEqual, bitWiseComplement, bitWiseOr, bitWiseOrEqual, bitWiseXor, bitWiseXorEqual, divide, divideEqual, equal, getIntResultType, getLogicalValue, getResultType, greaterThan, greaterThanOrEqualTo, lessThan, lessThanOrEqualTo, logicalAnd, logicalNegation, logicalOr, minusEqual, mod, modEqual, multiply, notEqual, plusEqual, shiftLeft, shiftLeftEqual, shiftRight, shiftRightEqual, timesEqual
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AddressUnit

public AddressUnit(ArrayType t,
                   int wordSize)

AddressUnit

public AddressUnit(PointerType t,
                   int wordSize)
Method Detail

add

public Value add(Value v1,
                 Value v2)
Pointer and Address Addition

Overrides:
add in class ArithmeticUnit

addArray

private Value addArray(Value v1,
                       Value v2)

subtract

public Value subtract(Value v1,
                      Value v2)
Overrides:
subtract in class ArithmeticUnit