|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jikesrvm.compilers.opt.StaticFieldReader
public abstract class StaticFieldReader
Code for accessing the value of a static field at compile time. This is used to optimize getstatic's of initialized static fields by replacing the getstatic with a constant operand.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
StaticFieldReader()
|
|
| Method Summary | |
|---|---|
static Address |
getAddressStaticFieldValue(RVMField field)
Returns the current contents of a Address static field. |
static double |
getDoubleStaticFieldValue(RVMField field)
Returns the current contents of a double static field. |
static ConstantOperand |
getFieldValueAsConstant(RVMField field,
Object obj)
Read the field from obj and return as the appropriate constant |
static float |
getFloatStaticFieldValue(RVMField field)
Returns the current contents of a float static field. |
static int |
getIntStaticFieldValue(RVMField field)
Returns the current contents of an int-like static field. |
private static Field |
getJDKField(RVMField field)
Utilitiy to convert a RVMField to a java.lang.reflect.Field |
static long |
getLongStaticFieldValue(RVMField field)
Returns the current contents of a long static field. |
static Object |
getObjectStaticFieldValue(RVMField field)
Returns the current contents of a reference static field. |
static ConstantOperand |
getStaticFieldValue(RVMField field)
Returns a constant operand with the current value of a static field. |
static TypeReference |
getTypeFromStaticField(RVMField field)
Get the type of an object contained in a static field. |
static boolean |
isStaticFieldNull(RVMField field)
Does a static field null contain null? |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StaticFieldReader()
| Method Detail |
|---|
public static ConstantOperand getFieldValueAsConstant(RVMField field,
Object obj)
throws NoSuchFieldException
NoSuchFieldException
public static ConstantOperand getStaticFieldValue(RVMField field)
throws NoSuchFieldException
field - the static field whose current value we want to read
NoSuchFieldException
public static int getIntStaticFieldValue(RVMField field)
throws NoSuchFieldException
field - a static field
NoSuchFieldException
public static float getFloatStaticFieldValue(RVMField field)
throws NoSuchFieldException
field - a static field
NoSuchFieldException
public static long getLongStaticFieldValue(RVMField field)
throws NoSuchFieldException
field - a static field
NoSuchFieldException
public static double getDoubleStaticFieldValue(RVMField field)
throws NoSuchFieldException
field - a static field
NoSuchFieldException
public static Object getObjectStaticFieldValue(RVMField field)
throws NoSuchFieldException
field - a static field
NoSuchFieldException
public static Address getAddressStaticFieldValue(RVMField field)
throws NoSuchFieldException
field - a static field
NoSuchFieldException
public static boolean isStaticFieldNull(RVMField field)
throws NoSuchFieldException
field - a static field
NoSuchFieldException
public static TypeReference getTypeFromStaticField(RVMField field)
throws NoSuchFieldException
field - a static field
NoSuchFieldException
private static Field getJDKField(RVMField field)
throws NoSuchFieldException
NoSuchFieldException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||