Search in sources :

Example 56 with RVMField

use of org.jikesrvm.classloader.RVMField in project JikesRVM by JikesRVM.

the class VMCommonLibrarySupport method setSystemStreamField.

/**
 * Set the value of a static final stream field of the System class
 * @param fieldName name of field to set
 * @param stream value
 */
static void setSystemStreamField(String fieldName, Object stream) {
    try {
        RVMField field = ((RVMClass) JikesRVMSupport.getTypeForClass(System.class)).findDeclaredField(Atom.findOrCreateUnicodeAtom(fieldName));
        field.setObjectValueUnchecked(null, stream);
    } catch (Exception e) {
        throw new Error("Error setting stream field " + fieldName + " of java.lang.System", e);
    }
}
Also used : RVMField(org.jikesrvm.classloader.RVMField) RVMClass(org.jikesrvm.classloader.RVMClass)

Example 57 with RVMField

use of org.jikesrvm.classloader.RVMField in project JikesRVM by JikesRVM.

the class VMObjectStreamClass method setIntNative.

static void setIntNative(Field field, Object obj, int val) {
    RVMField f = java.lang.reflect.JikesRVMSupport.getFieldOf(field);
    f.setIntValueUnchecked(obj, val);
}
Also used : RVMField(org.jikesrvm.classloader.RVMField)

Example 58 with RVMField

use of org.jikesrvm.classloader.RVMField in project JikesRVM by JikesRVM.

the class VMObjectStreamClass method setBooleanNative.

static void setBooleanNative(Field field, Object obj, boolean val) {
    RVMField f = java.lang.reflect.JikesRVMSupport.getFieldOf(field);
    f.setBooleanValueUnchecked(obj, val);
}
Also used : RVMField(org.jikesrvm.classloader.RVMField)

Example 59 with RVMField

use of org.jikesrvm.classloader.RVMField in project JikesRVM by JikesRVM.

the class VMObjectStreamClass method setFloatNative.

static void setFloatNative(Field field, Object obj, float val) {
    RVMField f = java.lang.reflect.JikesRVMSupport.getFieldOf(field);
    f.setFloatValueUnchecked(obj, val);
}
Also used : RVMField(org.jikesrvm.classloader.RVMField)

Example 60 with RVMField

use of org.jikesrvm.classloader.RVMField in project JikesRVM by JikesRVM.

the class VMObjectStreamClass method setShortNative.

static void setShortNative(Field field, Object obj, short val) {
    RVMField f = java.lang.reflect.JikesRVMSupport.getFieldOf(field);
    f.setShortValueUnchecked(obj, val);
}
Also used : RVMField(org.jikesrvm.classloader.RVMField)

Aggregations

RVMField (org.jikesrvm.classloader.RVMField)80 TypeReference (org.jikesrvm.classloader.TypeReference)21 Offset (org.vmmagic.unboxed.Offset)14 RVMClass (org.jikesrvm.classloader.RVMClass)12 Operand (org.jikesrvm.compilers.opt.ir.operand.Operand)9 Field (java.lang.reflect.Field)8 Instruction (org.jikesrvm.compilers.opt.ir.Instruction)8 RegisterOperand (org.jikesrvm.compilers.opt.ir.operand.RegisterOperand)8 Atom (org.jikesrvm.classloader.Atom)7 IntConstantOperand (org.jikesrvm.compilers.opt.ir.operand.IntConstantOperand)6 LocationOperand (org.jikesrvm.compilers.opt.ir.operand.LocationOperand)6 RVMType (org.jikesrvm.classloader.RVMType)5 AddressConstantOperand (org.jikesrvm.compilers.opt.ir.operand.AddressConstantOperand)5 MethodOperand (org.jikesrvm.compilers.opt.ir.operand.MethodOperand)5 Address (org.vmmagic.unboxed.Address)5 FieldReference (org.jikesrvm.classloader.FieldReference)4 RVMMethod (org.jikesrvm.classloader.RVMMethod)4 BranchProfileOperand (org.jikesrvm.compilers.opt.ir.operand.BranchProfileOperand)4 ConditionOperand (org.jikesrvm.compilers.opt.ir.operand.ConditionOperand)4 TIBConstantOperand (org.jikesrvm.compilers.opt.ir.operand.TIBConstantOperand)4