mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8182487: Add Unsafe.objectFieldOffset(Class, String)
Reviewed-by: dsimms, twisti, bchristi, mgerdin, chegar, psandoz
This commit is contained in:
parent
f72f966df1
commit
928ca49c21
21 changed files with 130 additions and 270 deletions
|
@ -276,11 +276,9 @@ public class CallSite {
|
|||
if (offset > 0) {
|
||||
return offset;
|
||||
}
|
||||
try {
|
||||
offset = TARGET_OFFSET = UNSAFE.objectFieldOffset(CallSite.class.getDeclaredField("target"));
|
||||
assert(offset > 0);
|
||||
return offset;
|
||||
} catch (Exception ex) { throw newInternalError(ex); }
|
||||
offset = TARGET_OFFSET = UNSAFE.objectFieldOffset(CallSite.class, "target");
|
||||
assert(offset > 0);
|
||||
return offset;
|
||||
}
|
||||
|
||||
/*package-private*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue