use of org.vmmagic.unboxed.Offset in project JikesRVM by JikesRVM.
the class Unsafe method putOrderedObject.
@Inline
public void putOrderedObject(Object obj, long offset, Object value) {
Offset off = Offset.fromLong(offset);
Magic.storeStoreBarrier();
if (NEEDS_OBJECT_PUTFIELD_BARRIER) {
objectFieldWrite(obj, value, off, 0);
} else {
Magic.setObjectAtOffset(obj, off, value);
}
}
use of org.vmmagic.unboxed.Offset in project JikesRVM by JikesRVM.
the class Unsafe method putObjectVolatile.
@Inline
public void putObjectVolatile(Object obj, long offset, Object value) {
Offset off = Offset.fromLong(offset);
Magic.storeStoreBarrier();
if (NEEDS_OBJECT_PUTFIELD_BARRIER) {
objectFieldWrite(obj, value, off, 0);
} else {
Magic.setObjectAtOffset(obj, off, value);
}
Magic.fence();
}
use of org.vmmagic.unboxed.Offset in project JikesRVM by JikesRVM.
the class Unsafe method putOrderedLong.
@Inline
public void putOrderedLong(Object obj, long offset, long value) {
Offset off = Offset.fromLong(offset);
Magic.storeStoreBarrier();
if (NEEDS_LONG_PUTFIELD_BARRIER) {
longFieldWrite(obj, value, off, 0);
} else {
Magic.setLongAtOffset(obj, off, value);
}
}
use of org.vmmagic.unboxed.Offset in project JikesRVM by JikesRVM.
the class Unsafe method putOrderedInt.
@Inline
public void putOrderedInt(Object obj, long offset, int value) {
Offset off = Offset.fromLong(offset);
Magic.storeStoreBarrier();
if (NEEDS_INT_PUTFIELD_BARRIER) {
intFieldWrite(obj, value, off, 0);
} else {
Magic.setIntAtOffset(obj, off, value);
}
}
use of org.vmmagic.unboxed.Offset in project JikesRVM by JikesRVM.
the class BytecodeStream method getDoubleConstant.
/**
* Returns the constant at a given constant pool index (as a double).<p>
* Used for ldc2_w
* @param index index into constant pool
* @return double constant
* @see #getConstantIndex()
* @see #getWideConstantIndex()
* @see #getConstantType(int)
* @see #getIntConstant(int)
* @see #getLongConstant(int)
* @see #getFloatConstant(int)
* @see #getStringConstant(int)
*/
public final double getDoubleConstant(int index) {
if (VM.VerifyAssertions) {
VM._assert(opcode == JBC_ldc2_w && getDeclaringClass().getLiteralDescription(index) == CP_DOUBLE);
}
Offset offset = getDeclaringClass().getLiteralOffset(index);
long val_raw = Statics.getSlotContentsAsLong(offset);
double val = Double.longBitsToDouble(val_raw);
return val;
}
Aggregations