< prev index next >
src/java.base/share/classes/java/lang/invoke/VarHandle.java
Print this page
rev 17358 : 8182487: Add Unsafe.objectFieldOffset(Class, String)
Reviewed-by: dsimms, twisti, bchristi, mgerdin
*** 1998,2013 ****
});
private static final long VFORM_OFFSET;
static {
! try {
! VFORM_OFFSET = UNSAFE.objectFieldOffset(VarHandle.class.getDeclaredField("vform"));
! }
! catch (ReflectiveOperationException e) {
! throw newInternalError(e);
! }
// The VarHandleGuards must be initialized to ensure correct
// compilation of the guard methods
UNSAFE.ensureClassInitialized(VarHandleGuards.class);
}
--- 1998,2008 ----
});
private static final long VFORM_OFFSET;
static {
! VFORM_OFFSET = UNSAFE.objectFieldOffset(VarHandle.class, "vform");
// The VarHandleGuards must be initialized to ensure correct
// compilation of the guard methods
UNSAFE.ensureClassInitialized(VarHandleGuards.class);
}
< prev index next >