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;
}
}
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);
}
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");
}
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();
}
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;
}
Aggregations