equal
deleted
inserted
replaced
25 |
25 |
26 package java.lang.invoke; |
26 package java.lang.invoke; |
27 |
27 |
28 import sun.invoke.empty.Empty; |
28 import sun.invoke.empty.Empty; |
29 import sun.misc.Unsafe; |
29 import sun.misc.Unsafe; |
30 import static java.lang.invoke.MethodHandleStatics.*; |
|
31 import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP; |
30 import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP; |
32 |
31 |
33 /** |
32 /** |
34 * A {@code CallSite} is a holder for a variable {@link MethodHandle}, |
33 * A {@code CallSite} is a holder for a variable {@link MethodHandle}, |
35 * which is called its {@code target}. |
34 * which is called its {@code target}. |
242 private static final MethodHandle GET_TARGET; |
241 private static final MethodHandle GET_TARGET; |
243 static { |
242 static { |
244 try { |
243 try { |
245 GET_TARGET = IMPL_LOOKUP. |
244 GET_TARGET = IMPL_LOOKUP. |
246 findVirtual(CallSite.class, "getTarget", MethodType.methodType(MethodHandle.class)); |
245 findVirtual(CallSite.class, "getTarget", MethodType.methodType(MethodHandle.class)); |
247 } catch (ReflectiveOperationException ignore) { |
246 } catch (ReflectiveOperationException e) { |
248 throw new InternalError(); |
247 throw new InternalError(e); |
249 } |
248 } |
250 } |
249 } |
251 |
250 |
252 /** This guy is rolled into the default target if a MethodType is supplied to the constructor. */ |
251 /** This guy is rolled into the default target if a MethodType is supplied to the constructor. */ |
253 /*package-private*/ |
252 /*package-private*/ |