if (field.isStatic()) { final VmStaticField sf = (VmStaticField)field; initialize(sf); Unsafe.setObject(getStaticFieldAddress(sf), value); SoftByteCodes.putstaticWriteBarrier(sf.getStaticsIndex(), value); } else { final VmInstanceField inf = (VmInstanceField)field; final int offset = inf.getOffset(); Unsafe.setObject(o, offset, value); SoftByteCodes.putfieldWriteBarrier(o, offset, value); } }
if (field.isStatic()) { final VmStaticField sf = (VmStaticField) field; initialize(sf); Unsafe.setObject(getStaticFieldAddress(sf), value); final VmWriteBarrier wb = Vm.getVm().getHeapManager() .getWriteBarrier(); if (wb != null) { wb.putstaticWriteBarrier(sf.getStaticsIndex(), value); } } else { final VmInstanceField inf = (VmInstanceField) field; final int offset = inf.getOffset(); Unsafe.setObject(o, offset, value); final VmWriteBarrier wb = Vm.getVm().getHeapManager() .getWriteBarrier(); if (wb != null) { wb.putfieldWriteBarrier(o, offset, value); } } }
	public static void setObject(VmField field, Object o, Object value) {		if (field.isStatic()) {			final VmStaticField sf = (VmStaticField)field;			initialize(sf);			Unsafe.setObject(getStaticFieldAddress(sf), value);			SoftByteCodes.putstaticWriteBarrier(sf.getStaticsIndex(), value);		} else {			final VmInstanceField inf = (VmInstanceField)field;			final int offset = inf.getOffset();			Unsafe.setObject(o, offset, value);			SoftByteCodes.putfieldWriteBarrier(o, offset, value);		}	}