frysk.value
Class PointerType

java.lang.Object
  extended by frysk.value.Type
      extended by frysk.value.ArithmeticType
          extended by frysk.value.IntegerType
              extended by frysk.value.IntegerTypeDecorator
                  extended by frysk.value.PointerType

public class PointerType
extends IntegerTypeDecorator

Type for a pointer (or address) of another type.


Field Summary
private  Type type
           
 
Constructor Summary
  PointerType(String name, ByteOrder order, int size, Type type)
          Create a PointerType.
private PointerType(String name, ByteOrder order, int size, Type type, IntegerType accessor)
           
 
Method Summary
protected  Type clone(IntegerType accessor)
          Create a clone of this type, but with the specified acdcessor.
 boolean completeMember(String incomplete, List candidates)
          Complete the type's member; return false if nothing completed.
 Value dereference(Value var1, ByteBuffer taskMem)
          Dereference operation on pointer type.
 ArithmeticUnit getALU(ArrayType type, int wordSize)
           
 ArithmeticUnit getALU(FloatingPointType type, int wordSize)
           
 ArithmeticUnit getALU(int wordSize)
           
 ArithmeticUnit getALU(IntegerType type, int wordSize)
           
 ArithmeticUnit getALU(PointerType type, int wordSize)
           
 ArithmeticUnit getALU(Type type, int wordSize)
           
 Type getSliceType()
          Get the type of slice.
 Type getType()
          Return the element type for array or pointer type.
 Value index(Value v, Value idx, ByteBuffer taskMem)
          Index Operation for pointers.
 Value slice(Value v, Value i, Value j, ByteBuffer taskMem)
          Slice operation for pointers.
(package private)  void toPrint(PrintWriter writer, Location location, ByteBuffer memory, Format format, int indent)
          Print Location as Type in user-readable form; use Format to print basic types.
 void toPrint(StringBuilder stringBuilder, int indent)
          Print this Type after indenting INDENT spaces.
 void toPrintBrief(StringBuilder stringBuilder, int indent)
          Print this Type, possibly briefly, after indenting INDENT spaces.
 
Methods inherited from class frysk.value.IntegerTypeDecorator
getBigInteger, pack, putBigInteger
 
Methods inherited from class frysk.value.IntegerType
assign, bigFloatingPointValue, bigIntegerValue, getBigFloatingPoint, putBigFloatingPoint
 
Methods inherited from class frysk.value.ArithmeticType
assign, createValue, createValue, createValue, createValue, createValue, order, toString
 
Methods inherited from class frysk.value.Type
addressOf, completeFollowSym, getName, getSize, getUltimateType, member, toPrint, toPrint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

private final Type type
Constructor Detail

PointerType

private PointerType(String name,
                    ByteOrder order,
                    int size,
                    Type type,
                    IntegerType accessor)

PointerType

public PointerType(String name,
                   ByteOrder order,
                   int size,
                   Type type)
Create a PointerType.

Parameters:
typep - - Type of pointed to value FIXME: Name is redundant here.
Method Detail

getType

public Type getType()
Description copied from class: Type
Return the element type for array or pointer type.

Overrides:
getType in class Type

toPrint

void toPrint(PrintWriter writer,
             Location location,
             ByteBuffer memory,
             Format format,
             int indent)
Description copied from class: Type
Print Location as Type in user-readable form; use Format to print basic types. If needed, and when memory is non-NULL, it can be used for dereferencing pointers. Indent before printing.

Overrides:
toPrint in class IntegerType

toPrint

public void toPrint(StringBuilder stringBuilder,
                    int indent)
Description copied from class: Type
Print this Type after indenting INDENT spaces.

Overrides:
toPrint in class ArithmeticType
Parameters:
stringBuilder - TODO

toPrintBrief

public void toPrintBrief(StringBuilder stringBuilder,
                         int indent)
Description copied from class: Type
Print this Type, possibly briefly, after indenting INDENT spaces.

Overrides:
toPrintBrief in class Type
Parameters:
stringBuilder - TODO

clone

protected Type clone(IntegerType accessor)
Description copied from class: IntegerTypeDecorator
Create a clone of this type, but with the specified acdcessor.

Specified by:
clone in class IntegerTypeDecorator

dereference

public Value dereference(Value var1,
                         ByteBuffer taskMem)
Dereference operation on pointer type.

Overrides:
dereference in class Type

index

public Value index(Value v,
                   Value idx,
                   ByteBuffer taskMem)
Index Operation for pointers.

Overrides:
index in class Type

slice

public Value slice(Value v,
                   Value i,
                   Value j,
                   ByteBuffer taskMem)
Slice operation for pointers.

Overrides:
slice in class Type

getSliceType

public Type getSliceType()
Description copied from class: Type
Get the type of slice.

Overrides:
getSliceType in class Type

getALU

public ArithmeticUnit getALU(Type type,
                             int wordSize)
Overrides:
getALU in class IntegerType

getALU

public ArithmeticUnit getALU(IntegerType type,
                             int wordSize)
Overrides:
getALU in class IntegerType

getALU

public ArithmeticUnit getALU(PointerType type,
                             int wordSize)
Overrides:
getALU in class IntegerType

getALU

public ArithmeticUnit getALU(FloatingPointType type,
                             int wordSize)
Overrides:
getALU in class IntegerType

getALU

public ArithmeticUnit getALU(ArrayType type,
                             int wordSize)
Overrides:
getALU in class IntegerType

getALU

public ArithmeticUnit getALU(int wordSize)
Overrides:
getALU in class IntegerType

completeMember

public boolean completeMember(String incomplete,
                              List candidates)
Description copied from class: Type
Complete the type's member; return false if nothing completed.

Overrides:
completeMember in class Type