Search in sources :

Example 66 with Inline

use of org.vmmagic.pragma.Inline in project JikesRVM by JikesRVM.

the class VMCommonLibrarySupport method getShort.

@Inline(value = Inline.When.ArgumentsAreConstant, arguments = { 1 })
static short getShort(Object object, RVMField field, Field jlrField, RVMClass accessingClass) throws IllegalAccessException, IllegalArgumentException {
    checkReadAccess(object, field, jlrField, accessingClass);
    TypeReference type = field.getType();
    if (type.isShortType()) {
        return field.getShortValueUnchecked(object);
    } else if (type.isByteType()) {
        return field.getByteValueUnchecked(object);
    } else {
        throwNewIllegalArgumentException("field type mismatch");
        return 0;
    }
}
Also used : TypeReference(org.jikesrvm.classloader.TypeReference) Inline(org.vmmagic.pragma.Inline) NoInline(org.vmmagic.pragma.NoInline)

Example 67 with Inline

use of org.vmmagic.pragma.Inline in project JikesRVM by JikesRVM.

the class VMCommonLibrarySupport method getBoolean.

@Inline(value = Inline.When.ArgumentsAreConstant, arguments = { 1 })
static boolean getBoolean(Object object, RVMField field, Field jlrField, RVMClass accessingClass) throws IllegalAccessException, IllegalArgumentException {
    checkReadAccess(object, field, jlrField, accessingClass);
    TypeReference type = field.getType();
    if (!type.isBooleanType())
        throwNewIllegalArgumentException("field type mismatch");
    return field.getBooleanValueUnchecked(object);
}
Also used : TypeReference(org.jikesrvm.classloader.TypeReference) Inline(org.vmmagic.pragma.Inline) NoInline(org.vmmagic.pragma.NoInline)

Example 68 with Inline

use of org.vmmagic.pragma.Inline in project JikesRVM by JikesRVM.

the class VMCommonLibrarySupport method setFloatInternal.

@Inline(value = Inline.When.ArgumentsAreConstant, arguments = { 2 })
private static void setFloatInternal(Object object, float value, RVMField field) throws IllegalArgumentException {
    TypeReference type = field.getType();
    if (type.isFloatType())
        field.setFloatValueUnchecked(object, value);
    else if (type.isDoubleType())
        field.setDoubleValueUnchecked(object, value);
    else
        throwNewIllegalArgumentException("field type mismatch");
}
Also used : TypeReference(org.jikesrvm.classloader.TypeReference) Inline(org.vmmagic.pragma.Inline) NoInline(org.vmmagic.pragma.NoInline)

Example 69 with Inline

use of org.vmmagic.pragma.Inline in project JikesRVM by JikesRVM.

the class Unsafe method putIntVolatile.

@Inline
public void putIntVolatile(Object obj, long offset, int value) {
    Magic.storeStoreBarrier();
    Offset off = Offset.fromLong(offset);
    if (NEEDS_INT_PUTFIELD_BARRIER) {
        intFieldWrite(obj, value, off, 0);
    } else {
        Magic.setIntAtOffset(obj, off, value);
    }
    Magic.fence();
}
Also used : Offset(org.vmmagic.unboxed.Offset) Inline(org.vmmagic.pragma.Inline)

Example 70 with Inline

use of org.vmmagic.pragma.Inline in project JikesRVM by JikesRVM.

the class Unsafe method getObject.

@Inline
public Object getObject(Object obj, long offset) {
    Offset off = Offset.fromLong(offset);
    Object result;
    if (NEEDS_OBJECT_GETFIELD_BARRIER) {
        result = objectFieldRead(obj, off, 0);
    } else {
        result = Magic.getObjectAtOffset(obj, off);
    }
    return result;
}
Also used : Offset(org.vmmagic.unboxed.Offset) Inline(org.vmmagic.pragma.Inline)

Aggregations

Inline (org.vmmagic.pragma.Inline)110 NoInline (org.vmmagic.pragma.NoInline)42 Entrypoint (org.vmmagic.pragma.Entrypoint)40 Offset (org.vmmagic.unboxed.Offset)38 ObjectReference (org.vmmagic.unboxed.ObjectReference)35 Address (org.vmmagic.unboxed.Address)15 Word (org.vmmagic.unboxed.Word)15 TypeReference (org.jikesrvm.classloader.TypeReference)12 Uninterruptible (org.vmmagic.pragma.Uninterruptible)6 RVMType (org.jikesrvm.classloader.RVMType)5 RVMClass (org.jikesrvm.classloader.RVMClass)4 Unpreemptible (org.vmmagic.pragma.Unpreemptible)4 RVMClassLoader (org.jikesrvm.classloader.RVMClassLoader)3 TIB (org.jikesrvm.objectmodel.TIB)3 Extent (org.vmmagic.unboxed.Extent)3 MethodReference (org.jikesrvm.classloader.MethodReference)2 ForwardReference (org.jikesrvm.compilers.common.assembler.ForwardReference)2 RVMThread (org.jikesrvm.scheduler.RVMThread)2 CollectorContext (org.mmtk.plan.CollectorContext)2 NoNullCheck (org.vmmagic.pragma.NoNullCheck)2