"

2013 FRC Java API

"

com.sun.squawk.compiler
Class Type

java.lang.Object
  extended by com.sun.squawk.compiler.Type

public class Type
extends Object

Type representation and types for the Compiler.


Field Summary
static Type BYTE
          Define secondary types.
static int Code_A
          Opcode subtype codes.
static int Code_B
          Opcode subtype codes.
static int Code_C
          Opcode subtype codes.
static int Code_D
          Opcode subtype codes.
static int Code_F
          Opcode subtype codes.
static int Code_G
          Opcode subtype codes.
static int Code_I
          Opcode subtype codes.
static int Code_L
          Opcode subtype codes.
static int Code_O
          Opcode subtype codes.
static int Code_R
          Opcode subtype codes.
static int Code_S
          Opcode subtype codes.
static int Code_U
          Opcode subtype codes.
static int Code_V
          Opcode subtype codes.
static Type DOUBLE
          Define primary types.
static Type FLOAT
          Define primary types.
static Type INT
          Define primary types.
static Type IP
          Special dummy types for specifing the MP, IP and LP variables.
static Type LONG
          Define primary types.
static Type LP
          Special dummy types for specifing the MP, IP and LP variables.
static Type MP
          Special dummy types for specifing the MP, IP and LP variables.
static Type OOP
          Define primary types.
static Type REF
          Define primary types.
static int RELOC_ABSOLUTE_INT
          Relocation type for absolute int addresses.
static int RELOC_RELATIVE_INT
          Relocation type for relative int addresses.
static Type SHORT
          Define secondary types.
static Type SS
          Special dummy types for specifing the MP, IP and LP variables.
static Type UBYTE
          Define secondary types.
static Type UINT
          Define primary types.
static Type ULONG
          Define primary types.
static Type USHORT
          Define secondary types.
static Type UWORD
          Define the size of stack entries.
static Type VOID
          Special dummy type for call and return.
static Type WORD
          Define the size of stack entries.
 
Constructor Summary
Type(int asize, int osize, int code, String name)
          Constructor.
Type(int asize, int osize, int code, Type primitive, String name)
          Constructor.
 
Method Summary
 int getActivationSize()
          Get the activation record size.
 Type getPrimitiveType()
          Get the primitive version of the type.
 int getStructureSize()
          Get the structure size.
 int getTypeCode()
          Get the opcode code.
 boolean isOop()
          Test the type to see if it is an oop
 boolean isPointer()
          Test the type to see if it is a pointer
 boolean isPrimary()
          Test the type to see if it is a primary type.
 boolean isRef()
          Test the type to see if it is a reference
 boolean isSecondary()
          Test the type to see if it is a secondary type.
 boolean isSigned()
          Test the type to see if it is a signed type.
 void print()
          Prints to stderr information about this type.
 String toString()
          Gets the name of the type
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Code_V

public static final int Code_V
Opcode subtype codes.

See Also:
Constant Field Values

Code_R

public static final int Code_R
Opcode subtype codes.

See Also:
Constant Field Values

Code_O

public static final int Code_O
Opcode subtype codes.

See Also:
Constant Field Values

Code_I

public static final int Code_I
Opcode subtype codes.

See Also:
Constant Field Values

Code_U

public static final int Code_U
Opcode subtype codes.

See Also:
Constant Field Values

Code_L

public static final int Code_L
Opcode subtype codes.

See Also:
Constant Field Values

Code_F

public static final int Code_F
Opcode subtype codes.

See Also:
Constant Field Values

Code_D

public static final int Code_D
Opcode subtype codes.

See Also:
Constant Field Values

Code_B

public static final int Code_B
Opcode subtype codes.

See Also:
Constant Field Values

Code_A

public static final int Code_A
Opcode subtype codes.

See Also:
Constant Field Values

Code_S

public static final int Code_S
Opcode subtype codes.

See Also:
Constant Field Values

Code_C

public static final int Code_C
Opcode subtype codes.

See Also:
Constant Field Values

Code_G

public static final int Code_G
Opcode subtype codes.

See Also:
Constant Field Values

REF

public static final Type REF
Define primary types.


OOP

public static final Type OOP
Define primary types.


INT

public static final Type INT
Define primary types.


UINT

public static final Type UINT
Define primary types.


LONG

public static final Type LONG
Define primary types.


ULONG

public static final Type ULONG
Define primary types.


FLOAT

public static final Type FLOAT
Define primary types.


DOUBLE

public static final Type DOUBLE
Define primary types.


BYTE

public static final Type BYTE
Define secondary types.


UBYTE

public static final Type UBYTE
Define secondary types.


SHORT

public static final Type SHORT
Define secondary types.


USHORT

public static final Type USHORT
Define secondary types.


VOID

public static final Type VOID
Special dummy type for call and return.


MP

public static final Type MP
Special dummy types for specifing the MP, IP and LP variables.


IP

public static final Type IP
Special dummy types for specifing the MP, IP and LP variables.


LP

public static final Type LP
Special dummy types for specifing the MP, IP and LP variables.


SS

public static final Type SS
Special dummy types for specifing the MP, IP and LP variables.


WORD

public static final Type WORD
Define the size of stack entries.


UWORD

public static final Type UWORD
Define the size of stack entries.


RELOC_ABSOLUTE_INT

public static final int RELOC_ABSOLUTE_INT
Relocation type for absolute int addresses.

See Also:
Constant Field Values

RELOC_RELATIVE_INT

public static final int RELOC_RELATIVE_INT
Relocation type for relative int addresses.

See Also:
Constant Field Values
Constructor Detail

Type

public Type(int asize,
            int osize,
            int code,
            String name)
Constructor.

Parameters:
asize - the size in words for this type in an activation record
osize - the size in bytes for this type in an object or array
code - the type code the form the bottom 4 bits of the IR opcodes
name - the name if the type

Type

public Type(int asize,
            int osize,
            int code,
            Type primitive,
            String name)
Constructor.

Parameters:
asize - the size in words for this type in an activation record
osize - the size in bytes for this type in an object or array
code - the type code the form the bottom 4 bits of the IR opcodes
primitive - type for this type
name - the name if the type
Method Detail

getActivationSize

public int getActivationSize()
Get the activation record size.

Returns:
the size in words for this type in an activation record

getStructureSize

public int getStructureSize()
Get the structure size.

Returns:
the size in bytes for this type in an object or array

getTypeCode

public int getTypeCode()
Get the opcode code.

Returns:
code the type code the form the bottom 4 bits of the IR opcodes

getPrimitiveType

public Type getPrimitiveType()
Get the primitive version of the type.

Returns:
the primitive the type for this type

isPointer

public boolean isPointer()
Test the type to see if it is a pointer

Returns:
true if it is

isOop

public boolean isOop()
Test the type to see if it is an oop

Returns:
true if it is

isRef

public boolean isRef()
Test the type to see if it is a reference

Returns:
true if it is

isPrimary

public boolean isPrimary()
Test the type to see if it is a primary type.

Returns:
true if it is a primary type, false otherwise.

isSecondary

public boolean isSecondary()
Test the type to see if it is a secondary type.

Returns:
true if it is a secondary type, false otherwise.

isSigned

public boolean isSigned()
Test the type to see if it is a signed type.

Returns:
true if it is a signed type, false otherwise.

toString

public String toString()
Gets the name of the type

Overrides:
toString in class Object
Returns:
a string representation of the object.

print

public void print()
Prints to stderr information about this type. This method is used for debuggging purposes.


"

2013 FRC Java API

"

"
For updated information see the Java FRC site
"