|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object frysk.value.Type frysk.value.ArrayType
public class ArrayType
Type for an array.
Nested Class Summary | |
---|---|
private class |
ArrayType.ArrayIterator
Iterate through the array members. |
Field Summary | |
---|---|
private int[] |
dimension
|
private int |
nrElements
|
private int[] |
stride
|
private Type |
type
|
Constructor Summary | |
---|---|
ArrayType(Type type,
int size,
ArrayList dimensions)
Create an ArrayType XXX: dimensions needs to be a set of ranges; this upper bound is sooooo confusing. |
Method Summary | |
---|---|
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 array type. |
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 on array V and index IDX. |
private Location |
slice(Location location,
int idx,
int count)
|
Value |
slice(Value v,
Value i,
Value j,
ByteBuffer taskMem)
Slice returns a slice of an array. |
(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. |
private boolean |
toPrintVector(PrintWriter writer,
Type type,
ArrayType.ArrayIterator e,
ByteBuffer memory,
Format format,
int indent)
|
String |
toString()
For debugging and tracing; just dump the Type's name. |
Methods inherited from class frysk.value.Type |
---|
addressOf, assign, completeFollowSym, getALU, getALU, getName, getSize, getUltimateType, member, pack, toPrint, toPrint, toPrintBrief |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final Type type
private final int[] dimension
private final int[] stride
private int nrElements
Constructor Detail |
---|
public ArrayType(Type type, int size, ArrayList dimensions)
typep
- - Type of each array elementdimensions
- - ArrayList of dimension upper bounds.Method Detail |
---|
public String toString()
Type
toString
in class Type
public Type getType()
Type
getType
in class Type
private Location slice(Location location, int idx, int count)
public Value index(Value v, Value idx, ByteBuffer taskMem)
index
in class Type
taskMem
- - unused here.public Value slice(Value v, Value i, Value j, ByteBuffer taskMem)
slice
in class Type
public Type getSliceType()
Type
getSliceType
in class Type
public Value dereference(Value var1, ByteBuffer taskMem)
dereference
in class Type
void toPrint(PrintWriter writer, Location location, ByteBuffer memory, Format format, int indent)
Type
toPrint
in class Type
private boolean toPrintVector(PrintWriter writer, Type type, ArrayType.ArrayIterator e, ByteBuffer memory, Format format, int indent)
public void toPrint(StringBuilder stringBuilder, int indent)
Type
toPrint
in class Type
stringBuilder
- TODOpublic ArithmeticUnit getALU(Type type, int wordSize)
getALU
in class Type
public ArithmeticUnit getALU(IntegerType type, int wordSize)
getALU
in class Type
public ArithmeticUnit getALU(PointerType type, int wordSize)
getALU
in class Type
public ArithmeticUnit getALU(int wordSize)
getALU
in class Type
public boolean completeMember(String incomplete, List candidates)
Type
completeMember
in class Type
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |