}
}
public static void setObject(VmField field, Object o, Object value) {
if (field.isStatic()) {
final VmStaticField sf = (VmStaticField) field;
initialize(sf);
getStaticFieldAddress(sf).store(ObjectReference.fromObject(value));
final VmWriteBarrier wb = VmUtils.getVm().getHeapManager().getWriteBarrier();
if (wb != null) {
if (sf.isShared()) {
wb.putstaticWriteBarrier(true, sf.getSharedStaticsIndex(), value);
} else {
wb.putstaticWriteBarrier(true, sf.getIsolatedStaticsIndex(), value);
}
}
} else {
final VmInstanceField inf = (VmInstanceField) field;
final int offset = inf.getOffset();